Commit 6d23af4e authored by Julien Wintz's avatar Julien Wintz
Browse files

Towards logging layer refactoring.

parent 7f0cb8f9
......@@ -13,20 +13,16 @@
*
*/
#include <dtkCore/dtkCore.h>
#include <dtkDistributed/dtkDistributedServerDaemon.h>
#include <dtkLog/dtkLogger.h>
#include <QCoreApplication>
#include <dtkCore>
#include <dtkLog>
#include <QtCore>
int main(int argc, char **argv)
{
QCoreApplication application(argc, argv);
if(!dtkApplicationArgumentsContain(&application, "-type")) {
qDebug() << "Usage:" << argv[0] << " [-p port] -type <Oar | Torque | Local |...>";
return 1;
......@@ -57,4 +53,3 @@ int main(int argc, char **argv)
return status;
}
......@@ -26,9 +26,10 @@
#include <dtkDistributed/dtkDistributedWork.h>
#include <dtkDistributed/dtkDistributedWorker.h>
#include <dtkDistributed/dtkDistributedWorkerManager.h>
#include <dtkLog/dtkLogger.h>
#include <QCoreApplication>
#include <dtkLog>
#include <QtCore>
#include <iostream>
......
/* dtkComposer.cpp ---
*
/* dtkComposer.cpp ---
*
* Author: tkloczko
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Mon Jan 30 10:34:49 2012 (+0100)
......@@ -9,12 +9,12 @@
* Update #: 449
*/
/* Commentary:
*
/* Commentary:
*
*/
/* Change log:
*
*
*/
#include <dtkConfig.h>
......@@ -37,7 +37,8 @@
#include "dtkComposerReader.h"
#include <dtkCoreSupport/dtkGlobal.h>
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
#include <QtCore>
#include <QtWidgets>
......@@ -107,7 +108,7 @@ dtkComposer::dtkComposer(QWidget *parent) : QWidget(parent), d(new dtkComposerPr
d->path = new dtkComposerPath(this);
d->path->setScene(d->scene);
d->compass = new dtkComposerCompass;
d->compass->setScene(d->scene);
d->compass->setView(d->view);
......@@ -140,7 +141,7 @@ dtkComposer::~dtkComposer(void)
delete d->writer;
delete d->reader;
delete d;
d = NULL;
}
......
......@@ -21,7 +21,8 @@
#include "dtkComposerGraphNodeBegin.h"
#include "dtkComposerGraphNodeEnd.h"
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
#include <dtkMathSupport/dtkGraph.h>
#include <dtkGuiSupport/dtkNotification.h>
......
......@@ -46,7 +46,8 @@
#include "dtkComposerSceneNodeLeaf.h"
#include "dtkComposerScenePort.h"
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
#include <dtkMathSupport/dtkGraph.h>
#include <dtkMathSupport/dtkGraphEdge.h>
......
......@@ -29,7 +29,8 @@
#include "dtkComposerNodeRemote.h"
#endif
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
#include <dtkMathSupport/dtkGraph.h>
class dtkComposerGraphNodeBeginPrivate
......@@ -150,4 +151,3 @@ dtkComposerGraphNodeList dtkComposerGraphNodeBegin::successors(void)
return dtkComposerGraphNode::successors();
#endif
}
......@@ -29,7 +29,7 @@
#include "dtkComposerNodeRemote.h"
#endif
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
class dtkComposerGraphNodeEndPrivate
{
......
......@@ -22,7 +22,7 @@
#include "dtkComposerNode.h"
#include "dtkComposerNodeControl.h"
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
#include <QVarLengthArray>
......@@ -106,7 +106,7 @@ dtkComposerGraphNodeList dtkComposerGraphNodeSelectBranch::successors(void)
return val;
}
void dtkComposerGraphNodeSelectBranch::clean(void)
void dtkComposerGraphNodeSelectBranch::clean(void)
{
d->result = -1;
dtkComposerGraphNode::clean();
......@@ -120,5 +120,3 @@ void dtkComposerGraphNodeSelectBranch::eval(void)
d->result = d->composer_node->selectBranch();
this->setStatus(dtkComposerGraphNode::Done);
}
......@@ -26,7 +26,8 @@
#include "dtkComposerTransmitterVariant.h"
#include <dtkCoreSupport/dtkGlobal.h>
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeControlCasePrivate definition
......@@ -192,7 +193,7 @@ int dtkComposerNodeControlCase::selectBranch(void)
value = i;
foreach(dtkComposerTransmitter *t, d->blocks[i]->emitters()) {
t->setActive(true);
}
}
foreach(dtkComposerTransmitter *t, d->blocks[i]->receivers()) {
t->setReady(true);
}
......@@ -202,7 +203,7 @@ int dtkComposerNodeControlCase::selectBranch(void)
foreach(dtkComposerTransmitter *t, d->blocks[i]->emitters()) {
t->setActive(false);
}
foreach(dtkComposerTransmitter *t, d->blocks[i]->receivers()) {
t->setReady(false);
}
......
......@@ -23,7 +23,7 @@
#include <dtkCoreSupport/dtkAbstractData>
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
#include <dtkMathSupport/dtkVector.h>
......@@ -69,15 +69,15 @@ dtkComposerNodeData::~dtkComposerNodeData(void)
d = NULL;
}
bool dtkComposerNodeData::isAbstractData(void) const
bool dtkComposerNodeData::isAbstractData(void) const
{
return true;
return true;
}
QString dtkComposerNodeData::abstractDataType(void) const
{
return "dtkAbstractData";
QString dtkComposerNodeData::abstractDataType(void) const
{
return "dtkAbstractData";
}
void dtkComposerNodeData::run(void)
......
......@@ -18,7 +18,7 @@
#include "dtkComposerTransmitterReceiver.h"
#include "dtkComposerTransmitterVariant.h"
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
class dtkComposerNodeLoggerPrivate
{
......@@ -79,4 +79,3 @@ void dtkComposerNodeLogger::run(void)
}
}
}
......@@ -23,7 +23,7 @@
#include <dtkMathSupport/dtkMatrix.h>
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeMatrixSquareRealPrivate interface
......@@ -67,7 +67,7 @@ dtkComposerNodeMatrixSquareReal::dtkComposerNodeMatrixSquareReal(void) : dtkComp
this->appendReceiver(&d->receiver_value);
this->appendEmitter(&d->emitter_matrix);
d->emitter_size.setData(&d->size);
this->appendEmitter(&d->emitter_size);
}
......
/* dtkAbstractDataComposite.h ---
*
/* dtkAbstractDataComposite.h ---
*
* Author: Thibaud Kloczko
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Wed Sep 21 13:46:31 2011 (+0200)
......@@ -9,12 +9,12 @@
* Update #: 267
*/
/* Commentary:
*
/* Commentary:
*
*/
/* Change log:
*
*
*/
#ifndef DTKABSTRACTDATACOMPOSITE_H
......@@ -24,7 +24,7 @@
#include "dtkCoreSupportExport.h"
#include "dtkGlobal.h"
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
class dtkAbstractDataCompositePrivate;
......@@ -48,22 +48,22 @@ public:
dtkAbstractDataComposite(const QList<dtkAbstractData *>& list, dtkAbstractData *parent = 0);
virtual ~dtkAbstractDataComposite(void);
public:
public:
void append(dtkAbstractData *data);
void remove(dtkAbstractData *data);
bool has(dtkAbstractData *data) const;
qlonglong count(void);
qlonglong indexOf(dtkAbstractData *data, qlonglong from = 0);
Type type(void);
const dtkAbstractData *at(qlonglong index) const;
dtkAbstractData *at(qlonglong index);
const QVector<dtkAbstractData *>& vector(void) const;
const QVector<dtkAbstractData *>& vector(void) const;
QVector<dtkAbstractData *>& vector(void);
const QList<dtkAbstractData *>& list(void) const;
......@@ -76,7 +76,7 @@ private:
dtkAbstractDataComposite(QVector<dtkAbstractData *> *vector);
dtkAbstractDataComposite( QList<dtkAbstractData *> *list);
public:
public:
static dtkAbstractDataComposite *createFromVectorCopy(const QVector<dtkAbstractData *>& vector);
static dtkAbstractDataComposite *createFromVectorCopy( QVector<dtkAbstractData *>& vector);
......
......@@ -16,7 +16,7 @@
#include "dtkAbstractObject.h"
#include "dtkAbstractObject_p.h"
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
// /////////////////////////////////////////////////////////////////
// dtkAbstractObject implementation
......@@ -38,7 +38,7 @@ dtkAbstractObject::dtkAbstractObject(dtkAbstractObject *parent) : QObject(parent
//! Copy constructor.
/*!
*
*
*/
dtkAbstractObject::dtkAbstractObject(const dtkAbstractObject& other) : QObject(other.parent()), d_ptr(new dtkAbstractObjectPrivate(*other.d_ptr, this))
{
......@@ -93,7 +93,7 @@ dtkAbstractObject *dtkAbstractObject::clone(void)
//! Assignement operator.
/*!
*
*
*/
dtkAbstractObject& dtkAbstractObject::operator = (const dtkAbstractObject& other)
{
......@@ -153,7 +153,7 @@ void dtkAbstractObject::copy(const dtkAbstractObject& other)
//! Comparison operator.
/*!
*
*
*/
bool dtkAbstractObject::operator == (const dtkAbstractObject& other) const
{
......@@ -257,7 +257,7 @@ int dtkAbstractObject::retain(void) const
* count be null, the object is scheduled for deletion. Note it sends
* the destroyed signal just before being actually deleted.
* The method of deletion depends on isDeferredDeletionEnabled().
* If it is true (default) the object will be deleted using "this->deleteLater();",
* If it is true (default) the object will be deleted using "this->deleteLater();",
* otherwise "delete this;" is used.
*/
......@@ -276,7 +276,7 @@ int dtkAbstractObject::release(void) const
return newCount;
}
/*!
/*!
* \brief Enable / disable use of this->deleteLater() when reference count reaches 0.
* \param value Changes what happens when the objects reference count reaches 0.
* For most objects this should be set to true, as it allows existing events
......
/* dtkAbstractProcessFactory.cpp ---
*
/* dtkAbstractProcessFactory.cpp ---
*
* Author: Julien Wintz
* Copyright (C) 2008 - Julien Wintz, Inria.
* Created: Fri Nov 7 15:54:10 2008 (+0100)
......@@ -9,19 +9,19 @@
* Update #: 125
*/
/* Commentary:
*
/* Commentary:
*
*/
/* Change log:
*
*
*/
#include "dtkAbstractProcess.h"
#include "dtkAbstractProcessFactory.h"
#include "dtkSmartPointer.h"
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
class dtkAbstractProcessFactoryPrivate
{
......
......@@ -27,7 +27,7 @@
// #include <dtkMath/dtkVector3D.h>
// #include <dtkMath/dtkQuaternion.h>
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
// /////////////////////////////////////////////////////////////////
// dtkAbstractView implementation
......@@ -360,7 +360,7 @@ void dtkAbstractView::addInteractor(dtkAbstractViewInteractor *interactor)
return;
}
if(interactor) {
if(interactor) {
DTK_D(dtkAbstractView);
d->interactors.insert(interactor->identifier(), interactor);
......
......@@ -17,7 +17,7 @@
#include <QtCore>
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
#include <dtkConfig.h>
......
......@@ -20,9 +20,9 @@
#include "dtkPlugin.h"
#include "dtkPluginManager.h"
#include <QApplication>
#include <QtWidgets>
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
// /////////////////////////////////////////////////////////////////
// Helper functions
......@@ -149,7 +149,7 @@ void dtkPluginManager::uninitializeApplication(void)
//! Load a specific plugin designated by its name.
/*! The path is retrieved through the plugin manager settings.
*
*
* \param name The name of the plugin, without platform specific prefix (.e.g lib) and suffix (e.g. .so or .dylib or .dll)
*/
......@@ -180,7 +180,7 @@ void dtkPluginManager::load(const QString& name)
//! Unload a specific plugin designated by its name.
/*! The path is retrieved through the plugin manager settings.
*
*
* \param name The name of the plugin, without platform specific prefix (.e.g lib) and suffix (e.g. .so or .dylib or .dll)
*/
......
......@@ -17,7 +17,7 @@
#include <dtkCore/dtkCore.h>
#include <dtkLog/dtkLogger.h>
#include <dtkLog/dtkLog.h>
#include <QtNetwork>
......@@ -202,7 +202,7 @@ bool dtkDistributedController::deploy(const QUrl& server, QString type, bool ssh
// and the server will stop when the ssh process
// is killed
args << "-t"; // do it twice to force tty allocation
args << "-x"; // disable X11 forwarding
args << "-x"; // disable X11 forwarding
args << server.host();
serverProc->setProcessChannelMode(QProcess::MergedChannels);
......@@ -499,4 +499,3 @@ void dtkDistributedController::error(QAbstractSocket::SocketError error)
}
dtkDistributedController *dtkDistributedController::s_instance = NULL;
......@@ -21,7 +21,7 @@
#include <dtkCore/dtkCore.h>
#include <dtkLog/dtkLogger.h>
#include <dtkLog>
class dtkDistributedMessagePrivate
{
......@@ -310,4 +310,3 @@ qlonglong dtkDistributedMessage::parse(QTcpSocket *socket)
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment