+++ /dev/null
-Environnement
--------------
-repertoire de construction (build) :
- variables d'environement, a passer plutot dans les Makefile
-
- export BUILD_SALOME=${HOME}/devSalome/build
- export SALOME_LIB_DIR=${BUILD_SALOME}/lib
- export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BUILD_SALOME}/lib
-
-naming Service : cf. plus bas.
-
-IAPP_XML (exemple N. Rejneri adapté)
---------
-
-- options de compilation revues (Qt avec threads)
-- creation de librairie
-- initialiser tous les membres de classe pointeurs à NULL dans le constructeur
- (plantage à la 2° execution de mainWindow sur handler non nul)
-- utilisation de getenv pour trouver le path des ressources (xml, librairies, icones)
-- utilisation "extern C" pour l'appel de methode ds librairie dynamique
-
-Naming Service
---------------
-- creation librairie avec la classe d'implementation de SALOME_NamingService
-- environnement
-
-export OMNIORB_CONFIG=${HOME}/.omniORB.cfg
-
-1 line in file ${HOME}/.omniORB.cfg
-ORBInitRef NameService=corbaname::localhost
-
-(replace localhost by internet address to access Naming Service from other machines)
-
-# environnement Mico2.3.5
-
-export MICODIR=/opt/mico2.3.5
-export MICOVERSION=` sed -n '/MICO_VERSION/ { y/b/./; s#^[^"]*"\([^"]*\)".*$#\1#p; }' \
- "$MICODIR/include/mico/version.h" `
-export PATH=${PATH}:${MICODIR}/bin
-export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MICODIR}/lib
-export MANPATH=${MANPATH}:${MICODIR}/man
-export LIBPATH=${LIBPATH}:${MICODIR}/lib
-export SHLIB_PATH=${SHLIB_PATH}:${MICODIR}/lib
-export LIBRARY_PATH=${MICODIR}/lib
-export CPLUS_INCLUDE_PATH=${MICODIR}/include
-
--------------------------------------------------------------------------------
-TODO LIST
--------------------------------------------------------------------------------
-
-Utils
------
- - CPU&Memory measurements
- - Makefile : library, includes
- - Doxygen comments
-
-Session
--------
-
-Server :
- - test only one mainWindow (mutex)
-
-Loader :
- - get stats to know if Server is OK before get interface
-
-Session stats :
- - write the code
-
-Session Kill :
- - write the code
- - get stats to know if there is one or more active sessions before kill.
-
-Launch script for everything :
LIBS += @LDEXPDYNFLAGS@ $(PYTHON_LIBS) $(MPI_LIBS)
-LDFLAGSFORBIN= $(LDFLAGS)
+LDFLAGSFORBIN= $(LDFLAGS) -lSALOMEBasics
LIBSFORBIN= $(LIBS)
@CONCLUDE@
CPPFLAGS+= $(QT_MT_INCLUDES)
CXXFLAGS+=
LDFLAGS+= $(QT_MT_LIBS) $(OGL_LIBS) -lSalomeNS -lOpUtil -lSALOMELocalTrace
-LDFLAGSFORBIN+= -lSalomeNS -lOpUtil -lSALOMELocalTrace
+LDFLAGSFORBIN+= -lSalomeNS -lOpUtil -lSALOMELocalTrace -lSALOMEBasics
@CONCLUDE@
CPPFLAGS += $(PYTHON_INCLUDES) $(QT_MT_INCLUDES)
LDFLAGS += -lSalomeNS -lOpUtil -lSALOMELocalTrace -lSalomeContainer -lSalomeResourcesManager
-LDFLAGSFORBIN= $(LDFLAGS) -lRegistry -lSalomeNotification
+LDFLAGSFORBIN= $(LDFLAGS) -lRegistry -lSalomeNotification -lSALOMEBasics
LIBS += $(PYTHON_LIBS)
@CONCLUDE@
@COMMENCE@
-SUBDIRS = SALOMELocalTrace SALOMETraceCollector Logger Utils \
- CASCatch GenericObj NamingService Registry \
- ModuleCatalog DataTypeCatalog RessourcesCatalog \
- ResourcesManager Notification NOTIFICATION_SWIG \
- Container TestContainer LifeCycleCORBA LifeCycleCORBA_SWIG HDFPersist \
- SALOMEDSClient TOOLSDS SALOMEDSImpl SALOMEDS KERNEL_PY \
- ModuleGenerator Communication
+SUBDIRS = \
+ Basics \
+ SALOMELocalTrace \
+ CASCatch \
+ HDFPersist \
+ Logger \
+ SALOMETraceCollector \
+ Utils \
+ GenericObj \
+ NamingService \
+ Registry \
+ ModuleCatalog \
+ DataTypeCatalog \
+ RessourcesCatalog \
+ ResourcesManager \
+ Notification \
+ NOTIFICATION_SWIG \
+ Container \
+ TestContainer \
+ LifeCycleCORBA \
+ LifeCycleCORBA_SWIG \
+ SALOMEDSClient \
+ TOOLSDS \
+ SALOMEDSImpl \
+ SALOMEDS \
+ KERNEL_PY \
+ ModuleGenerator \
+ Communication \
+ \
+ SALOMELocalTrace/Test \
+ SALOMETraceCollector/Test \
+ Utils/Test \
+ UnitTests
+
+# Basics \
ifeq (@mpi_ok@,yes)
SUBDIRS+= MPIContainer TestMPIContainer
CPPFLAGS+= $(QT_MT_INCLUDES)
LDFLAGS+= $(QT_MT_LIBS) -lSalomeNS -lSALOMELocalTrace -lOpUtil
-LDFLAGSFORBIN+= -lSalomeNS -lSALOMELocalTrace -lOpUtil
+LDFLAGSFORBIN+= -lSalomeNS -lSALOMELocalTrace -lOpUtil -lSALOMEBasics
@CONCLUDE@
LDFLAGS+= -lSalomeNS -lOpUtil -lSALOMELocalTrace
-LDFLAGSFORBIN= $(LDFLAGS)
+LDFLAGSFORBIN= $(LDFLAGS) -lSALOMEBasics
@CONCLUDE@
CPPFLAGS+= $(QT_MT_INCLUDES)
CXXFLAGS+=
LDFLAGS+= $(QT_MT_LIBS) $(OGL_LIBS) -lSalomeNS -lOpUtil -lSALOMELocalTrace
-LDFLAGSFORBIN+= -lSalomeNS -lOpUtil -lSALOMELocalTrace
+LDFLAGSFORBIN+= -lSalomeNS -lOpUtil -lSALOMELocalTrace -lSALOMEBasics
@CONCLUDE@
#
LDXMUFLAGS= -L/usr/X11R6/lib -lXmu
LDFLAGS+=$(LDXMUFLAGS)
-LDFLAGSFORBIN= $(LDFLAGS) -lTKLCAF -lTKMath -lRegistry -lSalomeNotification -lSalomeContainer -lSalomeResourcesManager
+LDFLAGSFORBIN= $(LDFLAGS) -lTKLCAF -lTKMath -lRegistry -lSalomeNotification -lSalomeContainer -lSalomeResourcesManager -lSALOMEBasics
@CONCLUDE@
#endif
}
}
+ //cerr <<"traceFile.close();" << endl << flush;
traceFile.close();
}
pthread_exit(NULL);
#include "BaseTraceCollector.hxx"
#include "LocalTraceCollector.hxx"
#include "FileTraceCollector.hxx"
-//#include "Utils_DESTRUCTEUR_GENERIQUE.hxx"
+#include "BasicsGenericDestructor.hxx"
#include "utilities.h"
-//! specialisation template...
-
-// void DESTRUCTEUR_DE_<LocalTraceBufferPool>::operator()(void)
-// {
-// if(_PtrObjet)
-// {
-// std::cerr << "deleting _PtrObjet LocalTraceBufferPool" << std::endl;
-// LocalTraceBufferPool* aPtr =
-// static_cast<LocalTraceBufferPool*>(_PtrObjet);
-// delete aPtr;
-// }
-// _PtrObjet = NULL ;
-// }
-
using namespace std;
// In case of truncated message, end of trace contains "...\n\0"
{ // the lock after the first test
_singleton = new LocalTraceBufferPool();
-// DESTRUCTEUR_DE_<LocalTraceBufferPool> *ptrDestroy =
-// new DESTRUCTEUR_DE_<LocalTraceBufferPool> (*_singleton);
+ DESTRUCTOR_OF<LocalTraceBufferPool> *ptrDestroy =
+ new DESTRUCTOR_OF<LocalTraceBufferPool> (*_singleton);
// --- start a trace Collector
int ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
if (_singleton)
{
- //cerr << "LocalTraceBufferPool::~LocalTraceBufferPool()" << endl<<flush;
+ cerr << "LocalTraceBufferPool::~LocalTraceBufferPool()" << endl<<flush;
delete (_myThreadTrace);
_myThreadTrace = 0;
int ret;
ret=sem_destroy(&_freeBufferSemaphore);
ret=sem_destroy(&_fullBufferSemaphore);
ret=pthread_mutex_destroy(&_incrementMutex);
- //cerr<<"LocalTraceBufferPool::~LocalTraceBufferPool()-end"<<endl<<flush;
+ cerr<<"LocalTraceBufferPool::~LocalTraceBufferPool()-end"<<endl<<flush;
_singleton = 0;
ret = pthread_mutex_unlock(&_singletonMutex); // release lock
}
#include <pthread.h>
#include <semaphore.h>
#include "BaseTraceCollector.hxx"
+#include "BasicsGenericDestructor.hxx"
#define ABORT_MESS 1 // for traceType field in struct LocalTrace_TraceInfo
#define NORMAL_MESS 0
int position; // to check sequence
};
-class SALOMELOCALTRACE_EXPORT LocalTraceBufferPool
+class SALOMELOCALTRACE_EXPORT LocalTraceBufferPool : public PROTECTED_DELETE
{
public:
static LocalTraceBufferPool* instance();
int insert(int traceType, const char* msg);
int retrieve(LocalTrace_TraceInfo& aTrace);
unsigned long toCollect();
- ~LocalTraceBufferPool();
protected:
LocalTraceBufferPool();
+ virtual ~LocalTraceBufferPool();
unsigned long lockedIncrement(unsigned long& pos);
private:
LocalTraceBufferPool.cxx
LIBS= @LIBS@
-#LDFLAGS+=
+LDFLAGS+= -lSALOMEBasics
@CONCLUDE@
BIN_SRC =
LDFLAGS+= -lSalomeNotification -lSalomeNS -lSalomeContainer -lRegistry -lOpUtil -lSALOMELocalTrace -lSalomeResourcesManager
-LDFLAGSFORBIN+= -lSalomeNotification -lSalomeNS -lSalomeContainer -lRegistry -lOpUtil -lSALOMELocalTrace -lSalomeResourcesManager
+LDFLAGSFORBIN+= -lSalomeNotification -lSalomeNS -lSalomeContainer -lRegistry -lOpUtil -lSALOMELocalTrace -lSalomeResourcesManager -lSALOMEBasics
@CONCLUDE@