From bd3c7da9e4cc78a330772a34f686cdfb5aa71730 Mon Sep 17 00:00:00 2001 From: abd Date: Fri, 3 Oct 2008 10:28:02 +0000 Subject: [PATCH] Win32 Porting. Correction of Export/Import defines for Win32 platform. Using WIN32 standard define instead WNT define of OpenCascade library. Using Basics instead Utils library. Removed "using namespace std" from header files. --- .../SALOME_ParallelComponent_i.cxx | 30 +-- .../SALOME_ParallelComponent_i.hxx | 22 +-- .../SALOME_ParallelContainerNodeDummy.cxx | 6 +- .../SALOME_ParallelContainerNodeMpi.cxx | 6 +- .../SALOME_ParallelContainerProxyDummy.cxx | 6 +- .../SALOME_ParallelContainerProxyMpi.cxx | 6 +- .../SALOME_ParallelContainer_i.cxx | 30 +-- .../SALOME_ParallelContainer_i.hxx | 21 +- src/Registry/RegistryConnexion.cxx | 2 +- src/Registry/RegistryService.cxx | 10 +- src/Registry/RegistryService.hxx | 2 +- src/Registry/SALOME_Registry.hxx | 22 +-- src/Registry/SALOME_Registry_Server.cxx | 4 +- src/ResourcesManager/Makefile.am | 4 +- src/ResourcesManager/ResourcesManager.cxx | 54 +---- src/ResourcesManager/ResourcesManager.hxx | 10 +- .../ResourcesManager_Defs.hxx | 33 ++++ .../SALOME_LoadRateManager.hxx | 15 +- .../SALOME_ResourcesCatalog_Handler.cxx | 4 +- .../SALOME_ResourcesCatalog_Handler.hxx | 5 +- .../SALOME_ResourcesCatalog_Parser.hxx | 6 +- .../SALOME_ResourcesManager.cxx | 10 +- .../SALOME_ResourcesManager.hxx | 21 +- src/SALOMEDS/Makefile.am | 8 +- src/SALOMEDS/SALOMEDS.cxx | 13 -- .../SALOMEDS_AttributeStudyProperties.cxx | 2 +- src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx | 8 +- src/SALOMEDS/SALOMEDS_Defines.hxx | 22 +-- src/SALOMEDS/SALOMEDS_GenericAttribute.cxx | 6 +- src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx | 11 +- src/SALOMEDS/SALOMEDS_SObject.cxx | 9 +- src/SALOMEDS/SALOMEDS_SObject_i.cxx | 5 +- src/SALOMEDS/SALOMEDS_Server.cxx | 4 +- src/SALOMEDS/SALOMEDS_Study.cxx | 6 +- src/SALOMEDS/SALOMEDS_StudyManager.cxx | 8 +- src/SALOMEDS/SALOMEDS_StudyManager_i.cxx | 15 +- src/SALOMEDS/SALOMEDS_StudyManager_i.hxx | 2 +- src/SALOMEDS/SALOMEDS_Study_i.cxx | 10 +- src/SALOMEDS/SALOMEDS_Study_i.hxx | 2 +- src/SALOMEDS/Test/Makefile.am | 1 + src/SALOMEDS/Test/TestSALOMEDS.cxx | 8 +- src/SALOMEDSImpl/Makefile.am | 2 + .../SALOMEDSImpl_AttributeComment.cxx | 10 +- .../SALOMEDSImpl_AttributeComment.hxx | 32 +-- .../SALOMEDSImpl_AttributeDrawable.cxx | 2 - .../SALOMEDSImpl_AttributeDrawable.hxx | 40 ++-- .../SALOMEDSImpl_AttributeExpandable.cxx | 2 - .../SALOMEDSImpl_AttributeExpandable.hxx | 36 ++-- .../SALOMEDSImpl_AttributeExternalFileDef.hxx | 37 ++-- .../SALOMEDSImpl_AttributeFileType.hxx | 37 ++-- .../SALOMEDSImpl_AttributeFlags.hxx | 43 ++-- .../SALOMEDSImpl_AttributeGraphic.hxx | 43 ++-- .../SALOMEDSImpl_AttributeIOR.cxx | 2 - .../SALOMEDSImpl_AttributeIOR.hxx | 28 +-- .../SALOMEDSImpl_AttributeInteger.cxx | 5 +- .../SALOMEDSImpl_AttributeInteger.hxx | 33 ++-- .../SALOMEDSImpl_AttributeLocalID.hxx | 32 +-- .../SALOMEDSImpl_AttributeName.hxx | 30 +-- .../SALOMEDSImpl_AttributeOpened.hxx | 32 +-- .../SALOMEDSImpl_AttributeParameter.hxx | 103 +++++----- .../SALOMEDSImpl_AttributePersistentRef.hxx | 34 ++-- .../SALOMEDSImpl_AttributePixMap.hxx | 36 ++-- .../SALOMEDSImpl_AttributePythonObject.hxx | 38 ++-- .../SALOMEDSImpl_AttributeReal.hxx | 28 +-- .../SALOMEDSImpl_AttributeReference.hxx | 30 +-- .../SALOMEDSImpl_AttributeSelectable.hxx | 32 +-- ...ALOMEDSImpl_AttributeSequenceOfInteger.hxx | 42 ++-- .../SALOMEDSImpl_AttributeSequenceOfReal.hxx | 42 ++-- .../SALOMEDSImpl_AttributeString.cxx | 2 - .../SALOMEDSImpl_AttributeStudyProperties.hxx | 99 +++++----- .../SALOMEDSImpl_AttributeTableOfInteger.hxx | 88 +++++---- .../SALOMEDSImpl_AttributeTableOfReal.hxx | 88 +++++---- .../SALOMEDSImpl_AttributeTableOfString.hxx | 88 +++++---- .../SALOMEDSImpl_AttributeTarget.hxx | 36 ++-- .../SALOMEDSImpl_AttributeTextColor.hxx | 28 +-- ...LOMEDSImpl_AttributeTextHighlightColor.hxx | 28 +-- .../SALOMEDSImpl_AttributeTreeNode.hxx | 108 +++++----- .../SALOMEDSImpl_AttributeUserID.hxx | 42 ++-- src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx | 10 +- src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx | 28 +-- .../SALOMEDSImpl_ChildIterator.hxx | 34 ++-- .../SALOMEDSImpl_ChildNodeIterator.hxx | 25 +-- src/SALOMEDSImpl/SALOMEDSImpl_Defines.hxx | 39 ++++ src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx | 73 +++---- src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx | 89 ++++----- src/SALOMEDSImpl/SALOMEDSImpl_SComponent.hxx | 31 +-- .../SALOMEDSImpl_SComponentIterator.hxx | 12 +- src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx | 64 +++--- src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx | 187 +++++++++--------- .../SALOMEDSImpl_StudyBuilder.hxx | 99 +++++----- src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.hxx | 38 ++-- .../SALOMEDSImpl_StudyManager.cxx | 42 ++-- .../SALOMEDSImpl_StudyManager.hxx | 110 ++++++----- src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx | 9 +- src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx | 34 ++-- src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx | 6 +- .../SALOMEDSImpl_UseCaseBuilder.hxx | 42 ++-- .../SALOMEDSImpl_UseCaseIterator.hxx | 12 +- src/SALOMELocalTrace/BaseTraceCollector.cxx | 2 +- src/SALOMELocalTrace/FileTraceCollector.cxx | 6 +- src/SALOMELocalTrace/LocalTraceBufferPool.cxx | 10 +- src/SALOMELocalTrace/LocalTraceCollector.cxx | 4 +- src/SALOMELocalTrace/SALOME_LocalTrace.hxx | 22 +-- src/SALOMELocalTrace/utilities.h | 3 +- .../SALOMETraceCollector.cxx | 4 +- .../SALOMETraceCollector.hxx | 4 +- .../TraceCollector_WaitForServerReadiness.cxx | 4 +- 107 files changed, 1491 insertions(+), 1459 deletions(-) create mode 100755 src/ResourcesManager/ResourcesManager_Defs.hxx create mode 100755 src/SALOMEDSImpl/SALOMEDSImpl_Defines.hxx diff --git a/src/ParallelContainer/SALOME_ParallelComponent_i.cxx b/src/ParallelContainer/SALOME_ParallelComponent_i.cxx index fab45e703..59749089b 100644 --- a/src/ParallelContainer/SALOME_ParallelComponent_i.cxx +++ b/src/ParallelContainer/SALOME_ParallelComponent_i.cxx @@ -28,13 +28,13 @@ #include "OpUtil.hxx" #include -#ifndef WNT +#ifndef WIN32 #include #endif #include #include "utilities.h" -#ifndef WNT +#ifndef WIN32 #include #include #include @@ -304,7 +304,7 @@ bool Engines_Parallel_Component_i::Kill_impl() // << dec ) ; bool RetVal = false ; -#ifndef WNT +#ifndef WIN32 if ( _ThreadId > 0 && pthread_self() != _ThreadId ) { RetVal = Killer( _ThreadId , 0 ) ; @@ -333,12 +333,12 @@ bool Engines_Parallel_Component_i::Stop_impl() MESSAGE("Engines_Parallel_Component_i::Stop_i() pthread_t "<< pthread_self() << " pid " << getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() - << " machineName " << GetHostname().c_str()<< " _id " << hex << _id + << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id << dec << " _ThreadId " << _ThreadId ); bool RetVal = false ; -#ifndef WNT +#ifndef WIN32 if ( _ThreadId > 0 && pthread_self() != _ThreadId ) { RetVal = Killer( _ThreadId , 0 ) ; @@ -365,11 +365,11 @@ bool Engines_Parallel_Component_i::Suspend_impl() MESSAGE("Engines_Parallel_Component_i::Suspend_i() pthread_t "<< pthread_self() << " pid " << getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() - << " machineName " << GetHostname().c_str()<< " _id " << hex << _id + << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id << dec << " _ThreadId " << _ThreadId ); bool RetVal = false ; -#ifndef WNT +#ifndef WIN32 if ( _ThreadId > 0 && pthread_self() != _ThreadId ) #else if ( _ThreadId > 0 && pthread_self().p != _ThreadId->p ) @@ -381,7 +381,7 @@ bool Engines_Parallel_Component_i::Suspend_impl() } else { -#ifndef WNT +#ifndef WIN32 RetVal = Killer( _ThreadId ,SIGINT ) ; #else RetVal = Killer( *_ThreadId ,SIGINT ) ; @@ -404,10 +404,10 @@ bool Engines_Parallel_Component_i::Resume_impl() MESSAGE("Engines_Parallel_Component_i::Resume_i() pthread_t "<< pthread_self() << " pid " << getpid() << " instanceName " << _instanceName.c_str() << " interface " << _interfaceName.c_str() - << " machineName " << GetHostname().c_str()<< " _id " << hex << _id + << " machineName " << Kernel_Utils::GetHostname().c_str()<< " _id " << hex << _id << dec << " _ThreadId " << _ThreadId ); bool RetVal = false ; -#ifndef WNT +#ifndef WIN32 if ( _ThreadId > 0 && pthread_self() != _ThreadId ) #else if ( _ThreadId > 0 && pthread_self().p != _ThreadId->p ) @@ -439,7 +439,7 @@ CORBA::Long Engines_Parallel_Component_i::CpuUsed_impl() { if ( _ThreadId > 0 ) { -#ifndef WNT +#ifndef WIN32 if ( pthread_self() != _ThreadId ) #else if ( pthread_self().p != _ThreadId->p ) @@ -452,7 +452,7 @@ CORBA::Long Engines_Parallel_Component_i::CpuUsed_impl() { // Get Cpu in the appropriate thread with that object !... theEngines_Component = this ; -#ifndef WNT +#ifndef WIN32 Killer( _ThreadId ,SIGUSR1 ) ; #else Killer( *_ThreadId ,SIGUSR11 ) ; @@ -543,7 +543,7 @@ void Engines_Parallel_Component_i::beginService(const char *serviceName) { MESSAGE(pthread_self() << "Send BeginService notification for " < #include #include -#ifndef WNT +#ifndef WIN32 #include #endif #include @@ -45,18 +45,14 @@ class Engines_Parallel_Container_i; -#if defined CONTAINER_EXPORTS -#if defined WIN32 -#define CONTAINER_EXPORT __declspec( dllexport ) +#ifdef WIN32 +# ifdef CONTAINER_EXPORTS +# define CONTAINER_EXPORT __declspec( dllexport ) +# else +# define CONTAINER_EXPORT __declspec( dllimport ) +# endif #else -#define CONTAINER_EXPORT -#endif -#else -#if defined WNT -#define CONTAINER_EXPORT __declspec( dllimport ) -#else -#define CONTAINER_EXPORT -#endif +# define CONTAINER_EXPORT #endif class CONTAINER_EXPORT Engines_Parallel_Component_i: @@ -191,7 +187,7 @@ protected: char * _proxy; private: -#ifndef WNT +#ifndef WIN32 pthread_t _ThreadId ; #else pthread_t* _ThreadId ; diff --git a/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx b/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx index d3470b9de..bde83c19d 100644 --- a/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainerNodeDummy.cxx @@ -29,7 +29,7 @@ #include #include -#ifndef WNT +#ifndef WIN32 #include #else #include @@ -135,7 +135,7 @@ int main(int argc, char* argv[]) PortableServer::POA_var root_poa = PortableServer::POA::_narrow(obj); PortableServer::POAManager_var pman = root_poa->the_POAManager(); -#ifndef WNT +#ifndef WIN32 // add this container to the kill list char aCommand[100]; sprintf(aCommand, "addToKillList.py %d SALOME_ParallelContainerNode", getpid()); @@ -170,7 +170,7 @@ int main(int argc, char* argv[]) obj = root_poa->id_to_reference(*_id); // In the NamingService - string hostname = GetHostname(); + string hostname = Kernel_Utils::GetHostname(); int myid = 0; char buffer [5]; snprintf(buffer, 5, "%d", myid); diff --git a/src/ParallelContainer/SALOME_ParallelContainerNodeMpi.cxx b/src/ParallelContainer/SALOME_ParallelContainerNodeMpi.cxx index baea9d421..0b29d128e 100644 --- a/src/ParallelContainer/SALOME_ParallelContainerNodeMpi.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainerNodeMpi.cxx @@ -29,7 +29,7 @@ #include #include -#ifndef WNT +#ifndef WIN32 #include #else #include @@ -170,7 +170,7 @@ int main(int argc, char* argv[]) PortableServer::POA_var root_poa = PortableServer::POA::_narrow(obj); PortableServer::POAManager_var pman = root_poa->the_POAManager(); -#ifndef WNT +#ifndef WIN32 // add this container to the kill list char aCommand[100]; sprintf(aCommand, "addToKillList.py %d SALOME_ParallelContainerNodeMpi", getpid()); @@ -207,7 +207,7 @@ int main(int argc, char* argv[]) obj = root_poa->id_to_reference(*_id); // In the NamingService - string hostname = GetHostname(); + string hostname = Kernel_Utils::GetHostname(); int myid; MPI_Comm_rank(MPI_COMM_WORLD, &myid); diff --git a/src/ParallelContainer/SALOME_ParallelContainerProxyDummy.cxx b/src/ParallelContainer/SALOME_ParallelContainerProxyDummy.cxx index e8df8733b..4ce592d5d 100644 --- a/src/ParallelContainer/SALOME_ParallelContainerProxyDummy.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainerProxyDummy.cxx @@ -29,7 +29,7 @@ #include #include -#ifndef WNT +#ifndef WIN32 #include #else #include @@ -84,7 +84,7 @@ int main(int argc, char* argv[]) PortableServer::POA_var root_poa = PortableServer::POA::_narrow(obj); PortableServer::POAManager_var pman = root_poa->the_POAManager(); -#ifndef WNT +#ifndef WIN32 // add this container to the kill list char aCommand[100]; sprintf(aCommand, "addToKillList.py %d SALOME_ParallelContainerProxyDummy", getpid()); @@ -114,7 +114,7 @@ int main(int argc, char* argv[]) obj = root_poa->id_to_reference(_id); // In the NamingService - string hostname = GetHostname(); + string hostname = Kernel_Utils::GetHostname(); Engines::Container_var pCont = Engines::Container::_narrow(obj); string _containerName = ns->BuildContainerNameForNS(containerName.c_str(), hostname.c_str()); diff --git a/src/ParallelContainer/SALOME_ParallelContainerProxyMpi.cxx b/src/ParallelContainer/SALOME_ParallelContainerProxyMpi.cxx index f14b09e18..da7248b33 100644 --- a/src/ParallelContainer/SALOME_ParallelContainerProxyMpi.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainerProxyMpi.cxx @@ -29,7 +29,7 @@ #include #include -#ifndef WNT +#ifndef WIN32 #include #else #include @@ -88,7 +88,7 @@ int main(int argc, char* argv[]) PortableServer::POA_var root_poa = PortableServer::POA::_narrow(obj); PortableServer::POAManager_var pman = root_poa->the_POAManager(); -#ifndef WNT +#ifndef WIN32 // add this container to the kill list char aCommand[100]; sprintf(aCommand, "addToKillList.py %d SALOME_ParallelContainerProxyMpi", getpid()); @@ -119,7 +119,7 @@ int main(int argc, char* argv[]) obj = root_poa->id_to_reference(_id); // in the NamingService - string hostname = GetHostname(); + string hostname = Kernel_Utils::GetHostname(); Engines::Container_var pCont = Engines::Container::_narrow(obj); string _containerName = ns->BuildContainerNameForNS(containerName.c_str(), hostname.c_str()); diff --git a/src/ParallelContainer/SALOME_ParallelContainer_i.cxx b/src/ParallelContainer/SALOME_ParallelContainer_i.cxx index 97f655b39..77da1ab10 100644 --- a/src/ParallelContainer/SALOME_ParallelContainer_i.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainer_i.cxx @@ -24,7 +24,7 @@ // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA #include -#ifndef WNT +#ifndef WIN32 #else #include #endif @@ -40,11 +40,11 @@ #include "OpUtil.hxx" #include #include -#ifndef WNT +#ifndef WIN32 #include #include #else -#include "../../adm/win32/SALOME_WNT.hxx" +#include "../../adm/win32/SALOME_WIN32.hxx" #include #include int SIGUSR1 = 1000; @@ -60,7 +60,7 @@ bool _Sleeping = false ; // Other Containers are started via start_impl of FactoryServer extern "C" {void ActSigIntHandler() ; } -#ifndef WNT +#ifndef WIN32 extern "C" {void SigIntHandler(int, siginfo_t *, void *) ; } #else extern "C" {void SigIntHandler( int ) ; } @@ -114,7 +114,7 @@ Engines_Parallel_Container_i::Engines_Parallel_Container_i (CORBA::ORB_ptr orb, _argc = argc ; _argv = argv ; - string hostname = GetHostname(); + string hostname = Kernel_Utils::GetHostname(); _orb = CORBA::ORB::_duplicate(orb) ; _poa = PortableServer::POA::_duplicate(poa) ; @@ -157,7 +157,7 @@ char* Engines_Parallel_Container_i::name() char* Engines_Parallel_Container_i::getHostName() { - string s = GetHostname(); + string s = Kernel_Utils::GetHostname(); MESSAGE("Engines_Parallel_Container_i::getHostName " << s); return CORBA::string_dup(s.c_str()) ; } @@ -226,7 +226,7 @@ Engines_Parallel_Container_i::load_component_Library(const char* componentName) string aCompName = componentName; // --- try dlopen C++ component -#ifndef WNT +#ifndef WIN32 string impl_name = string ("lib") + aCompName + string("Engine.so"); #else string impl_name = aCompName + string("Engine.dll"); @@ -244,7 +244,7 @@ Engines_Parallel_Container_i::load_component_Library(const char* componentName) } void* handle; -#ifndef WNT +#ifndef WIN32 handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; #else handle = dlopen( impl_name.c_str() , 0 ) ; @@ -305,7 +305,7 @@ Engines_Parallel_Container_i::create_component_instance(const char*genericRegist } //--- try C++ -#ifndef WNT +#ifndef WIN32 string impl_name = string ("lib") + aCompName +string("Engine.so"); #else string impl_name = aCompName +string("Engine.dll"); @@ -452,7 +452,7 @@ bool Engines_Parallel_Container_i::Kill_impl() { MESSAGE("Engines_Parallel_Container_i::Kill() pid "<< getpid() << " containerName " << _containerName.c_str() << " machineName " - << GetHostname().c_str()); + << Kernel_Utils::GetHostname().c_str()); INFOS("==============================================================="); INFOS("= REMOVE calls to Kill_impl in C++ container ="); INFOS("==============================================================="); @@ -730,7 +730,7 @@ Engines_Parallel_Container_i::createParallelInstance(string genericRegisterName, string instanceName = aGenRegisterName + "_inst_" + aNumI ; string component_registerName = _containerName + "/" + instanceName; - string hostname = GetHostname(); + string hostname = Kernel_Utils::GetHostname(); CORBA::Object_var temp = _NS->Resolve(component_registerName.c_str()); Engines::Component_var obj_proxy = Engines::Component::_narrow(temp); @@ -850,7 +850,7 @@ bool Engines_Parallel_Container_i::isPythonContainer(const char* ContainerName) void ActSigIntHandler() { -#ifndef WNT +#ifndef WIN32 struct sigaction SigIntAct ; SigIntAct.sa_sigaction = &SigIntHandler ; SigIntAct.sa_flags = SA_SIGINFO ; @@ -860,7 +860,7 @@ void ActSigIntHandler() // (SIGINT | SIGUSR1) : // it must be only one signal ===> one call for SIGINT // and an other one for SIGUSR1 -#ifndef WNT +#ifndef WIN32 if ( sigaction( SIGINT , &SigIntAct, NULL ) ) { perror("SALOME_Container main ") ; exit(0) ; @@ -885,7 +885,7 @@ void ActSigIntHandler() void SetCpuUsed() ; -#ifndef WNT +#ifndef WIN32 void SigIntHandler(int what , siginfo_t * siginfo , void * toto ) { //PAL9042 JR : during the execution of a Signal Handler (and of methods called through Signal Handlers) @@ -921,7 +921,7 @@ void SigIntHandler(int what , siginfo_t * siginfo , return ; } } -#else // Case WNT +#else // Case WIN32 void SigIntHandler( int what ) { MESSAGE( pthread_self() << "SigIntHandler what " << what << endl ); if ( _Sleeping ) { diff --git a/src/ParallelContainer/SALOME_ParallelContainer_i.hxx b/src/ParallelContainer/SALOME_ParallelContainer_i.hxx index 34d980fdb..1c2efb303 100644 --- a/src/ParallelContainer/SALOME_ParallelContainer_i.hxx +++ b/src/ParallelContainer/SALOME_ParallelContainer_i.hxx @@ -33,7 +33,7 @@ #include #include #include -#ifndef WNT +#ifndef WIN32 #include #endif #include @@ -43,19 +43,14 @@ class SALOME_NamingService; - -#if defined CONTAINER_EXPORTS -#if defined WIN32 -#define CONTAINER_EXPORT __declspec( dllexport ) -#else -#define CONTAINER_EXPORT -#endif +#ifdef WIN32 +# ifdef CONTAINER_EXPORTS +# define CONTAINER_EXPORT __declspec( dllexport ) +# else +# define CONTAINER_EXPORT __declspec( dllimport ) +# endif #else -#if defined WNT -#define CONTAINER_EXPORT __declspec( dllimport ) -#else -#define CONTAINER_EXPORT -#endif +# define CONTAINER_EXPORT #endif class CONTAINER_EXPORT Engines_Parallel_Container_i: diff --git a/src/Registry/RegistryConnexion.cxx b/src/Registry/RegistryConnexion.cxx index 62f017e15..657bbc159 100644 --- a/src/Registry/RegistryConnexion.cxx +++ b/src/Registry/RegistryConnexion.cxx @@ -98,7 +98,7 @@ RegistryConnexion::~RegistryConnexion() _VarComponents->remove( _Id ) ; } _Id = 0 ; -#ifndef WNT +#ifndef WIN32 delete [] _Ior; #else delete [] (char*) _Ior; diff --git a/src/Registry/RegistryService.cxx b/src/Registry/RegistryService.cxx index 939c1adc6..5b4e333a1 100644 --- a/src/Registry/RegistryService.cxx +++ b/src/Registry/RegistryService.cxx @@ -35,7 +35,7 @@ extern "C" # include } -#ifndef WNT +#ifndef WIN32 #include #else #include @@ -78,7 +78,7 @@ RegistryService::~RegistryService() _Compteur = -1 ; if ( _SessionName ) { -#ifndef WNT +#ifndef WIN32 delete [] _SessionName ; #else delete [] (char*)_SessionName ; @@ -116,7 +116,7 @@ CORBA::ULong RegistryService::add( const Registry::Infos & infos ) return (CORBA::ULong)_Compteur ; } -#ifndef WNT +#ifndef WIN32 void RegistryService::remove( const CORBA::ULong id) #else void RegistryService::remove( CORBA::ULong id) @@ -144,7 +144,7 @@ void RegistryService::remove( CORBA::ULong id) } -#ifndef WNT +#ifndef WIN32 void RegistryService::hello( const CORBA::ULong id ) #else void RegistryService::hello( CORBA::ULong id ) @@ -263,7 +263,7 @@ void RegistryService::SessionName( const char *sessionName ) } void RegistryService::ping() { -#ifndef WNT +#ifndef WIN32 MESSAGE(" RegistryService::ping() pid "<< getpid()); #else MESSAGE(" RegistryService::ping() pid "<< _getpid()); diff --git a/src/Registry/RegistryService.hxx b/src/Registry/RegistryService.hxx index bc6097fcd..b274a5deb 100644 --- a/src/Registry/RegistryService.hxx +++ b/src/Registry/RegistryService.hxx @@ -75,7 +75,7 @@ public : CORBA::Long getPID(); virtual CORBA::ULong add (const Registry::Infos & infos); virtual CORBA::ULong size ( void ); -#ifndef WNT +#ifndef WIN32 virtual void remove( const CORBA::ULong id ); virtual void hello( const CORBA::ULong id ); #else diff --git a/src/Registry/SALOME_Registry.hxx b/src/Registry/SALOME_Registry.hxx index 4ca01a2c7..d798156c1 100755 --- a/src/Registry/SALOME_Registry.hxx +++ b/src/Registry/SALOME_Registry.hxx @@ -26,22 +26,14 @@ #ifndef _SALOME_Registry_HXX_ #define _SALOME_Registry_HXX_ -#ifdef WNT - #if defined REGISTRY_EXPORTS - #if defined WIN32 - #define REGISTRY_EXPORT __declspec( dllexport ) - #else - #define REGISTRY_EXPORT - #endif - #else - #if defined WIN32 - #define REGISTRY_EXPORT __declspec( dllimport ) - #else - #define REGISTRY_EXPORT - #endif - #endif +#ifdef WIN32 +# ifdef REGISTRY_EXPORTS +# define REGISTRY_EXPORT __declspec( dllexport ) +# else +# define REGISTRY_EXPORT __declspec( dllimport ) +# endif #else - #define REGISTRY_EXPORT +# define REGISTRY_EXPORT #endif #endif diff --git a/src/Registry/SALOME_Registry_Server.cxx b/src/Registry/SALOME_Registry_Server.cxx index 8183340c2..718552c8d 100644 --- a/src/Registry/SALOME_Registry_Server.cxx +++ b/src/Registry/SALOME_Registry_Server.cxx @@ -104,7 +104,7 @@ int main( int argc , char **argv ) for (int i = 1; i<=NumberOfTries; i++) { if (i!=1) -#ifndef WNT +#ifndef WIN32 a=nanosleep(&ts_req,&ts_rem); #else Sleep(TIMESleep/1000000); @@ -133,7 +133,7 @@ int main( int argc , char **argv ) for(int j=1; j<=NumberOfTries; j++) { if (j!=1) -#ifndef WNT +#ifndef WIN32 a=nanosleep(&ts_req, &ts_rem); #else Sleep(TIMESleep/1000000); diff --git a/src/ResourcesManager/Makefile.am b/src/ResourcesManager/Makefile.am index db305442b..7eef30ae1 100755 --- a/src/ResourcesManager/Makefile.am +++ b/src/ResourcesManager/Makefile.am @@ -39,7 +39,8 @@ salomeinclude_HEADERS = \ SALOME_ResourcesManager.hxx \ SALOME_ResourcesCatalog_Handler.hxx \ SALOME_LoadRateManager.hxx \ - ResourcesManager.hxx + ResourcesManager.hxx \ + ResourcesManager_Defs.hxx # # =============================================================== @@ -63,6 +64,7 @@ COMMON_CPPFLAGS=\ COMMON_LIBS =\ ../NamingService/libSalomeNS.la \ ../Utils/libOpUtil.la \ + ../Basics/libSALOMEBasics.la \ $(top_builddir)/idl/libSalomeIDLKernel.la \ @LIBXML_LIBS@ diff --git a/src/ResourcesManager/ResourcesManager.cxx b/src/ResourcesManager/ResourcesManager.cxx index a9202c1b3..f872abb84 100644 --- a/src/ResourcesManager/ResourcesManager.cxx +++ b/src/ResourcesManager/ResourcesManager.cxx @@ -18,6 +18,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "ResourcesManager.hxx" +#include #include #include #include @@ -27,9 +28,12 @@ #include #include -#include #include +#ifndef WIN32 +# include +#endif + #define MAX_SIZE_FOR_HOSTNAME 256; using namespace std; @@ -127,7 +131,7 @@ ResourcesManager_cpp::GetFittingResources(const machineParams& params, const char *hostname = params.hostname.c_str(); #if defined(_DEBUG_) || defined(_DEBUG) - cerr << "GetFittingResources " << hostname << " " << GetHostname().c_str() << endl; + cerr << "GetFittingResources " << hostname << " " << Kernel_Utils::GetHostname().c_str() << endl; #endif if (hostname[0] != '\0'){ @@ -136,12 +140,12 @@ ResourcesManager_cpp::GetFittingResources(const machineParams& params, //#endif if ( strcmp(hostname, "localhost") == 0 || - strcmp(hostname, GetHostname().c_str()) == 0 ) + strcmp(hostname, Kernel_Utils::GetHostname().c_str()) == 0 ) { //#if defined(_DEBUG_) || defined(_DEBUG) // cerr << "ResourcesManager_cpp::GetFittingResources : localhost" << endl; //#endif - vec.push_back(GetHostname().c_str()); + vec.push_back(Kernel_Utils::GetHostname().c_str()); //#if defined(_DEBUG_) || defined(_DEBUG) // cerr << "ResourcesManager_cpp::GetFittingResources : " << vec.size() << endl; //#endif @@ -449,7 +453,7 @@ throw(ResourcesException) bool erasedHost = false; if( mapOfModulesOfCurrentHost.size() > 0 ){ - for(int i=0;i::const_iterator itt = find(mapOfModulesOfCurrentHost.begin(), mapOfModulesOfCurrentHost.end(), @@ -476,43 +480,3 @@ ParserResourcesType ResourcesManager_cpp::GetResourcesList(const std::string& ma else return _resourcesBatchList[machine]; } - -std::string ResourcesManager_cpp::GetHostname() -{ - int ls = 100, r = 1; - char *s; - - while (ls < 10000 && r) { - ls *= 2; - s = new char[ls]; - r = gethostname(s, ls-1); - switch (r) - { - case 0: - break; - default: -#ifdef EINVAL - case EINVAL: -#endif -#ifdef ENAMETOOLONG - case ENAMETOOLONG: -#endif - delete [] s; - continue; - } - } - - if (r != 0) { - s = new char[50]; - strcpy(s, "localhost"); - } - - // remove all after '.' - char *aDot = (strchr(s,'.')); - if (aDot) aDot[0] = '\0'; - - string p = s; - delete [] s; - return p; -} - diff --git a/src/ResourcesManager/ResourcesManager.hxx b/src/ResourcesManager/ResourcesManager.hxx index 951aba5da..bd509b77f 100644 --- a/src/ResourcesManager/ResourcesManager.hxx +++ b/src/ResourcesManager/ResourcesManager.hxx @@ -20,6 +20,8 @@ #ifndef __RESOURCESMANAGER_HXX__ #define __RESOURCESMANAGER_HXX__ +#include "ResourcesManager_Defs.hxx" + #include #include #include @@ -42,7 +44,7 @@ struct machineParams{ unsigned int mem_mb; }; -class ResourcesException +class RESOURCESMANAGER_EXPORT ResourcesException { public: const std::string msg; @@ -50,7 +52,7 @@ public: ResourcesException(const std::string m) : msg(m) {} }; -class ResourcesManager_cpp +class RESOURCESMANAGER_EXPORT ResourcesManager_cpp { public: @@ -108,9 +110,7 @@ class ResourcesManager_cpp SALOME_LoadRateManager _dynamicResourcesSelecter; //! different behaviour if $APPLI exists (SALOME Application) - bool _isAppliSalomeDefined; - - std::string GetHostname(); + bool _isAppliSalomeDefined; }; #endif // __RESOURCESMANAGER_HXX__ diff --git a/src/ResourcesManager/ResourcesManager_Defs.hxx b/src/ResourcesManager/ResourcesManager_Defs.hxx new file mode 100755 index 000000000..c1169b653 --- /dev/null +++ b/src/ResourcesManager/ResourcesManager_Defs.hxx @@ -0,0 +1,33 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#ifndef __RESOURCESMANAGER_DEFS_HXX__ +#define __RESOURCESMANAGER_DEFS_HXX__ + +#ifdef WIN32 +# ifdef RESOURCESMANAGER_EXPORTS +# define RESOURCESMANAGER_EXPORT __declspec( dllexport ) +# else +# define RESOURCESMANAGER_EXPORT __declspec( dllimport ) +# endif +#else +# define RESOURCESMANAGER_EXPORT +#endif + +#endif // __RESOURCESMANAGER_DEFS_HXX__ diff --git a/src/ResourcesManager/SALOME_LoadRateManager.hxx b/src/ResourcesManager/SALOME_LoadRateManager.hxx index 7c4c3f03d..66a5d827c 100644 --- a/src/ResourcesManager/SALOME_LoadRateManager.hxx +++ b/src/ResourcesManager/SALOME_LoadRateManager.hxx @@ -20,23 +20,10 @@ #ifndef __SALOME_LOADRATEMANAGER_HXX__ #define __SALOME_LOADRATEMANAGER_HXX__ +#include "ResourcesManager_Defs.hxx" #include #include "SALOME_ResourcesCatalog_Parser.hxx" -#if defined RESOURCESMANAGER_EXPORTS -#if defined WIN32 -#define RESOURCESMANAGER_EXPORT __declspec( dllexport ) -#else -#define RESOURCESMANAGER_EXPORT -#endif -#else -#if defined WNT -#define RESOURCESMANAGER_EXPORT __declspec( dllimport ) -#else -#define RESOURCESMANAGER_EXPORT -#endif -#endif - class RESOURCESMANAGER_EXPORT SALOME_LoadRateManager { diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx index 7fe652fdb..f37843be1 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx @@ -27,7 +27,7 @@ //$Header$ #include "SALOME_ResourcesCatalog_Handler.hxx" -#include "OpUtil.hxx" +#include "Basics_Utils.hxx" #include #include #include "utilities.h" @@ -303,7 +303,7 @@ void SALOME_ResourcesCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) { _resources_list[_resource.HostName] = _resource; if(_resource.HostName == "localhost") - _resources_list[GetHostname()] = _resource; + _resources_list[Kernel_Utils::GetHostname()] = _resource; } } else diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.hxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.hxx index 9422c7bd1..152b5c58e 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.hxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.hxx @@ -29,6 +29,9 @@ #ifndef SALOME_RESOURCES_CATALOG_HANDLER #define SALOME_RESOURCES_CATALOG_HANDLER + +#include "ResourcesManager_Defs.hxx" + #include "SALOME_ResourcesCatalog_Parser.hxx" #include @@ -36,7 +39,7 @@ #include -class SALOME_ResourcesCatalog_Handler +class RESOURCESMANAGER_EXPORT SALOME_ResourcesCatalog_Handler { public : diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx index 901def13c..b668279e3 100755 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.hxx @@ -29,6 +29,8 @@ #ifndef SALOME_RESOURCES_CATALOG_PARSER #define SALOME_RESOURCES_CATALOG_PARSER +#include "ResourcesManager_Defs.hxx" + #include #include #include @@ -42,7 +44,7 @@ enum BatchType {none, pbs, lsf}; enum MpiImplType {indif, lam, mpich1, mpich2, openmpi, slurm}; -class ResourceDataToSort +class RESOURCESMANAGER_EXPORT ResourceDataToSort { public: @@ -70,7 +72,7 @@ class ResourceDataToSort unsigned int GetNumberOfPoints() const; }; -struct ParserResourcesType +struct RESOURCESMANAGER_EXPORT ParserResourcesType { ResourceDataToSort DataForSort; std::string HostName; diff --git a/src/ResourcesManager/SALOME_ResourcesManager.cxx b/src/ResourcesManager/SALOME_ResourcesManager.cxx index f74d0a877..345131640 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.cxx @@ -23,7 +23,7 @@ #include "OpUtil.hxx" #include -#ifndef WNT +#ifndef WIN32 #include #else #include @@ -153,14 +153,14 @@ SALOME_ResourcesManager::GetFittingResources(const Engines::MachineParameters& p p.mem_mb = params.mem_mb; vector cl; - for(int i=0;i vec = _rm.GetFittingResources(p,cl); ret->length(vec.size()); - for(int i=0;i ml; - for(int i=0;iusername = CORBA::string_dup(resource.UserName.c_str()); p_ptr->applipath = CORBA::string_dup(resource.AppliPath.c_str()); p_ptr->modList.length(resource.ModulesList.size()); - for(int i=0;imodList[i] = CORBA::string_dup(resource.ModulesList[i].c_str()); p_ptr->OS = CORBA::string_dup(resource.OS.c_str()); p_ptr->mem_mb = resource.DataForSort._memInMB; diff --git a/src/ResourcesManager/SALOME_ResourcesManager.hxx b/src/ResourcesManager/SALOME_ResourcesManager.hxx index f2fdc259b..bec75471c 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.hxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.hxx @@ -32,18 +32,15 @@ #include #include "ResourcesManager.hxx" -#if defined RESOURCESMANAGER_EXPORTS -#if defined WIN32 -#define RESOURCESMANAGER_EXPORT __declspec( dllexport ) -#else -#define RESOURCESMANAGER_EXPORT -#endif -#else -#if defined WNT -#define RESOURCESMANAGER_EXPORT __declspec( dllimport ) + +#ifdef WIN32 +# ifdef SALOMERESOURCESMANAGER_EXPORTS +# define SALOMERESOURCESMANAGER_EXPORT __declspec( dllexport ) +# else +# define SALOMERESOURCESMANAGER_EXPORT __declspec( dllimport ) +# endif #else -#define RESOURCESMANAGER_EXPORT -#endif +# define SALOMERESOURCESMANAGER_EXPORT #endif // --- WARNING --- @@ -52,7 +49,7 @@ // Only one thread should use the SALOME_ResourcesManager class in a SALOME // session. -class RESOURCESMANAGER_EXPORT SALOME_ResourcesManager: +class SALOMERESOURCESMANAGER_EXPORT SALOME_ResourcesManager: public POA_Engines::ResourcesManager, public PortableServer::RefCountServantBase { diff --git a/src/SALOMEDS/Makefile.am b/src/SALOMEDS/Makefile.am index 37686d204..2de4da2fc 100644 --- a/src/SALOMEDS/Makefile.am +++ b/src/SALOMEDS/Makefile.am @@ -285,9 +285,13 @@ bin_PROGRAMS = SALOMEDS_Server SALOMEDS_Client SALOMEDS_Server_SOURCES = SALOMEDS_Server.cxx SALOMEDS_Server_CPPFLAGS = $(COMMON_CPPFLAGS) SALOMEDS_Server_LDADD = libSalomeDS.la \ - $(HDF5_LIBS) $(CORBA_LIBS) + ../Basics/libSALOMEBasics.la \ + $(HDF5_LIBS) \ + $(CORBA_LIBS) SALOMEDS_Client_SOURCES = SALOMEDS_Client.cxx SALOMEDS_Client_CPPFLAGS = $(COMMON_CPPFLAGS) SALOMEDS_Client_LDADD = libSalomeDS.la \ - $(HDF5_LIBS) $(CORBA_LIBS) + ../Basics/libSALOMEBasics.la \ + $(HDF5_LIBS) \ + $(CORBA_LIBS) diff --git a/src/SALOMEDS/SALOMEDS.cxx b/src/SALOMEDS/SALOMEDS.cxx index 8ee2138d2..87085d3c0 100644 --- a/src/SALOMEDS/SALOMEDS.cxx +++ b/src/SALOMEDS/SALOMEDS.cxx @@ -26,18 +26,6 @@ // Module : SALOME // $Header$ -#ifdef WNT -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#else #include "SALOMEDS.hxx" #include "SALOMEDS_StudyManager.hxx" #include "SALOMEDS_Study.hxx" @@ -48,7 +36,6 @@ #include "SALOMEDSClient_IParameters.hxx" #include "SALOMEDS_IParameters.hxx" #include "SALOMEDS_StudyManager_i.hxx" -#endif #include "SALOMEDS_Defines.hxx" diff --git a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx index d3ca2e668..4cd5f3faa 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeStudyProperties.cxx @@ -59,7 +59,7 @@ std::string SALOMEDS_AttributeStudyProperties::GetUserName() SALOMEDS::Locker lock; aName = dynamic_cast(_local_impl)->GetCreatorName(); } -#ifndef WNT +#ifndef WIN32 else aName = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->GetUserName(); #else else aName = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->GetUserNameA(); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx index 41e69b8a7..c8b9aa565 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTreeNode_i.cxx @@ -64,7 +64,7 @@ SALOMEDS::AttributeTreeNode_ptr SALOMEDS_AttributeTreeNode_i::GetFather() SALOMEDS::Locker lock; SALOMEDS_AttributeTreeNode_i* aFather; aFather = new SALOMEDS_AttributeTreeNode_i(dynamic_cast(_impl)->GetFather(), _orb); -#ifndef WNT +#ifndef WIN32 return aFather->POA_SALOMEDS::AttributeTreeNode::_this(); #else return aFather->AttributeTreeNode::_this(); @@ -90,7 +90,7 @@ SALOMEDS::AttributeTreeNode_ptr SALOMEDS_AttributeTreeNode_i::GetPrevious() SALOMEDS::Locker lock; SALOMEDS_AttributeTreeNode_i* aPrevious; aPrevious=new SALOMEDS_AttributeTreeNode_i(dynamic_cast(_impl)->GetPrevious(), _orb); -#ifndef WNT +#ifndef WIN32 return aPrevious->POA_SALOMEDS::AttributeTreeNode::_this(); #else return aPrevious->AttributeTreeNode::_this(); @@ -116,7 +116,7 @@ SALOMEDS::AttributeTreeNode_ptr SALOMEDS_AttributeTreeNode_i::GetNext() SALOMEDS::Locker lock; SALOMEDS_AttributeTreeNode_i* aNext; aNext = new SALOMEDS_AttributeTreeNode_i(dynamic_cast(_impl)->GetNext(), _orb); -#ifndef WNT +#ifndef WIN32 return aNext->POA_SALOMEDS::AttributeTreeNode::_this(); #else return aNext->AttributeTreeNode::_this(); @@ -142,7 +142,7 @@ SALOMEDS::AttributeTreeNode_ptr SALOMEDS_AttributeTreeNode_i::GetFirst() SALOMEDS::Locker lock; SALOMEDS_AttributeTreeNode_i* aFirst; aFirst = new SALOMEDS_AttributeTreeNode_i(dynamic_cast(_impl)->GetFirst(), _orb); -#ifndef WNT +#ifndef WIN32 return aFirst->POA_SALOMEDS::AttributeTreeNode::_this(); #else return aFirst->AttributeTreeNode::_this(); diff --git a/src/SALOMEDS/SALOMEDS_Defines.hxx b/src/SALOMEDS/SALOMEDS_Defines.hxx index 33c4bde26..c18d742ab 100755 --- a/src/SALOMEDS/SALOMEDS_Defines.hxx +++ b/src/SALOMEDS/SALOMEDS_Defines.hxx @@ -26,22 +26,14 @@ #ifndef _SALOMEDS_Defines_HXX_ #define _SALOMEDS_Defines_HXX_ -#ifdef WNT - #if defined SALOMEDS_EXPORTS - #if defined WIN32 - #define SALOMEDS_EXPORT __declspec( dllexport ) - #else - #define SALOMEDS_EXPORT - #endif - #else - #if defined WIN32 - #define SALOMEDS_EXPORT __declspec( dllimport ) - #else - #define SALOMEDS_EXPORT - #endif - #endif +#ifdef WIN32 +# ifdef SALOMEDS_EXPORTS +# define SALOMEDS_EXPORT __declspec( dllexport ) +# else +# define SALOMEDS_EXPORT __declspec( dllimport ) +# endif #else - #define SALOMEDS_EXPORT +# define SALOMEDS_EXPORT #endif #endif diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute.cxx b/src/SALOMEDS/SALOMEDS_GenericAttribute.cxx index 56657e5b3..5fd785cf9 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute.cxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute.cxx @@ -31,6 +31,8 @@ #include "SALOMEDS_ClientAttributes.hxx" #include "SALOMEDS.hxx" +#include "Basics_Utils.hxx" + #ifdef WIN32 #include #else @@ -38,8 +40,6 @@ #include #endif -#include "OpUtil.hxx" - using namespace std; SALOMEDS_GenericAttribute::SALOMEDS_GenericAttribute(SALOMEDSImpl_GenericAttribute* theGA) @@ -57,7 +57,7 @@ SALOMEDS_GenericAttribute::SALOMEDS_GenericAttribute(SALOMEDS::GenericAttribute_ long pid = (long)getpid(); #endif - CORBA::LongLong addr = theGA->GetLocalImpl(GetHostname().c_str(), pid, _isLocal); + CORBA::LongLong addr = theGA->GetLocalImpl(Kernel_Utils::GetHostname().c_str(), pid, _isLocal); if(_isLocal) { _local_impl = reinterpret_cast(addr); _corba_impl = SALOMEDS::GenericAttribute::_nil(); diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx index 78a3006e5..9390c7f67 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx @@ -29,6 +29,7 @@ #include "SALOMEDSImpl_SObject.hxx" #include "SALOMEDSImpl_Study.hxx" #include "Utils_ExceptHandlers.hxx" +#include "Basics_Utils.hxx" #include #ifdef WIN32 @@ -38,8 +39,6 @@ #include #endif -#include "OpUtil.hxx" - using namespace std; UNEXPECT_CATCH(GALockProtection, SALOMEDS::GenericAttribute::LockProtection); @@ -79,7 +78,8 @@ char* SALOMEDS_GenericAttribute_i::Type() { SALOMEDS::Locker lock; if (_impl) { - return CORBA::string_dup(SALOMEDSImpl_GenericAttribute::Impl_GetType(_impl)); + string type = SALOMEDSImpl_GenericAttribute::Impl_GetType(_impl); + return CORBA::string_dup(type.c_str()); } return (char*)""; @@ -89,7 +89,8 @@ char* SALOMEDS_GenericAttribute_i::GetClassType() { SALOMEDS::Locker lock; if (_impl) { - return CORBA::string_dup(SALOMEDSImpl_GenericAttribute::Impl_GetClassType(_impl)); + string class_type = SALOMEDSImpl_GenericAttribute::Impl_GetClassType(_impl); + return CORBA::string_dup(class_type.c_str()); } return (char*)""; @@ -121,6 +122,6 @@ CORBA::LongLong SALOMEDS_GenericAttribute_i::GetLocalImpl(const char* theHostnam #else long pid = (long)getpid(); #endif - isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0; + isLocal = (strcmp(theHostname, Kernel_Utils::GetHostname().c_str()) == 0 && pid == thePID)?1:0; return reinterpret_cast(_impl); } diff --git a/src/SALOMEDS/SALOMEDS_SObject.cxx b/src/SALOMEDS/SALOMEDS_SObject.cxx index 2110c24dc..2aeb5400e 100644 --- a/src/SALOMEDS/SALOMEDS_SObject.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject.cxx @@ -38,6 +38,10 @@ #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" +#include "Basics_Utils.hxx" + +#include "utilities.h" + #ifdef WIN32 #include #include @@ -46,8 +50,7 @@ #include #endif -#include "OpUtil.hxx" -#include "utilities.h" + using namespace std; @@ -60,7 +63,7 @@ SALOMEDS_SObject::SALOMEDS_SObject(SALOMEDS::SObject_ptr theSObject) #endif CORBA::LongLong addr = // mpv: fix for IPAL13534: for 64-bit platforms use 8-bytes long for pointer storage - theSObject->GetLocalImpl(GetHostname().c_str(), pid, _isLocal); + theSObject->GetLocalImpl(Kernel_Utils::GetHostname().c_str(), pid, _isLocal); if(_isLocal) { _local_impl = reinterpret_cast(addr); diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.cxx b/src/SALOMEDS/SALOMEDS_SObject_i.cxx index 08eddaa70..cb70d26c6 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.cxx @@ -33,6 +33,7 @@ #include "SALOMEDSImpl_SComponent.hxx" #include "SALOMEDSImpl_Study.hxx" #include "SALOMEDSImpl_AttributeIOR.hxx" +#include "Basics_Utils.hxx" #include @@ -43,8 +44,6 @@ #include #endif -#include "OpUtil.hxx" - using namespace std; SALOMEDS::SObject_ptr SALOMEDS_SObject_i::New(const SALOMEDSImpl_SObject& theImpl, CORBA::ORB_ptr theORB) @@ -331,6 +330,6 @@ CORBA::LongLong SALOMEDS_SObject_i::GetLocalImpl(const char* theHostname, CORBA: #else long pid = (long)getpid(); #endif - isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0; + isLocal = (strcmp(theHostname, Kernel_Utils::GetHostname().c_str()) == 0 && pid == thePID)?1:0; return reinterpret_cast(_impl); } diff --git a/src/SALOMEDS/SALOMEDS_Server.cxx b/src/SALOMEDS/SALOMEDS_Server.cxx index 8ecce2d4b..c62134252 100644 --- a/src/SALOMEDS/SALOMEDS_Server.cxx +++ b/src/SALOMEDS/SALOMEDS_Server.cxx @@ -87,7 +87,7 @@ int main(int argc, char** argv) for (int i = 1; i<=NumberOfTries; i++) { if (i!=1) -#ifndef WNT +#ifndef WIN32 a=nanosleep(&ts_req,&ts_rem); #else Sleep(TIMESleep/1000000); @@ -114,7 +114,7 @@ int main(int argc, char** argv) for(int j=1; j<=NumberOfTries; j++) { if (j!=1) -#ifndef WNT +#ifndef WIN32 a=nanosleep(&ts_req, &ts_rem); #else Sleep(TIMESleep/1000000); diff --git a/src/SALOMEDS/SALOMEDS_Study.cxx b/src/SALOMEDS/SALOMEDS_Study.cxx index 3bfebc5b0..e3d3218c6 100644 --- a/src/SALOMEDS/SALOMEDS_Study.cxx +++ b/src/SALOMEDS/SALOMEDS_Study.cxx @@ -52,6 +52,8 @@ #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" +#include "Basics_Utils.hxx" + #ifdef WIN32 #include #else @@ -59,8 +61,6 @@ #include #endif -#include "OpUtil.hxx" - using namespace std; SALOMEDS_Study::SALOMEDS_Study(SALOMEDSImpl_Study* theStudy) @@ -79,7 +79,7 @@ SALOMEDS_Study::SALOMEDS_Study(SALOMEDS::Study_ptr theStudy) long pid = (long)getpid(); #endif - long addr = theStudy->GetLocalImpl(GetHostname().c_str(), pid, _isLocal); + long addr = theStudy->GetLocalImpl(Kernel_Utils::GetHostname().c_str(), pid, _isLocal); if(_isLocal) { _local_impl = reinterpret_cast(addr); _corba_impl = SALOMEDS::Study::_duplicate(theStudy); diff --git a/src/SALOMEDS/SALOMEDS_StudyManager.cxx b/src/SALOMEDS/SALOMEDS_StudyManager.cxx index edff1f88f..5740720c9 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager.cxx @@ -35,6 +35,8 @@ #include "Utils_ORB_INIT.hxx" #include "Utils_SINGLETON.hxx" +#include "Basics_Utils.hxx" + #ifdef WIN32 #include #else @@ -42,8 +44,6 @@ #include #endif -#include "OpUtil.hxx" - using namespace std; SALOMEDS_Driver_i* GetDriver(const SALOMEDSImpl_SObject& theObject, CORBA::ORB_ptr orb); @@ -57,7 +57,7 @@ SALOMEDS_StudyManager::SALOMEDS_StudyManager(SALOMEDS::StudyManager_ptr theManag long pid = (long)getpid(); #endif - CORBA::LongLong addr = theManager->GetLocalImpl(GetHostname().c_str(), pid, _isLocal); + CORBA::LongLong addr = theManager->GetLocalImpl(Kernel_Utils::GetHostname().c_str(), pid, _isLocal); if(_isLocal) { _local_impl = reinterpret_cast(addr); _corba_impl = SALOMEDS::StudyManager::_duplicate(theManager); @@ -85,7 +85,7 @@ SALOMEDS_StudyManager::SALOMEDS_StudyManager() long pid = (long)getpid(); #endif - CORBA::LongLong addr = theManager->GetLocalImpl(GetHostname().c_str(), pid, _isLocal); + CORBA::LongLong addr = theManager->GetLocalImpl(Kernel_Utils::GetHostname().c_str(), pid, _isLocal); if(_isLocal) { _local_impl = reinterpret_cast(addr); _corba_impl = SALOMEDS::StudyManager::_duplicate(theManager); diff --git a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx index d40b1d772..f2e291cec 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager_i.cxx @@ -35,11 +35,13 @@ #include "SALOMEDSImpl_AttributeIOR.hxx" #include "Utils_CorbaException.hxx" +#include "Utils_ExceptHandlers.hxx" +#include "Basics_Utils.hxx" +#include "SALOME_GenericObj_i.hh" #include #include #include -using namespace std; #ifdef WIN32 #include @@ -48,11 +50,7 @@ using namespace std; #include #endif -#include "OpUtil.hxx" - -#include "SALOME_GenericObj_i.hh" - -#include "Utils_ExceptHandlers.hxx" +using namespace std; UNEXPECT_CATCH(SalomeException,SALOME::SALOME_Exception); UNEXPECT_CATCH(LockProtection, SALOMEDS::StudyBuilder::LockProtection); @@ -157,6 +155,9 @@ SALOMEDS::Study_ptr SALOMEDS_StudyManager_i::Open(const char* aUrl) SALOMEDSImpl_Study* aStudyImpl = _impl->Open(string(aUrl)); + if ( !aStudyImpl ) + THROW_SALOME_CORBA_EXCEPTION("Impossible to Open study from file", SALOME::BAD_PARAM) + MESSAGE("Open : Creating the CORBA servant holding it... "); // Temporary aStudyUrl in place of study name @@ -475,7 +476,7 @@ CORBA::LongLong SALOMEDS_StudyManager_i::GetLocalImpl(const char* theHostname, C #else long pid = (long)getpid(); #endif - isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0; + isLocal = (strcmp(theHostname, Kernel_Utils::GetHostname().c_str()) == 0 && pid == thePID)?1:0; return reinterpret_cast(_impl); } diff --git a/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx b/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx index d837acba1..d155f3101 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager_i.hxx @@ -27,7 +27,7 @@ // std C++ headers #include -#ifndef WNT +#ifndef WIN32 #include #endif diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index 1f5f2a127..c3a86cf7a 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -43,6 +43,8 @@ #include "DF_Label.hxx" #include "DF_Attribute.hxx" +#include "Basics_Utils.hxx" + #ifdef WIN32 #include #else @@ -50,8 +52,6 @@ #include #endif -#include "OpUtil.hxx" - using namespace std; //============================================================================ @@ -704,7 +704,7 @@ void SALOMEDS_Study_i::AddCreatedPostponed(const char* theIOR) * Purpose : */ //============================================================================ -#ifndef WNT +#ifndef WIN32 void SALOMEDS_Study_i::RemovePostponed(const CORBA::Long /*theUndoLimit*/) #else void SALOMEDS_Study_i::RemovePostponed(CORBA::Long /*theUndoLimit*/) @@ -731,7 +731,7 @@ void SALOMEDS_Study_i::RemovePostponed(CORBA::Long /*theUndoLimit*/) * Purpose : */ //============================================================================ -#ifndef WNT +#ifndef WIN32 void SALOMEDS_Study_i::UndoPostponed(const CORBA::Long theWay) #else void SALOMEDS_Study_i::UndoPostponed(CORBA::Long theWay) @@ -888,6 +888,6 @@ CORBA::LongLong SALOMEDS_Study_i::GetLocalImpl(const char* theHostname, CORBA::L #else long pid = (long)getpid(); #endif - isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0; + isLocal = (strcmp(theHostname, Kernel_Utils::GetHostname().c_str()) == 0 && pid == thePID)?1:0; return reinterpret_cast(_impl); } diff --git a/src/SALOMEDS/SALOMEDS_Study_i.hxx b/src/SALOMEDS/SALOMEDS_Study_i.hxx index efb31e66e..c0965f183 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.hxx @@ -269,7 +269,7 @@ public: virtual void AddCreatedPostponed(const char* theIOR); -#ifndef WNT +#ifndef WIN32 virtual void RemovePostponed(const CORBA::Long theUndoLimit); // removes postponed IORs of old transaction // if theUndoLimit==0, removes all virtual void UndoPostponed(const CORBA::Long theWay); // theWay = 1: resurrect objects, diff --git a/src/SALOMEDS/Test/Makefile.am b/src/SALOMEDS/Test/Makefile.am index 7c765fa9f..bd6bda7d6 100644 --- a/src/SALOMEDS/Test/Makefile.am +++ b/src/SALOMEDS/Test/Makefile.am @@ -145,4 +145,5 @@ bin_PROGRAMS = TestSALOMEDS dist_TestSALOMEDS_SOURCES = TestSALOMEDS.cxx TestSALOMEDS_CPPFLAGS = $(COMMON_CPPFLAGS) TestSALOMEDS_LDADD = libSALOMEDSTest.la \ + $(RPATH)/Basics/libSALOMEBasics.la \ $(CORBA_LIBS) diff --git a/src/SALOMEDS/Test/TestSALOMEDS.cxx b/src/SALOMEDS/Test/TestSALOMEDS.cxx index 2d02b2829..0f6a00e1e 100644 --- a/src/SALOMEDS/Test/TestSALOMEDS.cxx +++ b/src/SALOMEDS/Test/TestSALOMEDS.cxx @@ -46,11 +46,13 @@ CPPUNIT_TEST_SUITE_REGISTRATION( SALOMEDSTest_Embedded ); #include "utilities.h" #include "Utils_SINGLETON.hxx" #include "Utils_ORB_INIT.hxx" -#include "OpUtil.hxx" +#include "Basics_Utils.hxx" #include "SALOME_NamingService.hxx" #include "NamingService_WaitForServerReadiness.hxx" #include "SALOMEDS_StudyManager_i.hxx" +using namespace std; + // ============================================================================ /*! * Main program source for Unit Tests with cppunit package does not depend @@ -84,9 +86,9 @@ int main(int argc, char* argv[]) sleep(15); - string host; // = GetHostname(); + string host; // = Kernel_Utils::GetHostname(); char* wait_Superv = getenv("SALOMEDS_UNITTESTS_WAIT_SUPERVISOR"); - if(wait_Superv) host = GetHostname(); + if(wait_Superv) host = Kernel_Utils::GetHostname(); SALOME_NamingService NS(orb); if(host.empty()) diff --git a/src/SALOMEDSImpl/Makefile.am b/src/SALOMEDSImpl/Makefile.am index 4ca4e58ab..de0b5f12e 100644 --- a/src/SALOMEDSImpl/Makefile.am +++ b/src/SALOMEDSImpl/Makefile.am @@ -74,6 +74,7 @@ salomeinclude_HEADERS= \ SALOMEDSImpl_Study.hxx \ SALOMEDSImpl_StudyManager.hxx \ SALOMEDSImpl_ChildNodeIterator.hxx \ + SALOMEDSImpl_Defines.hxx \ SALOMEDSImpl_IParameters.hxx \ SALOMEDSImpl_TMPFile.hxx @@ -189,6 +190,7 @@ libSalomeDSImpl_la_SOURCES =\ SALOMEDSImpl_Callback.hxx \ SALOMEDSImpl_ChildIterator.hxx \ SALOMEDSImpl_ChildNodeIterator.hxx \ + SALOMEDSImpl_Defines.hxx \ SALOMEDSImpl_Driver.hxx \ SALOMEDSImpl_GenericAttribute.hxx \ SALOMEDSImpl_SComponent.hxx \ diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx index e76570dd1..45be60a9d 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.cxx @@ -23,22 +23,20 @@ #include "SALOMEDSImpl_AttributeComment.hxx" -#ifndef WNT using namespace std; -#endif //======================================================================= //function : GetID //purpose : //======================================================================= -const std::string& SALOMEDSImpl_AttributeComment::GetID () +const string& SALOMEDSImpl_AttributeComment::GetID () { - static std::string CommentID ("7AF2F7CC-1CA2-4476-BE95-8ACC996BC7B9"); + static string CommentID ("7AF2F7CC-1CA2-4476-BE95-8ACC996BC7B9"); return CommentID; } SALOMEDSImpl_AttributeComment* SALOMEDSImpl_AttributeComment::Set (const DF_Label& L, - const std::string& Val) + const string& Val) { SALOMEDSImpl_AttributeComment* A = NULL; if (!(A=(SALOMEDSImpl_AttributeComment*)L.FindAttribute(SALOMEDSImpl_AttributeComment::GetID()))) { @@ -73,7 +71,7 @@ void SALOMEDSImpl_AttributeComment::SetValue (const string& S) //function : ID //purpose : //======================================================================= -const std::string& SALOMEDSImpl_AttributeComment::ID () const { return GetID(); } +const string& SALOMEDSImpl_AttributeComment::ID () const { return GetID(); } //======================================================================= //function : NewEmpty diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.hxx index 8f6e361b5..71f7e25e5 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeComment.hxx @@ -24,37 +24,39 @@ #ifndef _SALOMEDSImpl_AttributeComment_HeaderFile #define _SALOMEDSImpl_AttributeComment_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" +#include "SALOMEDSImpl_GenericAttribute.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" -#include "SALOMEDSImpl_GenericAttribute.hxx" #include -class SALOMEDSImpl_AttributeComment : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeComment : + public SALOMEDSImpl_GenericAttribute { private: - std::string myString; + std::string myString; public: -Standard_EXPORT static const std::string& GetID() ; + static const std::string& GetID() ; -Standard_EXPORT SALOMEDSImpl_AttributeComment() :SALOMEDSImpl_GenericAttribute("AttributeComment") {} + SALOMEDSImpl_AttributeComment() :SALOMEDSImpl_GenericAttribute("AttributeComment") {} -Standard_EXPORT static SALOMEDSImpl_AttributeComment* Set(const DF_Label& L, const std::string& Val); -Standard_EXPORT void SetValue (const std::string& S); -Standard_EXPORT std::string Value() const { return myString; } + static SALOMEDSImpl_AttributeComment* Set(const DF_Label& L, const std::string& Val); + void SetValue (const std::string& S); + std::string Value() const { return myString; } -Standard_EXPORT virtual std::string Save() { return myString; } -Standard_EXPORT virtual void Load(const std::string& theValue) { myString = theValue; } + virtual std::string Save() { return myString; } + virtual void Load(const std::string& theValue) { myString = theValue; } -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeComment() {} + ~SALOMEDSImpl_AttributeComment() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx index 70a954f43..25f8f3c9d 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.cxx @@ -23,9 +23,7 @@ #include "SALOMEDSImpl_AttributeDrawable.hxx" -#ifndef WNT using namespace std; -#endif //======================================================================= //function : GetID diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.hxx index 9fa1122e7..d1b464bfd 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeDrawable.hxx @@ -24,31 +24,33 @@ #ifndef _SALOMEDSImpl_AttributeDrawable_HeaderFile #define _SALOMEDSImpl_AttributeDrawable_HeaderFile +#include "SALOMEDSImpl_GenericAttribute.hxx" +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" -#include #include "DF_Label.hxx" -#include "SALOMEDSImpl_GenericAttribute.hxx" - -class SALOMEDSImpl_AttributeDrawable : public SALOMEDSImpl_GenericAttribute +#include + +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeDrawable : + public SALOMEDSImpl_GenericAttribute { private: -int myValue; + int myValue; public: -Standard_EXPORT virtual std::string Save() { return (myValue == 0)?(char*)"0":(char*)"1"; } -Standard_EXPORT virtual void Load(const std::string& theValue) { (theValue == "0")?myValue=0:myValue=1; } - -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeDrawable* Set(const DF_Label& label,const int value) ; - -Standard_EXPORT void SetDrawable(const int theValue); -Standard_EXPORT int IsDrawable() const { return myValue; } -Standard_EXPORT SALOMEDSImpl_AttributeDrawable(); -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeDrawable() {} + virtual std::string Save() { return (myValue == 0)?(char*)"0":(char*)"1"; } + virtual void Load(const std::string& theValue) { (theValue == "0")?myValue=0:myValue=1; } + + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeDrawable* Set(const DF_Label& label,const int value) ; + + void SetDrawable(const int theValue); + int IsDrawable() const { return myValue; } + SALOMEDSImpl_AttributeDrawable(); + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeDrawable() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx index a77d1e8c4..774abcfd2 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.cxx @@ -23,9 +23,7 @@ #include "SALOMEDSImpl_AttributeExpandable.hxx" -#ifndef WNT using namespace std; -#endif //======================================================================= //function : GetID diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.hxx index 8b80e3b39..c22b57ab6 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExpandable.hxx @@ -24,32 +24,34 @@ #ifndef _SALOMEDSImpl_AttributeExpandable_HeaderFile #define _SALOMEDSImpl_AttributeExpandable_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" +#include "SALOMEDSImpl_GenericAttribute.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" -#include -#include "SALOMEDSImpl_GenericAttribute.hxx" +#include -class SALOMEDSImpl_AttributeExpandable : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeExpandable : + public SALOMEDSImpl_GenericAttribute { private: -int myValue; + int myValue; public: -Standard_EXPORT virtual std::string Save() { return (myValue == 0)?(char*)"0":(char*)"1"; } -Standard_EXPORT virtual void Load(const std::string& theValue) { (theValue == "0")?myValue=0:myValue=1; } - -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeExpandable* Set(const DF_Label& label,const int value) ; -Standard_EXPORT SALOMEDSImpl_AttributeExpandable(); -Standard_EXPORT void SetExpandable(const int value); -Standard_EXPORT int IsExpandable() const { return myValue; } -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeExpandable() {} + virtual std::string Save() { return (myValue == 0)?(char*)"0":(char*)"1"; } + virtual void Load(const std::string& theValue) { (theValue == "0")?myValue=0:myValue=1; } + + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeExpandable* Set(const DF_Label& label,const int value) ; + SALOMEDSImpl_AttributeExpandable(); + void SetExpandable(const int value); + int IsExpandable() const { return myValue; } + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeExpandable() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExternalFileDef.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExternalFileDef.hxx index 2222717bd..ee5649952 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExternalFileDef.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeExternalFileDef.hxx @@ -21,32 +21,35 @@ #ifndef _SALOMEDSImpl_AttributeExternalFileDef_HeaderFile #define _SALOMEDSImpl_AttributeExternalFileDef_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" +#include "SALOMEDSImpl_GenericAttribute.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include -#include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeExternalFileDef : public SALOMEDSImpl_GenericAttribute + +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeExternalFileDef : + public SALOMEDSImpl_GenericAttribute { private: - std::string myString; + std::string myString; public: -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeExternalFileDef* Set(const DF_Label& label, - const std::string& Name); -Standard_EXPORT SALOMEDSImpl_AttributeExternalFileDef(); -Standard_EXPORT void SetValue(const std::string& value); -Standard_EXPORT std::string Value() const { return myString; } -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeExternalFileDef() {} - -Standard_EXPORT virtual std::string Save() { return myString; } -Standard_EXPORT virtual void Load(const std::string& theValue) { myString = theValue; } + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeExternalFileDef* Set(const DF_Label& label, + const std::string& Name); + SALOMEDSImpl_AttributeExternalFileDef(); + void SetValue(const std::string& value); + std::string Value() const { return myString; } + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeExternalFileDef() {} + + virtual std::string Save() { return myString; } + virtual void Load(const std::string& theValue) { myString = theValue; } }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFileType.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFileType.hxx index a4d61fe96..d5396bd02 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFileType.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFileType.hxx @@ -21,32 +21,35 @@ #ifndef _SALOMEDSImpl_AttributeFileType_HeaderFile #define _SALOMEDSImpl_AttributeFileType_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" +#include "SALOMEDSImpl_GenericAttribute.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include -#include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeFileType : public SALOMEDSImpl_GenericAttribute + +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeFileType : + public SALOMEDSImpl_GenericAttribute { private: - std::string myString; + std::string myString; public: -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeFileType* Set(const DF_Label& label, - const std::string& Name) ; -Standard_EXPORT SALOMEDSImpl_AttributeFileType(); -Standard_EXPORT void SetValue(const std::string& value); -Standard_EXPORT std::string Value() const { return myString; } -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeFileType() {} - -Standard_EXPORT virtual std::string Save() { return myString; } -Standard_EXPORT virtual void Load(const std::string& theValue) { myString = theValue; } + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeFileType* Set(const DF_Label& label, + const std::string& Name) ; + SALOMEDSImpl_AttributeFileType(); + void SetValue(const std::string& value); + std::string Value() const { return myString; } + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeFileType() {} + + virtual std::string Save() { return myString; } + virtual void Load(const std::string& theValue) { myString = theValue; } }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFlags.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFlags.hxx index 773df8891..353c1ed21 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFlags.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeFlags.hxx @@ -24,38 +24,37 @@ #ifndef SALOMEDSImpl_AttributeFlags_HeaderFile #define SALOMEDSImpl_AttributeFlags_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" +#include "SALOMEDSImpl_GenericAttribute.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" -#include "SALOMEDSImpl_GenericAttribute.hxx" + /* - Class : SALOMEDSImpl_AttributeFlags - Description : This class is intended for storing different object attributes that - have only two states (0 and 1). +Class : SALOMEDSImpl_AttributeFlags +Description : This class is intended for storing different object attributes that +have only two states (0 and 1). */ -#ifndef WNT -class Standard_EXPORT SALOMEDSImpl_AttributeFlags : public SALOMEDSImpl_GenericAttribute -#else -class SALOMEDSImpl_AttributeFlags : public SALOMEDSImpl_GenericAttribute -#endif +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeFlags : + public SALOMEDSImpl_GenericAttribute { private: -int myValue; + int myValue; public: -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeFlags* Set(const DF_Label&, const int theValue ); - - SALOMEDSImpl_AttributeFlags(); -Standard_EXPORT virtual ~SALOMEDSImpl_AttributeFlags(); - -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore( DF_Attribute* with ); -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste( DF_Attribute* into); -Standard_EXPORT void Set( const int ); -Standard_EXPORT int Get() const; + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeFlags* Set(const DF_Label&, const int theValue ); + + SALOMEDSImpl_AttributeFlags(); + virtual ~SALOMEDSImpl_AttributeFlags(); + + const std::string& ID() const; + void Restore( DF_Attribute* with ); + DF_Attribute* NewEmpty() const; + void Paste( DF_Attribute* into); + void Set( const int ); + int Get() const; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.hxx index 69801875a..5358b81ec 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeGraphic.hxx @@ -24,42 +24,39 @@ #ifndef SALOMEDSImpl_AttributeGraphic_HeaderFile #define SALOMEDSImpl_AttributeGraphic_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" +#include "SALOMEDSImpl_GenericAttribute.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" -#include "SALOMEDSImpl_GenericAttribute.hxx" - #include /* - Class : SALOMEDSImpl_AttributeGraphic - Description : This class is intended for storing information about - graphic representation of objects in dirrent views +Class : SALOMEDSImpl_AttributeGraphic +Description : This class is intended for storing information about +graphic representation of objects in dirrent views */ -#ifndef WNT -class Standard_EXPORT SALOMEDSImpl_AttributeGraphic : public SALOMEDSImpl_GenericAttribute -#else -class SALOMEDSImpl_AttributeGraphic : public SALOMEDSImpl_GenericAttribute -#endif +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeGraphic : + public SALOMEDSImpl_GenericAttribute { public: -Standard_EXPORT SALOMEDSImpl_AttributeGraphic(); -Standard_EXPORT ~SALOMEDSImpl_AttributeGraphic(); - -Standard_EXPORT static const std::string& GetID() ; + SALOMEDSImpl_AttributeGraphic(); + ~SALOMEDSImpl_AttributeGraphic(); + + static const std::string& GetID() ; + + void SetVisibility( const int, const bool ); + bool GetVisibility( const int ); + const std::string& ID() const; + void Restore( DF_Attribute* theWith ); + DF_Attribute* NewEmpty() const; + void Paste( DF_Attribute* theInto); -Standard_EXPORT void SetVisibility( const int, const bool ); -Standard_EXPORT bool GetVisibility( const int ); -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore( DF_Attribute* theWith ); -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste( DF_Attribute* theInto); + void SetVisibility( const std::map& ); -Standard_EXPORT void SetVisibility( const std::map& ); + const std::map& GetVisibility(); -Standard_EXPORT const std::map& GetVisibility(); - private: std::map myVisibility; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx index 866265851..ea88de4fc 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx @@ -24,9 +24,7 @@ #include "SALOMEDSImpl_AttributeIOR.hxx" #include "SALOMEDSImpl_Study.hxx" -#ifndef WNT using namespace std; -#endif //======================================================================= //function : GetID diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.hxx index eb0be83c5..8f061a033 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.hxx @@ -24,30 +24,32 @@ #ifndef _SALOMEDSImpl_AttributeIOR_HeaderFile #define _SALOMEDSImpl_AttributeIOR_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include #include "DF_Label.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeIOR : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeIOR : + public SALOMEDSImpl_GenericAttribute { private: - std::string myString; + std::string myString; public: -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeIOR* Set(const DF_Label& label, - const std::string& IOR); -Standard_EXPORT SALOMEDSImpl_AttributeIOR(); -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void SetValue(const std::string& theValue); -Standard_EXPORT std::string Value() const ; -Standard_EXPORT void Restore(DF_Attribute* with); -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeIOR() {} + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeIOR* Set(const DF_Label& label, + const std::string& IOR); + SALOMEDSImpl_AttributeIOR(); + const std::string& ID() const; + void SetValue(const std::string& theValue); + std::string Value() const ; + void Restore(DF_Attribute* with); + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeIOR() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx index ea1058ff9..e6a0fcfbb 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.cxx @@ -23,11 +23,8 @@ #include "SALOMEDSImpl_AttributeInteger.hxx" -#ifndef WNT -using namespace std; -#endif - #include +using namespace std; //======================================================================= //function : GetID diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.hxx index 94751adfa..a2a2e5753 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeInteger.hxx @@ -24,31 +24,32 @@ #ifndef _SALOMEDSImpl_AttributeInteger_HeaderFile #define _SALOMEDSImpl_AttributeInteger_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include #include "DF_Label.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeInteger : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeInteger : public SALOMEDSImpl_GenericAttribute { private: -int myValue; + int myValue; public: -Standard_EXPORT static const std::string& GetID() ; - -Standard_EXPORT SALOMEDSImpl_AttributeInteger():SALOMEDSImpl_GenericAttribute("AttributeInteger") {} -Standard_EXPORT static SALOMEDSImpl_AttributeInteger* Set (const DF_Label& L, int Val); -Standard_EXPORT void SetValue(const int theVal); -Standard_EXPORT int Value() const; -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string& theValue); - -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeInteger() {} + static const std::string& GetID() ; + + SALOMEDSImpl_AttributeInteger():SALOMEDSImpl_GenericAttribute("AttributeInteger") {} + static SALOMEDSImpl_AttributeInteger* Set (const DF_Label& L, int Val); + void SetValue(const int theVal); + int Value() const; + virtual std::string Save(); + virtual void Load(const std::string& theValue); + + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeInteger() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.hxx index 2654146b4..d44c06009 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeLocalID.hxx @@ -24,31 +24,33 @@ #ifndef _SALOMEDSImpl_AttributeLocalID_HeaderFile #define _SALOMEDSImpl_AttributeLocalID_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include #include "DF_Label.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeLocalID : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeLocalID : + public SALOMEDSImpl_GenericAttribute { private: -int myValue; + int myValue; public: -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string& theValue); - -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeLocalID* Set(const DF_Label& label,const int value) ; -Standard_EXPORT void SetValue(const int value); -Standard_EXPORT int Value() const { return myValue; } -Standard_EXPORT SALOMEDSImpl_AttributeLocalID(); -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute*); -Standard_EXPORT ~SALOMEDSImpl_AttributeLocalID() {} + virtual std::string Save(); + virtual void Load(const std::string& theValue); + + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeLocalID* Set(const DF_Label& label,const int value) ; + void SetValue(const int value); + int Value() const { return myValue; } + SALOMEDSImpl_AttributeLocalID(); + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute*); + ~SALOMEDSImpl_AttributeLocalID() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeName.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeName.hxx index 2bb858a68..2e5d0e961 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeName.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeName.hxx @@ -24,35 +24,37 @@ #ifndef _SALOMEDSImpl_AttributeName_HeaderFile #define _SALOMEDSImpl_AttributeName_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include #include "DF_Label.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeName : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeName : + public SALOMEDSImpl_GenericAttribute { private: - std::string myString; + std::string myString; public: -Standard_EXPORT static const std::string& GetID() ; + static const std::string& GetID() ; -Standard_EXPORT SALOMEDSImpl_AttributeName():SALOMEDSImpl_GenericAttribute("AttributeName") {} -Standard_EXPORT static SALOMEDSImpl_AttributeName* Set (const DF_Label& L, const std::string& Val); -Standard_EXPORT void SetValue(const std::string& theVal); -Standard_EXPORT std::string Value() const { return myString; } + SALOMEDSImpl_AttributeName():SALOMEDSImpl_GenericAttribute("AttributeName") {} + static SALOMEDSImpl_AttributeName* Set (const DF_Label& L, const std::string& Val); + void SetValue(const std::string& theVal); + std::string Value() const { return myString; } -Standard_EXPORT virtual std::string Save() { return myString; } -Standard_EXPORT virtual void Load(const std::string& theValue) { myString = theValue; } + virtual std::string Save() { return myString; } + virtual void Load(const std::string& theValue) { myString = theValue; } -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeName() {} + ~SALOMEDSImpl_AttributeName() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeOpened.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeOpened.hxx index 8efd33901..b86d496ec 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeOpened.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeOpened.hxx @@ -24,31 +24,33 @@ #ifndef _SALOMEDSImpl_AttributeOpened_HeaderFile #define _SALOMEDSImpl_AttributeOpened_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include #include "DF_Label.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeOpened : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeOpened : + public SALOMEDSImpl_GenericAttribute { private: -int myValue; + int myValue; public: -Standard_EXPORT virtual std::string Save() { return (myValue == 0)?(char*)"0":(char*)"1"; } -Standard_EXPORT virtual void Load(const std::string& theValue) { (theValue == "0")?myValue=0:myValue=1; } - -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeOpened* Set(const DF_Label& label,const int value) ; -Standard_EXPORT SALOMEDSImpl_AttributeOpened(); -Standard_EXPORT void SetOpened(const int value); -Standard_EXPORT int IsOpened() const { return myValue; } -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeOpened() {} + virtual std::string Save() { return (myValue == 0)?(char*)"0":(char*)"1"; } + virtual void Load(const std::string& theValue) { (theValue == "0")?myValue=0:myValue=1; } + + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeOpened* Set(const DF_Label& label,const int value) ; + SALOMEDSImpl_AttributeOpened(); + void SetOpened(const int value); + int IsOpened() const { return myValue; } + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeOpened() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.hxx index ecbc14ec2..f40e9bf87 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.hxx @@ -24,6 +24,7 @@ #ifndef _SALOMEDSImpl_AttributeParameter_HeaderFile #define _SALOMEDSImpl_AttributeParameter_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" @@ -35,15 +36,16 @@ enum Parameter_Types {PT_INTEGER, PT_REAL, PT_BOOLEAN, PT_STRING, PT_REALARRAY, PT_INTARRAY, PT_STRARRAY}; /*! - Class: SALOMEDSImpl_AttributeParameter - Description : AttributeParameter is a universal container of basic types +Class: SALOMEDSImpl_AttributeParameter +Description : AttributeParameter is a universal container of basic types */ -class SALOMEDSImpl_AttributeParameter : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeParameter : + public SALOMEDSImpl_GenericAttribute { private: - + std::map _ints; std::map _reals; std::map _strings; @@ -53,55 +55,54 @@ private: std::map< std::string, std::vector > _strarrays; public: - Standard_EXPORT static const std::string& GetID() ; - - Standard_EXPORT SALOMEDSImpl_AttributeParameter():SALOMEDSImpl_GenericAttribute("AttributeParameter") {} - Standard_EXPORT static SALOMEDSImpl_AttributeParameter* Set (const DF_Label& L); - - - Standard_EXPORT void SetInt(const std::string& theID, const int& theValue); - Standard_EXPORT int GetInt(const std::string& theID); - - Standard_EXPORT void SetReal(const std::string& theID, const double& theValue); - Standard_EXPORT double GetReal(const std::string& theID); - - Standard_EXPORT void SetString(const std::string& theID, const std::string& theValue); - Standard_EXPORT std::string GetString(const std::string& theID); - - Standard_EXPORT void SetBool(const std::string& theID, const bool& theValue); - Standard_EXPORT bool GetBool(const std::string& theID); - - Standard_EXPORT void SetRealArray(const std::string& theID, const std::vector& theArray); - Standard_EXPORT std::vector GetRealArray(const std::string& theID); - - Standard_EXPORT void SetIntArray(const std::string& theID, const std::vector& theArray); - Standard_EXPORT std::vector GetIntArray(const std::string& theID); - - Standard_EXPORT void SetStrArray(const std::string& theID, const std::vector& theArray); - Standard_EXPORT std::vector GetStrArray(const std::string& theID); - Standard_EXPORT bool IsSet(const std::string& theID, const Parameter_Types theType); + static const std::string& GetID() ; - Standard_EXPORT bool RemoveID(const std::string& theID, const Parameter_Types theType); - - Standard_EXPORT SALOMEDSImpl_AttributeParameter* GetFather(); - Standard_EXPORT bool HasFather(); - Standard_EXPORT bool IsRoot(); - - Standard_EXPORT std::vector GetIDs(const Parameter_Types theType); - - Standard_EXPORT void Clear(); - - Standard_EXPORT virtual std::string Save(); - Standard_EXPORT virtual void Load(const std::string& theValue); - - Standard_EXPORT const std::string& ID() const; - Standard_EXPORT void Restore(DF_Attribute* with) ; - Standard_EXPORT DF_Attribute* NewEmpty() const; - Standard_EXPORT void Paste(DF_Attribute* into); - - Standard_EXPORT ~SALOMEDSImpl_AttributeParameter() {} - + SALOMEDSImpl_AttributeParameter():SALOMEDSImpl_GenericAttribute("AttributeParameter") {} + static SALOMEDSImpl_AttributeParameter* Set (const DF_Label& L); + + void SetInt(const std::string& theID, const int& theValue); + int GetInt(const std::string& theID); + + void SetReal(const std::string& theID, const double& theValue); + double GetReal(const std::string& theID); + + void SetString(const std::string& theID, const std::string& theValue); + std::string GetString(const std::string& theID); + + void SetBool(const std::string& theID, const bool& theValue); + bool GetBool(const std::string& theID); + + void SetRealArray(const std::string& theID, const std::vector& theArray); + std::vector GetRealArray(const std::string& theID); + + void SetIntArray(const std::string& theID, const std::vector& theArray); + std::vector GetIntArray(const std::string& theID); + + void SetStrArray(const std::string& theID, const std::vector& theArray); + std::vector GetStrArray(const std::string& theID); + + bool IsSet(const std::string& theID, const Parameter_Types theType); + + bool RemoveID(const std::string& theID, const Parameter_Types theType); + + SALOMEDSImpl_AttributeParameter* GetFather(); + bool HasFather(); + bool IsRoot(); + + std::vector GetIDs(const Parameter_Types theType); + + void Clear(); + + virtual std::string Save(); + virtual void Load(const std::string& theValue); + + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + + ~SALOMEDSImpl_AttributeParameter() {} }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePersistentRef.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePersistentRef.hxx index fa95a619f..256da73eb 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePersistentRef.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePersistentRef.hxx @@ -24,33 +24,35 @@ #ifndef _SALOMEDSImpl_AttributePersistentRef_HeaderFile #define _SALOMEDSImpl_AttributePersistentRef_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include #include "DF_Label.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributePersistentRef : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributePersistentRef : + public SALOMEDSImpl_GenericAttribute { private: - std::string myString; + std::string myString; public: -Standard_EXPORT virtual std::string Save() { return myString; } -Standard_EXPORT virtual void Load(const std::string& theValue) { myString = theValue; } - -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributePersistentRef* Set(const DF_Label& label, - const std::string& value) ; -Standard_EXPORT SALOMEDSImpl_AttributePersistentRef(); -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void SetValue(const std::string& value); -Standard_EXPORT std::string Value() const { return myString; } -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributePersistentRef() {} + virtual std::string Save() { return myString; } + virtual void Load(const std::string& theValue) { myString = theValue; } + + static const std::string& GetID() ; + static SALOMEDSImpl_AttributePersistentRef* Set(const DF_Label& label, + const std::string& value) ; + SALOMEDSImpl_AttributePersistentRef(); + const std::string& ID() const; + void SetValue(const std::string& value); + std::string Value() const { return myString; } + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributePersistentRef() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePixMap.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePixMap.hxx index ac0fcbd33..feb9e67d9 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePixMap.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePixMap.hxx @@ -24,33 +24,35 @@ #ifndef _SALOMEDSImpl_AttributePixMap_HeaderFile #define _SALOMEDSImpl_AttributePixMap_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include #include "DF_Label.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributePixMap : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributePixMap : + public SALOMEDSImpl_GenericAttribute { private: - std::string myString; + std::string myString; public: -Standard_EXPORT virtual std::string Save() { return myString; } -Standard_EXPORT virtual void Load(const std::string& theValue) { myString = theValue; } - -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributePixMap* Set(const DF_Label& label, - const std::string& string) ; -Standard_EXPORT SALOMEDSImpl_AttributePixMap(); -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void SetPixMap(const std::string& value); -Standard_EXPORT std::string GetPixMap() const { return myString; } -Standard_EXPORT bool HasPixMap() const { return (myString != "None"); } -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributePixMap() {} + virtual std::string Save() { return myString; } + virtual void Load(const std::string& theValue) { myString = theValue; } + + static const std::string& GetID() ; + static SALOMEDSImpl_AttributePixMap* Set(const DF_Label& label, + const std::string& string) ; + SALOMEDSImpl_AttributePixMap(); + const std::string& ID() const; + void SetPixMap(const std::string& value); + std::string GetPixMap() const { return myString; } + bool HasPixMap() const { return (myString != "None"); } + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributePixMap() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.hxx index bda55e4fa..b9c105e50 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributePythonObject.hxx @@ -24,6 +24,7 @@ #ifndef _SALOMEDSImpl_AttributePythonObject_HeaderFile #define _SALOMEDSImpl_AttributePythonObject_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include @@ -33,30 +34,31 @@ #undef GetObject #endif -class SALOMEDSImpl_AttributePythonObject : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributePythonObject : + public SALOMEDSImpl_GenericAttribute { public: -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string&); - -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributePythonObject* Set(const DF_Label& label) ; -Standard_EXPORT SALOMEDSImpl_AttributePythonObject(); -Standard_EXPORT void SetObject(const std::string& theSequence, const bool theScript) ; -Standard_EXPORT std::string GetObject() const; -Standard_EXPORT bool IsScript() const; -Standard_EXPORT int GetLength() const; -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributePythonObject() {} + virtual std::string Save(); + virtual void Load(const std::string&); + + static const std::string& GetID() ; + static SALOMEDSImpl_AttributePythonObject* Set(const DF_Label& label) ; + SALOMEDSImpl_AttributePythonObject(); + void SetObject(const std::string& theSequence, const bool theScript) ; + std::string GetObject() const; + bool IsScript() const; + int GetLength() const; + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributePythonObject() {} private: -std::string mySequence; -bool myIsScript; + std::string mySequence; + bool myIsScript; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReal.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReal.hxx index 488f3bfe8..93bdba112 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReal.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReal.hxx @@ -24,31 +24,33 @@ #ifndef _SALOMEDSImpl_AttributeReal_HeaderFile #define _SALOMEDSImpl_AttributeReal_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include #include "DF_Label.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeReal : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeReal : + public SALOMEDSImpl_GenericAttribute { private: double myValue; public: -Standard_EXPORT static const std::string& GetID() ; + static const std::string& GetID() ; -Standard_EXPORT SALOMEDSImpl_AttributeReal():SALOMEDSImpl_GenericAttribute("AttributeReal") {} -Standard_EXPORT static SALOMEDSImpl_AttributeReal* Set (const DF_Label& L, const double& Val); -Standard_EXPORT void SetValue(const double& theVal); -Standard_EXPORT double Value() const { return myValue; } -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string& theValue); + SALOMEDSImpl_AttributeReal():SALOMEDSImpl_GenericAttribute("AttributeReal") {} + static SALOMEDSImpl_AttributeReal* Set (const DF_Label& L, const double& Val); + void SetValue(const double& theVal); + double Value() const { return myValue; } + virtual std::string Save(); + virtual void Load(const std::string& theValue); -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeReal() {} + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeReal() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReference.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReference.hxx index 4c69dee7b..f1e78ad64 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReference.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeReference.hxx @@ -24,33 +24,35 @@ #ifndef _SALOMEDSImpl_AttributeReference_HeaderFile #define _SALOMEDSImpl_AttributeReference_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeReference : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeReference : + public SALOMEDSImpl_GenericAttribute { private: - DF_Label myLabel; + DF_Label myLabel; public: -Standard_EXPORT static const std::string& GetID() ; + static const std::string& GetID() ; -Standard_EXPORT SALOMEDSImpl_AttributeReference():SALOMEDSImpl_GenericAttribute("AttributeReference") {} -Standard_EXPORT static SALOMEDSImpl_AttributeReference* Set(const DF_Label& theLabel, const DF_Label& theRefLabel); -Standard_EXPORT void Set(const DF_Label& theLabel); -Standard_EXPORT DF_Label Get() const { return myLabel; } -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string& theValue); + SALOMEDSImpl_AttributeReference():SALOMEDSImpl_GenericAttribute("AttributeReference") {} + static SALOMEDSImpl_AttributeReference* Set(const DF_Label& theLabel, const DF_Label& theRefLabel); + void Set(const DF_Label& theLabel); + DF_Label Get() const { return myLabel; } + virtual std::string Save(); + virtual void Load(const std::string& theValue); -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeReference() {} + ~SALOMEDSImpl_AttributeReference() {} }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSelectable.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSelectable.hxx index dfdc71871..56d5fa750 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSelectable.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSelectable.hxx @@ -24,31 +24,33 @@ #ifndef _SALOMEDSImpl_AttributeSelectable_HeaderFile #define _SALOMEDSImpl_AttributeSelectable_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeSelectable : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeSelectable : + public SALOMEDSImpl_GenericAttribute { private: -int myValue; + int myValue; public: -Standard_EXPORT virtual std::string Save() { return (myValue == 0)?(char*)"0":(char*)"1"; } -Standard_EXPORT virtual void Load(const std::string& theValue) { (theValue == "0")?myValue=0:myValue=1; } - -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeSelectable* Set(const DF_Label& label,const int value) ; -Standard_EXPORT SALOMEDSImpl_AttributeSelectable(); -Standard_EXPORT void SetSelectable(const int value); -Standard_EXPORT int IsSelectable() const { return myValue; } -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeSelectable() {} + virtual std::string Save() { return (myValue == 0)?(char*)"0":(char*)"1"; } + virtual void Load(const std::string& theValue) { (theValue == "0")?myValue=0:myValue=1; } + + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeSelectable* Set(const DF_Label& label,const int value) ; + SALOMEDSImpl_AttributeSelectable(); + void SetSelectable(const int value); + int IsSelectable() const { return myValue; } + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeSelectable() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfInteger.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfInteger.hxx index f1f935b4d..7c0f5cb83 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfInteger.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfInteger.hxx @@ -24,38 +24,40 @@ #ifndef _SALOMEDSImpl_AttributeSequenceOfInteger_HeaderFile #define _SALOMEDSImpl_AttributeSequenceOfInteger_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include #include #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeSequenceOfInteger : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeSequenceOfInteger : + public SALOMEDSImpl_GenericAttribute { public: -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string&); - -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeSequenceOfInteger* Set(const DF_Label& label) ; -Standard_EXPORT SALOMEDSImpl_AttributeSequenceOfInteger(); -Standard_EXPORT void Assign(const std::vector& other) ; -Standard_EXPORT void ChangeValue(const int Index,const int Value) ; -Standard_EXPORT void Add(const int value) ; -Standard_EXPORT int Value(const int Index) ; -Standard_EXPORT void Remove(const int Index) ; -Standard_EXPORT int Length() ; -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeSequenceOfInteger() {} -Standard_EXPORT const std::vector& Array() { return myValue; } + virtual std::string Save(); + virtual void Load(const std::string&); + + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeSequenceOfInteger* Set(const DF_Label& label) ; + SALOMEDSImpl_AttributeSequenceOfInteger(); + void Assign(const std::vector& other) ; + void ChangeValue(const int Index,const int Value) ; + void Add(const int value) ; + int Value(const int Index) ; + void Remove(const int Index) ; + int Length() ; + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeSequenceOfInteger() {} + const std::vector& Array() { return myValue; } private: -std::vector myValue; + std::vector myValue; }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfReal.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfReal.hxx index 10ebdf846..91f0a7c68 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfReal.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeSequenceOfReal.hxx @@ -24,6 +24,7 @@ #ifndef _SALOMEDSImpl_AttributeSequenceOfReal_HeaderFile #define _SALOMEDSImpl_AttributeSequenceOfReal_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include @@ -31,32 +32,33 @@ #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeSequenceOfReal : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeSequenceOfReal : + public SALOMEDSImpl_GenericAttribute { public: -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string&); - -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeSequenceOfReal* Set(const DF_Label& label) ; -Standard_EXPORT SALOMEDSImpl_AttributeSequenceOfReal(); -Standard_EXPORT void Assign(const std::vector& other) ; -Standard_EXPORT void ChangeValue(const int Index,const double& Value) ; -Standard_EXPORT void Add(const double& Value) ; -Standard_EXPORT double Value(const int Index) ; -Standard_EXPORT void Remove(const int Index) ; -Standard_EXPORT int Length() ; -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeSequenceOfReal() {} -Standard_EXPORT const std::vector& Array() { return myValue; } + virtual std::string Save(); + virtual void Load(const std::string&); + + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeSequenceOfReal* Set(const DF_Label& label) ; + SALOMEDSImpl_AttributeSequenceOfReal(); + void Assign(const std::vector& other) ; + void ChangeValue(const int Index,const double& Value) ; + void Add(const double& Value) ; + double Value(const int Index) ; + void Remove(const int Index) ; + int Length() ; + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeSequenceOfReal() {} + const std::vector& Array() { return myValue; } private: -std::vector myValue; + std::vector myValue; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeString.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeString.cxx index 9bdc26b23..2ac9acf90 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeString.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeString.cxx @@ -23,9 +23,7 @@ #include "SALOMEDSImpl_AttributeString.hxx" -#ifndef WNT using namespace std; -#endif //======================================================================= //function : GetID diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx index c520bce61..3cf59dfb3 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.hxx @@ -24,77 +24,78 @@ #ifndef _SALOMEDSImpl_AttributeStudyProperties_HeaderFile #define _SALOMEDSImpl_AttributeStudyProperties_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include #include #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeStudyProperties : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeStudyProperties : public SALOMEDSImpl_GenericAttribute { public: -Standard_EXPORT SALOMEDSImpl_AttributeStudyProperties(); -Standard_EXPORT ~SALOMEDSImpl_AttributeStudyProperties() {} + SALOMEDSImpl_AttributeStudyProperties(); + ~SALOMEDSImpl_AttributeStudyProperties() {} -Standard_EXPORT static const std::string& GetID(); -Standard_EXPORT const std::string& ID() const; + static const std::string& GetID(); + const std::string& ID() const; -Standard_EXPORT static SALOMEDSImpl_AttributeStudyProperties* Set(const DF_Label& label); + static SALOMEDSImpl_AttributeStudyProperties* Set(const DF_Label& label); -Standard_EXPORT void Init(); + void Init(); -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string&); + virtual std::string Save(); + virtual void Load(const std::string&); -Standard_EXPORT void SetModification(const std::string& theUserName, - const int theMinute, - const int theHour, - const int theDay, - const int theMonth, - const int theYear); -Standard_EXPORT void GetModifications(std::vector& theUserNames, - std::vector& theMinutes, - std::vector& theHours, - std::vector& theDays, - std::vector& theMonths, - std::vector& theYears) const; + void SetModification(const std::string& theUserName, + const int theMinute, + const int theHour, + const int theDay, + const int theMonth, + const int theYear); + void GetModifications(std::vector& theUserNames, + std::vector& theMinutes, + std::vector& theHours, + std::vector& theDays, + std::vector& theMonths, + std::vector& theYears) const; -Standard_EXPORT std::string GetCreatorName() const; -Standard_EXPORT bool GetCreationDate(int& theMinute, - int& theHour, - int& theDay, - int& theMonth, - int& theYear) const; + std::string GetCreatorName() const; + bool GetCreationDate(int& theMinute, + int& theHour, + int& theDay, + int& theMonth, + int& theYear) const; -Standard_EXPORT void ChangeCreatorName(const std::string& theUserName); + void ChangeCreatorName(const std::string& theUserName); -Standard_EXPORT void SetCreationMode(const int theMode); -Standard_EXPORT int GetCreationMode() const; + void SetCreationMode(const int theMode); + int GetCreationMode() const; -Standard_EXPORT void SetModified(const int theModified); -Standard_EXPORT bool IsModified() const; -Standard_EXPORT int GetModified() const; + void SetModified(const int theModified); + bool IsModified() const; + int GetModified() const; -Standard_EXPORT void SetLocked(const bool theLocked); -Standard_EXPORT bool IsLocked() const; -Standard_EXPORT bool IsLockChanged(const bool theErase); + void SetLocked(const bool theLocked); + bool IsLocked() const; + bool IsLockChanged(const bool theErase); -Standard_EXPORT void Restore(DF_Attribute* with); -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); + void Restore(DF_Attribute* with); + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); private: -std::vector myUserName; -std::vector myMinute; -std::vector myHour; -std::vector myDay; -std::vector myMonth; -std::vector myYear; -int myMode; -int myModified; -bool myLocked; -bool myLockChanged; + std::vector myUserName; + std::vector myMinute; + std::vector myHour; + std::vector myDay; + std::vector myMonth; + std::vector myYear; + int myMode; + int myModified; + bool myLocked; + bool myLockChanged; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.hxx index 84434df7b..b89383513 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.hxx @@ -11,6 +11,7 @@ #ifndef _SALOMEDSImpl_AttributeTableOfInteger_HeaderFile #define _SALOMEDSImpl_AttributeTableOfInteger_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" @@ -20,58 +21,59 @@ #include -class SALOMEDSImpl_AttributeTableOfInteger : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTableOfInteger : + public SALOMEDSImpl_GenericAttribute { public: -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string&); -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeTableOfInteger* Set(const DF_Label& label) ; -Standard_EXPORT SALOMEDSImpl_AttributeTableOfInteger(); -Standard_EXPORT void SetNbColumns(const int theNbColumns); -Standard_EXPORT void SetTitle(const std::string& theTitle) ; -Standard_EXPORT std::string GetTitle() const; -Standard_EXPORT void SetRowData(const int theRow,const std::vector& theData) ; -Standard_EXPORT std::vector GetRowData(const int theRow) ; -Standard_EXPORT void SetRowTitle(const int theRow,const std::string& theTitle) ; -Standard_EXPORT void SetRowUnit(const int theRow,const std::string& theUnit) ; -Standard_EXPORT std::string GetRowUnit(const int theRow) const; -Standard_EXPORT void SetRowUnits(const std::vector& theUnits) ; -Standard_EXPORT std::vector GetRowUnits(); -Standard_EXPORT void SetRowTitles(const std::vector& theTitles) ; -Standard_EXPORT std::vector GetRowTitles(); -Standard_EXPORT std::string GetRowTitle(const int theRow) const; -Standard_EXPORT void SetColumnData(const int theColumn,const std::vector& theData) ; -Standard_EXPORT std::vector GetColumnData(const int theColumn) ; -Standard_EXPORT void SetColumnTitle(const int theColumn,const std::string& theTitle) ; -Standard_EXPORT std::string GetColumnTitle(const int theColumn) const; -Standard_EXPORT void SetColumnTitles(const std::vector& theTitles); -Standard_EXPORT std::vector GetColumnTitles(); -Standard_EXPORT int GetNbRows() const; -Standard_EXPORT int GetNbColumns() const; + virtual std::string Save(); + virtual void Load(const std::string&); + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeTableOfInteger* Set(const DF_Label& label) ; + SALOMEDSImpl_AttributeTableOfInteger(); + void SetNbColumns(const int theNbColumns); + void SetTitle(const std::string& theTitle) ; + std::string GetTitle() const; + void SetRowData(const int theRow,const std::vector& theData) ; + std::vector GetRowData(const int theRow) ; + void SetRowTitle(const int theRow,const std::string& theTitle) ; + void SetRowUnit(const int theRow,const std::string& theUnit) ; + std::string GetRowUnit(const int theRow) const; + void SetRowUnits(const std::vector& theUnits) ; + std::vector GetRowUnits(); + void SetRowTitles(const std::vector& theTitles) ; + std::vector GetRowTitles(); + std::string GetRowTitle(const int theRow) const; + void SetColumnData(const int theColumn,const std::vector& theData) ; + std::vector GetColumnData(const int theColumn) ; + void SetColumnTitle(const int theColumn,const std::string& theTitle) ; + std::string GetColumnTitle(const int theColumn) const; + void SetColumnTitles(const std::vector& theTitles); + std::vector GetColumnTitles(); + int GetNbRows() const; + int GetNbColumns() const; -Standard_EXPORT void PutValue(const int theValue,const int theRow,const int theColumn) ; -Standard_EXPORT bool HasValue(const int theRow,const int theColumn) ; -Standard_EXPORT int GetValue(const int theRow,const int theColumn) ; -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); + void PutValue(const int theValue,const int theRow,const int theColumn) ; + bool HasValue(const int theRow,const int theColumn) ; + int GetValue(const int theRow,const int theColumn) ; + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); -Standard_EXPORT std::vector GetSetRowIndices(const int theRow); -Standard_EXPORT std::vector GetSetColumnIndices(const int theColumn); + std::vector GetSetRowIndices(const int theRow); + std::vector GetSetColumnIndices(const int theColumn); -Standard_EXPORT ~SALOMEDSImpl_AttributeTableOfInteger() {} + ~SALOMEDSImpl_AttributeTableOfInteger() {} private: -std::map myTable; -std::string myTitle; -std::vector myRows; -std::vector myCols; -int myNbRows; -int myNbColumns; + std::map myTable; + std::string myTitle; + std::vector myRows; + std::vector myCols; + int myNbRows; + int myNbColumns; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.hxx index 3dea7567d..672a26e5b 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.hxx @@ -11,6 +11,7 @@ #ifndef _SALOMEDSImpl_AttributeTableOfReal_HeaderFile #define _SALOMEDSImpl_AttributeTableOfReal_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" @@ -19,57 +20,58 @@ #include #include -class SALOMEDSImpl_AttributeTableOfReal : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTableOfReal : + public SALOMEDSImpl_GenericAttribute { public: -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string&); -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeTableOfReal* Set(const DF_Label& label) ; -Standard_EXPORT SALOMEDSImpl_AttributeTableOfReal(); -Standard_EXPORT void SetNbColumns(const int theNbColumns); -Standard_EXPORT void SetTitle(const std::string& theTitle) ; -Standard_EXPORT std::string GetTitle() const; -Standard_EXPORT void SetRowData(const int theRow,const std::vector& theData) ; -Standard_EXPORT std::vector GetRowData(const int theRow) ; -Standard_EXPORT void SetRowTitle(const int theRow,const std::string& theTitle) ; -Standard_EXPORT void SetRowUnit(const int theRow,const std::string& theUnit) ; -Standard_EXPORT std::string GetRowUnit(const int theRow) const; -Standard_EXPORT void SetRowUnits(const std::vector& theUnits) ; -Standard_EXPORT std::vector GetRowUnits(); -Standard_EXPORT void SetRowTitles(const std::vector& theTitles) ; -Standard_EXPORT std::vector GetRowTitles(); -Standard_EXPORT std::string GetRowTitle(const int theRow) const; -Standard_EXPORT void SetColumnData(const int theColumn,const std::vector& theData) ; -Standard_EXPORT std::vector GetColumnData(const int theColumn) ; -Standard_EXPORT void SetColumnTitle(const int theColumn,const std::string& theTitle) ; -Standard_EXPORT void SetColumnTitles(const std::vector& theTitles); -Standard_EXPORT std::vector GetColumnTitles(); -Standard_EXPORT std::string GetColumnTitle(const int theColumn) const; -Standard_EXPORT int GetNbRows() const; -Standard_EXPORT int GetNbColumns() const; + virtual std::string Save(); + virtual void Load(const std::string&); + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeTableOfReal* Set(const DF_Label& label) ; + SALOMEDSImpl_AttributeTableOfReal(); + void SetNbColumns(const int theNbColumns); + void SetTitle(const std::string& theTitle) ; + std::string GetTitle() const; + void SetRowData(const int theRow,const std::vector& theData) ; + std::vector GetRowData(const int theRow) ; + void SetRowTitle(const int theRow,const std::string& theTitle) ; + void SetRowUnit(const int theRow,const std::string& theUnit) ; + std::string GetRowUnit(const int theRow) const; + void SetRowUnits(const std::vector& theUnits) ; + std::vector GetRowUnits(); + void SetRowTitles(const std::vector& theTitles) ; + std::vector GetRowTitles(); + std::string GetRowTitle(const int theRow) const; + void SetColumnData(const int theColumn,const std::vector& theData) ; + std::vector GetColumnData(const int theColumn) ; + void SetColumnTitle(const int theColumn,const std::string& theTitle) ; + void SetColumnTitles(const std::vector& theTitles); + std::vector GetColumnTitles(); + std::string GetColumnTitle(const int theColumn) const; + int GetNbRows() const; + int GetNbColumns() const; -Standard_EXPORT void PutValue(const double& theValue,const int theRow,const int theColumn) ; -Standard_EXPORT bool HasValue(const int theRow,const int theColumn) ; -Standard_EXPORT double GetValue(const int theRow,const int theColumn) ; -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); + void PutValue(const double& theValue,const int theRow,const int theColumn) ; + bool HasValue(const int theRow,const int theColumn) ; + double GetValue(const int theRow,const int theColumn) ; + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); -Standard_EXPORT std::vector GetSetRowIndices(const int theRow); -Standard_EXPORT std::vector GetSetColumnIndices(const int theColumn); + std::vector GetSetRowIndices(const int theRow); + std::vector GetSetColumnIndices(const int theColumn); -Standard_EXPORT ~SALOMEDSImpl_AttributeTableOfReal() {} + ~SALOMEDSImpl_AttributeTableOfReal() {} private: -std::map myTable; -std::string myTitle; -std::vector myRows; -std::vector myCols; -int myNbRows; -int myNbColumns; + std::map myTable; + std::string myTitle; + std::vector myRows; + std::vector myCols; + int myNbRows; + int myNbColumns; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.hxx index 0a4da3185..f30caa8a3 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.hxx @@ -11,6 +11,7 @@ #ifndef _SALOMEDSImpl_AttributeTableOfString_HeaderFile #define _SALOMEDSImpl_AttributeTableOfString_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Label.hxx" #include "DF_Attribute.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" @@ -19,58 +20,59 @@ #include #include -class SALOMEDSImpl_AttributeTableOfString : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTableOfString : + public SALOMEDSImpl_GenericAttribute { public: -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string&); -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeTableOfString* Set(const DF_Label& label) ; -Standard_EXPORT SALOMEDSImpl_AttributeTableOfString(); -Standard_EXPORT void SetNbColumns(const int theNbColumns); -Standard_EXPORT void SetTitle(const std::string& theTitle) ; -Standard_EXPORT std::string GetTitle() const; -Standard_EXPORT void SetRowData(const int theRow,const std::vector& theData) ; -Standard_EXPORT std::vector GetRowData(const int theRow) ; -Standard_EXPORT void SetRowTitle(const int theRow,const std::string& theTitle) ; -Standard_EXPORT void SetRowUnit(const int theRow,const std::string& theUnit) ; -Standard_EXPORT std::string GetRowUnit(const int theRow) const; -Standard_EXPORT void SetRowUnits(const std::vector& theUnits) ; -Standard_EXPORT std::vector GetRowUnits(); -Standard_EXPORT void SetRowTitles(const std::vector& theTitles) ; -Standard_EXPORT std::vector GetRowTitles(); -Standard_EXPORT std::string GetRowTitle(const int theRow) const; -Standard_EXPORT void SetColumnData(const int theColumn,const std::vector& theData) ; -Standard_EXPORT std::vector GetColumnData(const int theColumn) ; -Standard_EXPORT void SetColumnTitle(const int theColumn,const std::string& theTitle) ; -Standard_EXPORT std::string GetColumnTitle(const int theColumn) const; -Standard_EXPORT void SetColumnTitles(const std::vector& theTitles); -Standard_EXPORT std::vector GetColumnTitles(); -Standard_EXPORT int GetNbRows() const; -Standard_EXPORT int GetNbColumns() const; + virtual std::string Save(); + virtual void Load(const std::string&); + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeTableOfString* Set(const DF_Label& label) ; + SALOMEDSImpl_AttributeTableOfString(); + void SetNbColumns(const int theNbColumns); + void SetTitle(const std::string& theTitle) ; + std::string GetTitle() const; + void SetRowData(const int theRow,const std::vector& theData) ; + std::vector GetRowData(const int theRow) ; + void SetRowTitle(const int theRow,const std::string& theTitle) ; + void SetRowUnit(const int theRow,const std::string& theUnit) ; + std::string GetRowUnit(const int theRow) const; + void SetRowUnits(const std::vector& theUnits) ; + std::vector GetRowUnits(); + void SetRowTitles(const std::vector& theTitles) ; + std::vector GetRowTitles(); + std::string GetRowTitle(const int theRow) const; + void SetColumnData(const int theColumn,const std::vector& theData) ; + std::vector GetColumnData(const int theColumn) ; + void SetColumnTitle(const int theColumn,const std::string& theTitle) ; + std::string GetColumnTitle(const int theColumn) const; + void SetColumnTitles(const std::vector& theTitles); + std::vector GetColumnTitles(); + int GetNbRows() const; + int GetNbColumns() const; -Standard_EXPORT void PutValue(const std::string& theValue,const int theRow,const int theColumn) ; -Standard_EXPORT bool HasValue(const int theRow,const int theColumn) ; -Standard_EXPORT std::string GetValue(const int theRow,const int theColumn) ; -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); + void PutValue(const std::string& theValue,const int theRow,const int theColumn) ; + bool HasValue(const int theRow,const int theColumn) ; + std::string GetValue(const int theRow,const int theColumn) ; + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); -Standard_EXPORT std::vector GetSetRowIndices(const int theRow); -Standard_EXPORT std::vector GetSetColumnIndices(const int theColumn); + std::vector GetSetRowIndices(const int theRow); + std::vector GetSetColumnIndices(const int theColumn); -Standard_EXPORT ~SALOMEDSImpl_AttributeTableOfString() {} + ~SALOMEDSImpl_AttributeTableOfString() {} private: -std::map myTable; -std::string myTitle; -std::vector myRows; -std::vector myCols; -int myNbRows; -int myNbColumns; + std::map myTable; + std::string myTitle; + std::vector myRows; + std::vector myCols; + int myNbRows; + int myNbColumns; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTarget.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTarget.hxx index 5c4bb4f71..ea3663759 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTarget.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTarget.hxx @@ -24,33 +24,35 @@ #ifndef _SALOMEDSImpl_AttributeTarget_HeaderFile #define _SALOMEDSImpl_AttributeTarget_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include #include "SALOMEDSImpl_GenericAttribute.hxx" #include "SALOMEDSImpl_SObject.hxx" -class SALOMEDSImpl_AttributeTarget : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTarget : + public SALOMEDSImpl_GenericAttribute { private: -std::string myRelation; -std::vector myVariables; + std::string myRelation; + std::vector myVariables; public: -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT static SALOMEDSImpl_AttributeTarget* Set(const DF_Label& label) ; -Standard_EXPORT SALOMEDSImpl_AttributeTarget(); -Standard_EXPORT void Add(const SALOMEDSImpl_SObject& theSO); -Standard_EXPORT std::vector Get(); -Standard_EXPORT void Remove(const SALOMEDSImpl_SObject& theSO); -Standard_EXPORT std::string GetRelation() { return myRelation; } -Standard_EXPORT void SetRelation(const std::string& theRelation); -Standard_EXPORT std::vector& GetVariables() { return myVariables; } -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeTarget() {} + static const std::string& GetID() ; + static SALOMEDSImpl_AttributeTarget* Set(const DF_Label& label) ; + SALOMEDSImpl_AttributeTarget(); + void Add(const SALOMEDSImpl_SObject& theSO); + std::vector Get(); + void Remove(const SALOMEDSImpl_SObject& theSO); + std::string GetRelation() { return myRelation; } + void SetRelation(const std::string& theRelation); + std::vector& GetVariables() { return myVariables; } + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeTarget() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextColor.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextColor.hxx index a0e9f50d7..477cda6c1 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextColor.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextColor.hxx @@ -24,30 +24,32 @@ #ifndef _SALOMEDSImpl_AttributeTextColor_HeaderFile #define _SALOMEDSImpl_AttributeTextColor_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include #include #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeTextColor : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTextColor : + public SALOMEDSImpl_GenericAttribute { private: std::vector myValue; public: -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string&); -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT SALOMEDSImpl_AttributeTextColor(); -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void SetTextColor(const double& R, const double& G, const double& B); -Standard_EXPORT std::vector TextColor(); -Standard_EXPORT void ChangeArray(const std::vector& newArray); -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste( DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeTextColor() {} + virtual std::string Save(); + virtual void Load(const std::string&); + static const std::string& GetID() ; + SALOMEDSImpl_AttributeTextColor(); + const std::string& ID() const; + void SetTextColor(const double& R, const double& G, const double& B); + std::vector TextColor(); + void ChangeArray(const std::vector& newArray); + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste( DF_Attribute* into); + ~SALOMEDSImpl_AttributeTextColor() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextHighlightColor.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextHighlightColor.hxx index d17e7f29c..017af2394 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextHighlightColor.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTextHighlightColor.hxx @@ -24,6 +24,7 @@ #ifndef _SALOMEDSImpl_AttributeTextHighlightColor_HeaderFile #define _SALOMEDSImpl_AttributeTextHighlightColor_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include @@ -31,24 +32,25 @@ #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeTextHighlightColor : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTextHighlightColor : + public SALOMEDSImpl_GenericAttribute { private: std::vector myValue; public: -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string&); -Standard_EXPORT static const std::string& GetID() ; -Standard_EXPORT SALOMEDSImpl_AttributeTextHighlightColor(); -Standard_EXPORT void SetTextHighlightColor(const double& R, const double& G, const double& B); -Standard_EXPORT std::vector TextHighlightColor(); -Standard_EXPORT void ChangeArray(const std::vector& newArray); -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeTextHighlightColor() {} + virtual std::string Save(); + virtual void Load(const std::string&); + static const std::string& GetID() ; + SALOMEDSImpl_AttributeTextHighlightColor(); + void SetTextHighlightColor(const double& R, const double& G, const double& B); + std::vector TextHighlightColor(); + void ChangeArray(const std::vector& newArray); + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeTextHighlightColor() {} }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.hxx index 88d6a6b0d..8555b1bb0 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.hxx @@ -24,71 +24,73 @@ #ifndef _SALOMEDSImpl_AttributeTreeNode_HeaderFile #define _SALOMEDSImpl_AttributeTreeNode_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeTreeNode : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTreeNode : + public SALOMEDSImpl_GenericAttribute { public: -Standard_EXPORT const static std::string& GetDefaultTreeID(); -Standard_EXPORT static SALOMEDSImpl_AttributeTreeNode* Set(const DF_Label& L, const std::string& ID); - -Standard_EXPORT SALOMEDSImpl_AttributeTreeNode(); -Standard_EXPORT void SetFather(const SALOMEDSImpl_AttributeTreeNode* value); -Standard_EXPORT void SetPrevious(const SALOMEDSImpl_AttributeTreeNode* value); -Standard_EXPORT void SetNext(const SALOMEDSImpl_AttributeTreeNode* value); -Standard_EXPORT void SetFirst(const SALOMEDSImpl_AttributeTreeNode* value); -Standard_EXPORT void SetTreeID(const std::string& value); - -Standard_EXPORT bool Append(SALOMEDSImpl_AttributeTreeNode* value); -Standard_EXPORT bool Prepend(SALOMEDSImpl_AttributeTreeNode* value); -Standard_EXPORT bool Remove(); -Standard_EXPORT bool InsertBefore(SALOMEDSImpl_AttributeTreeNode* value); -Standard_EXPORT bool InsertAfter(SALOMEDSImpl_AttributeTreeNode* value); - -Standard_EXPORT SALOMEDSImpl_AttributeTreeNode* GetFather() const { return myFather; } -Standard_EXPORT SALOMEDSImpl_AttributeTreeNode* GetPrevious() const { return myPrevious; } -Standard_EXPORT SALOMEDSImpl_AttributeTreeNode* GetNext() const { return myNext; } -Standard_EXPORT SALOMEDSImpl_AttributeTreeNode* GetFirst() const { return myFirst; } - -Standard_EXPORT bool HasFather() { return (myFather); } -Standard_EXPORT bool HasPrevious() { return (myPrevious); } -Standard_EXPORT bool HasNext() {return (myNext); } -Standard_EXPORT bool HasFirst() { return (myFirst); } -Standard_EXPORT const std::string& GetTreeID() { return ID(); } -Standard_EXPORT int Depth() const; -Standard_EXPORT bool IsRoot() const ; -Standard_EXPORT SALOMEDSImpl_AttributeTreeNode* Root() const; -Standard_EXPORT bool IsAscendant (const SALOMEDSImpl_AttributeTreeNode* ofTN) const; -Standard_EXPORT bool IsDescendant(const SALOMEDSImpl_AttributeTreeNode* value) const; -Standard_EXPORT bool IsFather(const SALOMEDSImpl_AttributeTreeNode* value) const; -Standard_EXPORT bool IsChild(const SALOMEDSImpl_AttributeTreeNode* value) const; - -Standard_EXPORT virtual std::string Save(); -Standard_EXPORT virtual void Load(const std::string&); -Standard_EXPORT virtual std::string Type(); - -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT ~SALOMEDSImpl_AttributeTreeNode() {;} - -Standard_EXPORT virtual void AfterAddition(); -Standard_EXPORT virtual void BeforeForget(); + const static std::string& GetDefaultTreeID(); + static SALOMEDSImpl_AttributeTreeNode* Set(const DF_Label& L, const std::string& ID); + + SALOMEDSImpl_AttributeTreeNode(); + void SetFather(const SALOMEDSImpl_AttributeTreeNode* value); + void SetPrevious(const SALOMEDSImpl_AttributeTreeNode* value); + void SetNext(const SALOMEDSImpl_AttributeTreeNode* value); + void SetFirst(const SALOMEDSImpl_AttributeTreeNode* value); + void SetTreeID(const std::string& value); + + bool Append(SALOMEDSImpl_AttributeTreeNode* value); + bool Prepend(SALOMEDSImpl_AttributeTreeNode* value); + bool Remove(); + bool InsertBefore(SALOMEDSImpl_AttributeTreeNode* value); + bool InsertAfter(SALOMEDSImpl_AttributeTreeNode* value); + + SALOMEDSImpl_AttributeTreeNode* GetFather() const { return myFather; } + SALOMEDSImpl_AttributeTreeNode* GetPrevious() const { return myPrevious; } + SALOMEDSImpl_AttributeTreeNode* GetNext() const { return myNext; } + SALOMEDSImpl_AttributeTreeNode* GetFirst() const { return myFirst; } + + bool HasFather() { return (myFather); } + bool HasPrevious() { return (myPrevious); } + bool HasNext() {return (myNext); } + bool HasFirst() { return (myFirst); } + const std::string& GetTreeID() { return ID(); } + int Depth() const; + bool IsRoot() const ; + SALOMEDSImpl_AttributeTreeNode* Root() const; + bool IsAscendant (const SALOMEDSImpl_AttributeTreeNode* ofTN) const; + bool IsDescendant(const SALOMEDSImpl_AttributeTreeNode* value) const; + bool IsFather(const SALOMEDSImpl_AttributeTreeNode* value) const; + bool IsChild(const SALOMEDSImpl_AttributeTreeNode* value) const; + + virtual std::string Save(); + virtual void Load(const std::string&); + virtual std::string Type(); + + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + void Paste(DF_Attribute* into); + DF_Attribute* NewEmpty() const; + ~SALOMEDSImpl_AttributeTreeNode() {;} + + virtual void AfterAddition(); + virtual void BeforeForget(); private: -std::string myTreeID; -SALOMEDSImpl_AttributeTreeNode* myFather; -SALOMEDSImpl_AttributeTreeNode* myPrevious; -SALOMEDSImpl_AttributeTreeNode* myNext; -SALOMEDSImpl_AttributeTreeNode* myFirst; + std::string myTreeID; + SALOMEDSImpl_AttributeTreeNode* myFather; + SALOMEDSImpl_AttributeTreeNode* myPrevious; + SALOMEDSImpl_AttributeTreeNode* myNext; + SALOMEDSImpl_AttributeTreeNode* myFirst; -friend class SALOMEDSImpl_ChildNodeIterator; + friend class SALOMEDSImpl_ChildNodeIterator; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.hxx index 8d3ab95ac..5bf9b27c3 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.hxx @@ -24,36 +24,38 @@ #ifndef _SALOMEDSImpl_AttributeUserID_HeaderFile #define _SALOMEDSImpl_AttributeUserID_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" #include #include "SALOMEDSImpl_GenericAttribute.hxx" -class SALOMEDSImpl_AttributeUserID : public SALOMEDSImpl_GenericAttribute +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeUserID : + public SALOMEDSImpl_GenericAttribute { private: -std::string myID; + std::string myID; public: -SALOMEDSImpl_AttributeUserID():SALOMEDSImpl_GenericAttribute("AttributeUserID") {} -static SALOMEDSImpl_AttributeUserID* Set (const DF_Label& L, const std::string& ID); -static const std::string& DefaultID() -{ - static std::string SALOMEDSImpl_DefaultUserAttributeID ("FFFFFFFF-D9CD-11d6-945D-1050DA506788"); - return SALOMEDSImpl_DefaultUserAttributeID; -} - -Standard_EXPORT const std::string& Value() const { return ID(); } -Standard_EXPORT void SetValue(const std::string& value); - -Standard_EXPORT virtual std::string Type(); - -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore(DF_Attribute* with) ; -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste(DF_Attribute* into); -Standard_EXPORT ~SALOMEDSImpl_AttributeUserID() {} + SALOMEDSImpl_AttributeUserID():SALOMEDSImpl_GenericAttribute("AttributeUserID") {} + static SALOMEDSImpl_AttributeUserID* Set (const DF_Label& L, const std::string& ID); + static const std::string& DefaultID() + { + static std::string SALOMEDSImpl_DefaultUserAttributeID ("FFFFFFFF-D9CD-11d6-945D-1050DA506788"); + return SALOMEDSImpl_DefaultUserAttributeID; + } + + const std::string& Value() const { return ID(); } + void SetValue(const std::string& value); + + virtual std::string Type(); + + const std::string& ID() const; + void Restore(DF_Attribute* with) ; + DF_Attribute* NewEmpty() const; + void Paste(DF_Attribute* into); + ~SALOMEDSImpl_AttributeUserID() {} }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx index ff366e786..895bae5ea 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Attributes.hxx @@ -24,15 +24,7 @@ #ifndef __SALOMEDSIMPL_ATTRIBUTES__H__ #define __SALOMEDSIMPL_ATTRIBUTES__H__ -#ifdef WNT -# ifdef SALOMEDSIMPL_EXPORTS -# define SALOMEDSIMPL_EXPORT __declspec( dllexport ) -# else -# define SALOMEDSIMPL_EXPORT __declspec( dllimport ) -# endif -#else -# define SALOMEDSIMPL_EXPORT -#endif +#include "SALOMEDSImpl_Defines.hxx" #include class SALOMEDSIMPL_EXPORT LockProtection diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx index 313d1d305..22ae44b6c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx @@ -24,30 +24,30 @@ #ifndef __SALOMEDSIMPL_CALLBACK_H__ #define __SALOMEDSIMPL_CALLBACK_H__ - +#include "SALOMEDSImpl_Defines.hxx" #include "SALOMEDSImpl_UseCaseBuilder.hxx" -class SALOMEDSImpl_Callback +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_Callback { private: SALOMEDSImpl_UseCaseBuilder* _builder; public: - SALOMEDSImpl_Callback(SALOMEDSImpl_UseCaseBuilder* builder) - { - _builder = builder; - } + SALOMEDSImpl_Callback(SALOMEDSImpl_UseCaseBuilder* builder) + { + _builder = builder; + } - virtual void OnAddSObject(const SALOMEDSImpl_SObject& theObject) - { - if(_builder != NULL && theObject) _builder->Append(theObject); - } + virtual void OnAddSObject(const SALOMEDSImpl_SObject& theObject) + { + if(_builder != NULL && theObject) _builder->Append(theObject); + } - virtual void OnRemoveSObject(const SALOMEDSImpl_SObject& theObject) - { - if(_builder != NULL && theObject) _builder->Remove(theObject); - } + virtual void OnRemoveSObject(const SALOMEDSImpl_SObject& theObject) + { + if(_builder != NULL && theObject) _builder->Remove(theObject); + } }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.hxx index e3c50b9b0..9e3d5b568 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.hxx @@ -24,12 +24,12 @@ #ifndef __SALOMEDSImpl_CHILDITERATOR_H__ #define __SALOMEDSImpl_CHILDITERATOR_H__ - +#include "SALOMEDSImpl_Defines.hxx" #include "SALOMEDSImpl_SObject.hxx" #include "DF_ChildIterator.hxx" #include "DF_Label.hxx" -class SALOMEDSImpl_ChildIterator +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_ChildIterator { private: DF_ChildIterator _it; @@ -37,20 +37,20 @@ private: public: - Standard_EXPORT SALOMEDSImpl_ChildIterator() {} - Standard_EXPORT SALOMEDSImpl_ChildIterator(const SALOMEDSImpl_SObject& theSO); - Standard_EXPORT SALOMEDSImpl_ChildIterator(const DF_Label& theLabel); - Standard_EXPORT ~SALOMEDSImpl_ChildIterator() {}; - - Standard_EXPORT virtual void Init(); - Standard_EXPORT virtual void Init(const DF_Label& theLabel); - Standard_EXPORT virtual void InitEx(bool theAllLevels); - Standard_EXPORT virtual void InitEx(const DF_Label& theLabel, bool theAllLevels); - Standard_EXPORT virtual bool More(); - Standard_EXPORT virtual void Next(); - Standard_EXPORT virtual SALOMEDSImpl_SObject Value(); - Standard_EXPORT virtual DF_Label Label(); - - Standard_EXPORT SALOMEDSImpl_ChildIterator* GetPersistentCopy() const; + SALOMEDSImpl_ChildIterator() {} + SALOMEDSImpl_ChildIterator(const SALOMEDSImpl_SObject& theSO); + SALOMEDSImpl_ChildIterator(const DF_Label& theLabel); + ~SALOMEDSImpl_ChildIterator() {}; + + virtual void Init(); + virtual void Init(const DF_Label& theLabel); + virtual void InitEx(bool theAllLevels); + virtual void InitEx(const DF_Label& theLabel, bool theAllLevels); + virtual bool More(); + virtual void Next(); + virtual SALOMEDSImpl_SObject Value(); + virtual DF_Label Label(); + + SALOMEDSImpl_ChildIterator* GetPersistentCopy() const; }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_ChildNodeIterator.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_ChildNodeIterator.hxx index 21651a4e7..452a60f84 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_ChildNodeIterator.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_ChildNodeIterator.hxx @@ -21,27 +21,28 @@ #ifndef _SALOMEDSImpl_ChildNodeIterator_HeaderFile #define _SALOMEDSImpl_ChildNodeIterator_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "SALOMEDSImpl_AttributeTreeNode.hxx" -class SALOMEDSImpl_ChildNodeIterator +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_ChildNodeIterator { public: -Standard_EXPORT SALOMEDSImpl_ChildNodeIterator(); -Standard_EXPORT SALOMEDSImpl_ChildNodeIterator(const SALOMEDSImpl_AttributeTreeNode* aTreeNode, - const bool allLevels = false); -Standard_EXPORT void Initialize(const SALOMEDSImpl_AttributeTreeNode* aTreeNode, - const bool allLevels = false) ; -Standard_EXPORT bool More() const { return (myNode); } -Standard_EXPORT void Next() ; -Standard_EXPORT void NextBrother() ; -Standard_EXPORT SALOMEDSImpl_AttributeTreeNode* Value() const { return myNode; } + SALOMEDSImpl_ChildNodeIterator(); + SALOMEDSImpl_ChildNodeIterator(const SALOMEDSImpl_AttributeTreeNode* aTreeNode, + const bool allLevels = false); + void Initialize(const SALOMEDSImpl_AttributeTreeNode* aTreeNode, + const bool allLevels = false) ; + bool More() const { return (myNode); } + void Next() ; + void NextBrother() ; + SALOMEDSImpl_AttributeTreeNode* Value() const { return myNode; } private: -SALOMEDSImpl_AttributeTreeNode* myNode; -int myFirstLevel; + SALOMEDSImpl_AttributeTreeNode* myNode; + int myFirstLevel; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Defines.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Defines.hxx new file mode 100755 index 000000000..ddd99cda6 --- /dev/null +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Defines.hxx @@ -0,0 +1,39 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEDSImpl_Defines.hxx +// Author : Alexander A. BORODIN +// Module : KERNEL + +#ifndef _SALOMEDSImpl_Defines_HXX_ +#define _SALOMEDSImpl_Defines_HXX_ + +#ifdef WIN32 +# if defined SALOMEDSIMPL_EXPORTS +# define SALOMEDSIMPL_EXPORT __declspec( dllexport ) +# else +# define SALOMEDSIMPL_EXPORT __declspec( dllimport ) +# endif +#else +# define SALOMEDSIMPL_EXPORT +#endif + +#endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx index 88fac75f5..a6ea569fe 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Driver.hxx @@ -20,78 +20,79 @@ #ifndef __SALOMEDSIMPL_DRIVER_H__ #define __SALOMEDSIMPL_DRIVER_H__ +#include "SALOMEDSImpl_Defines.hxx" #include -#include -#include -#include +#include "SALOMEDSImpl_SComponent.hxx" +#include "SALOMEDSImpl_SObject.hxx" +#include "SALOMEDSImpl_TMPFile.hxx" -class SALOMEDSImpl_Driver +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_Driver { public: virtual std::string GetIOR() = 0; virtual SALOMEDSImpl_TMPFile* Save(const SALOMEDSImpl_SComponent& theComponent, - const std::string& theURL, - long& theStreamLength, - bool isMultiFile) = 0; + const std::string& theURL, + long& theStreamLength, + bool isMultiFile) = 0; virtual SALOMEDSImpl_TMPFile* SaveASCII(const SALOMEDSImpl_SComponent& theComponent, - const std::string& theURL, - long& theStreamLength, - bool isMultiFile) = 0; - + const std::string& theURL, + long& theStreamLength, + bool isMultiFile) = 0; + virtual bool Load(const SALOMEDSImpl_SComponent& theComponent, - const unsigned char* theStream, - const long theStreamLength, - const std::string& theURL, - bool isMultiFile) = 0; + const unsigned char* theStream, + const long theStreamLength, + const std::string& theURL, + bool isMultiFile) = 0; virtual bool LoadASCII(const SALOMEDSImpl_SComponent& theComponent, - const unsigned char* theStream, - const long theStreamLength, - const std::string& theURL, - bool isMultiFile) = 0; + const unsigned char* theStream, + const long theStreamLength, + const std::string& theURL, + bool isMultiFile) = 0; virtual void Close(const SALOMEDSImpl_SComponent& theComponent) = 0; - + virtual std::string ComponentDataType() = 0; virtual std::string IORToLocalPersistentID(const SALOMEDSImpl_SObject& theSObject, - const std::string& IORString, - bool isMultiFile, - bool isASCII) = 0; + const std::string& IORString, + bool isMultiFile, + bool isASCII) = 0; virtual std::string LocalPersistentIDToIOR(const SALOMEDSImpl_SObject& theSObject, - const std::string& aLocalPersistentID, - bool isMultiFile, - bool isASCII) = 0; + const std::string& aLocalPersistentID, + bool isMultiFile, + bool isASCII) = 0; virtual bool CanCopy(const SALOMEDSImpl_SObject& theObject) = 0; virtual SALOMEDSImpl_TMPFile* CopyFrom(const SALOMEDSImpl_SObject& theObject, - int& theObjectID, - long& theStreamLength) = 0; - + int& theObjectID, + long& theStreamLength) = 0; + virtual bool CanPaste(const std::string& theComponentName, int theObjectID) = 0; virtual std::string PasteInto(const unsigned char* theStream, - const long theStreamLength, - int theObjectID, - const SALOMEDSImpl_SObject& theObject) = 0; + const long theStreamLength, + int theObjectID, + const SALOMEDSImpl_SObject& theObject) = 0; virtual SALOMEDSImpl_TMPFile* DumpPython(SALOMEDSImpl_Study* theStudy, - bool isPublished, - bool& isValidScript, - long& theStreamLength) = 0; + bool isPublished, + bool& isValidScript, + long& theStreamLength) = 0; }; class SALOMEDSImpl_DriverFactory { public: - + virtual SALOMEDSImpl_Driver* GetDriverByType(const std::string& theComponentType) = 0; virtual SALOMEDSImpl_Driver* GetDriverByIOR(const std::string& theIOR) = 0; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx index a197b28ef..69d8beaef 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.hxx @@ -19,6 +19,7 @@ #ifndef SALOMEDSImpl_IParameters_H #define SALOMEDSImpl_IParameters_H +#include "SALOMEDSImpl_Defines.hxx" #include #include #include @@ -27,9 +28,9 @@ #include "SALOMEDSImpl_Study.hxx" /*! - Class which an interface to store the parameters of the objects +Class which an interface to store the parameters of the objects */ -class Standard_EXPORT SALOMEDSImpl_IParameters +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_IParameters { public: SALOMEDSImpl_IParameters(SALOMEDSImpl_AttributeParameter* ap); @@ -37,109 +38,109 @@ public: virtual ~SALOMEDSImpl_IParameters(); /*! - Appends a string value to a named list. - Returns a number of the added value. - Note: the name of the list MUST be unique - */ + Appends a string value to a named list. + Returns a number of the added value. + Note: the name of the list MUST be unique + */ virtual int append(const std::string& listName, const std::string& value); /*! - Returns a number elements in the list - */ + Returns a number elements in the list + */ virtual int nbValues(const std::string& listName); /*! - Returns a list of values in the list - */ + Returns a list of values in the list + */ virtual std::vector getValues(const std::string& listName); /*! - Returns a value with given %index, where %index is in range [0:nbValues-1] - */ + Returns a value with given %index, where %index is in range [0:nbValues-1] + */ virtual std::string getValue(const std::string& listName, int index); /*! - Returns a list all entries lists - */ + Returns a list all entries lists + */ virtual std::vector getLists(); /*! - Sets a new named parameter value for the given entry - */ + Sets a new named parameter value for the given entry + */ virtual void setParameter(const std::string& entry, const std::string& parameterName, const std::string& value); /*! - Gets a named parameter value for the given entry - */ + Gets a named parameter value for the given entry + */ virtual std::string getParameter(const std::string& entry, const std::string& parameterName); /*! - Returns all parameter names of the given entry - */ + Returns all parameter names of the given entry + */ virtual std::vector getAllParameterNames(const std::string& entry); /*! - Returns all parameter values of the given entry - */ + Returns all parameter values of the given entry + */ virtual std::vector getAllParameterValues(const std::string& entry); /*! - Returns a number of parameters of the given entry - */ + Returns a number of parameters of the given entry + */ virtual int getNbParameters(const std::string& entry); /*! - Returns a list all entries - */ + Returns a list all entries + */ virtual std::vector getEntries(); /*! - Sets a global named property value - */ + Sets a global named property value + */ virtual void setProperty(const std::string& name, const std::string& value); /*! - Gets a value of global named property - */ + Gets a value of global named property + */ virtual std::string getProperty(const std::string& name); /*! - Returns a list all properties - */ + Returns a list all properties + */ virtual std::vector getProperties(); /*! - Returns decoded entry that is an absolute entry - */ + Returns decoded entry that is an absolute entry + */ virtual std::string decodeEntry(const std::string& entry); /*! - Returns whether there is the dumping visual parameters - */ + Returns whether there is the dumping visual parameters + */ static bool isDumpPython(SALOMEDSImpl_Study* study, const std::string& theID = ""); /*! - Returns an ID of the last save point + Returns an ID of the last save point */ static int getLastSavePoint(SALOMEDSImpl_Study* study, const std::string& theID = ""); /*! - Returns a Python script for the study, which sets up visual parameters + Returns a Python script for the study, which sets up visual parameters */ static std::string getStudyScript(SALOMEDSImpl_Study* study, int savePoint, const std::string& theID = ""); /*! - Returns a default Python script that set ups visual parameters for the given module - shift is a string that contain spaces to make valid Python script indentaion + Returns a default Python script that set ups visual parameters for the given module + shift is a string that contain spaces to make valid Python script indentaion */ static std::string getDefaultScript(SALOMEDSImpl_Study* study, - const std::string& moduleName, - const std::string& shift, - const std::string& theID = ""); + const std::string& moduleName, + const std::string& shift, + const std::string& theID = ""); /*! - Returns a default name of the component where the visula parameters are stored. + Returns a default name of the component where the visula parameters are stored. */ static std::string getDefaultVisualComponent(); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.hxx index 1803e537a..ecd8123dc 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.hxx @@ -25,33 +25,34 @@ #define __SALOMEDSIMPL_SCOMPONENT_H__ //SALOMEDSImpl headers +#include "SALOMEDSImpl_Defines.hxx" #include "SALOMEDSImpl_SObject.hxx" // std C++ headers #include #include -// Cascade headers #include "DF_Label.hxx" #include "SALOMEDSImpl_SObject.hxx" #include -class SALOMEDSImpl_SComponent : public virtual SALOMEDSImpl_SObject +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_SComponent : + public virtual SALOMEDSImpl_SObject { public: - - Standard_EXPORT SALOMEDSImpl_SComponent(); - Standard_EXPORT SALOMEDSImpl_SComponent(const SALOMEDSImpl_SComponent& theSCO); - Standard_EXPORT SALOMEDSImpl_SComponent(const DF_Label& lab); - - Standard_EXPORT ~SALOMEDSImpl_SComponent(); - - Standard_EXPORT virtual std::string ComponentDataType(); - Standard_EXPORT virtual bool ComponentIOR(std::string& theID); - - Standard_EXPORT static bool IsA(const DF_Label& theLabel); - - Standard_EXPORT SALOMEDSImpl_SComponent* GetPersistentCopy() const; + + SALOMEDSImpl_SComponent(); + SALOMEDSImpl_SComponent(const SALOMEDSImpl_SComponent& theSCO); + SALOMEDSImpl_SComponent(const DF_Label& lab); + + ~SALOMEDSImpl_SComponent(); + + virtual std::string ComponentDataType(); + virtual bool ComponentIOR(std::string& theID); + + static bool IsA(const DF_Label& theLabel); + + SALOMEDSImpl_SComponent* GetPersistentCopy() const; }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.hxx index 1194fc191..ec4386e48 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.hxx @@ -26,15 +26,15 @@ //SALOMEDSImpl headers +#include "SALOMEDSImpl_Defines.hxx" #include "SALOMEDSImpl_SComponent.hxx" -// Cascade headers #include "DF_ChildIterator.hxx" #include "DF_Label.hxx" #include "DF_Document.hxx" #include -class Standard_EXPORT SALOMEDSImpl_SComponentIterator +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_SComponentIterator { private: @@ -42,7 +42,7 @@ private: DF_Label _lab; public: - + SALOMEDSImpl_SComponentIterator(const SALOMEDSImpl_SComponentIterator& theIterator) { _it = theIterator._it; @@ -50,11 +50,11 @@ public: } SALOMEDSImpl_SComponentIterator() {}; - + SALOMEDSImpl_SComponentIterator(DF_Document* theDocument); - + ~SALOMEDSImpl_SComponentIterator() {}; - + virtual void Init(); virtual bool More(); virtual void Next(); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx index 80d797e41..64f630a44 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SObject.hxx @@ -24,6 +24,8 @@ #ifndef __SALOMEDSIMPL_SOBJECT_H__ #define __SALOMEDSIMPL_SOBJECT_H__ +#include "SALOMEDSImpl_Defines.hxx" + #include "DF_Label.hxx" #include "DF_Attribute.hxx" #include @@ -32,7 +34,7 @@ class SALOMEDSImpl_SComponent; class SALOMEDSImpl_Study; -class SALOMEDSImpl_SObject +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_SObject { protected: DF_Label _lab; @@ -41,45 +43,45 @@ protected: std::string _type; public: - - Standard_EXPORT SALOMEDSImpl_SObject(); - Standard_EXPORT SALOMEDSImpl_SObject(const DF_Label& theLabel); - Standard_EXPORT SALOMEDSImpl_SObject(const SALOMEDSImpl_SObject& theSObject); - Standard_EXPORT virtual ~SALOMEDSImpl_SObject(); - - Standard_EXPORT virtual std::string GetID() const; - Standard_EXPORT virtual SALOMEDSImpl_SComponent GetFatherComponent() const; - Standard_EXPORT virtual SALOMEDSImpl_SObject GetFather() const ; - Standard_EXPORT virtual bool FindAttribute(DF_Attribute*& theAttribute, const std::string& theTypeOfAttribute) const; - Standard_EXPORT virtual bool ReferencedObject(SALOMEDSImpl_SObject& theObject) const ; - Standard_EXPORT virtual bool FindSubObject(int theTag, SALOMEDSImpl_SObject& theObject); - Standard_EXPORT virtual SALOMEDSImpl_Study* GetStudy() const; - Standard_EXPORT virtual std::string Name() const { return _name; } - Standard_EXPORT virtual void Name(const std::string& theName) { _name = theName; } - Standard_EXPORT virtual std::vector GetAllAttributes() const; + SALOMEDSImpl_SObject(); + SALOMEDSImpl_SObject(const DF_Label& theLabel); + SALOMEDSImpl_SObject(const SALOMEDSImpl_SObject& theSObject); + virtual ~SALOMEDSImpl_SObject(); + + virtual std::string GetID() const; + virtual SALOMEDSImpl_SComponent GetFatherComponent() const; + virtual SALOMEDSImpl_SObject GetFather() const ; + virtual bool FindAttribute(DF_Attribute*& theAttribute, const std::string& theTypeOfAttribute) const; + virtual bool ReferencedObject(SALOMEDSImpl_SObject& theObject) const ; + virtual bool FindSubObject(int theTag, SALOMEDSImpl_SObject& theObject); + + virtual SALOMEDSImpl_Study* GetStudy() const; + virtual std::string Name() const { return _name; } + virtual void Name(const std::string& theName) { _name = theName; } + virtual std::vector GetAllAttributes() const; + + virtual std::string GetName() const ; + virtual std::string GetComment() const; + virtual std::string GetIOR() const; + + virtual int Tag() const { return _lab.Tag(); } + virtual int Depth() const { return _lab.Depth(); } - Standard_EXPORT virtual std::string GetName() const ; - Standard_EXPORT virtual std::string GetComment() const; - Standard_EXPORT virtual std::string GetIOR() const; + virtual DF_Label GetLabel() const { return _lab; } - Standard_EXPORT virtual int Tag() const { return _lab.Tag(); } - Standard_EXPORT virtual int Depth() const { return _lab.Depth(); } + bool IsNull() const { return _lab.IsNull(); } - Standard_EXPORT virtual DF_Label GetLabel() const { return _lab; } + bool IsComponent() const; - Standard_EXPORT bool IsNull() const { return _lab.IsNull(); } + operator SALOMEDSImpl_SComponent() const; - Standard_EXPORT bool IsComponent() const; + operator bool () const { return !IsNull(); } - Standard_EXPORT operator SALOMEDSImpl_SComponent() const; + SALOMEDSImpl_SObject* GetPersistentCopy() const; - Standard_EXPORT operator bool () const { return !IsNull(); } - - Standard_EXPORT SALOMEDSImpl_SObject* GetPersistentCopy() const; + static std::string GetGUID(const std::string& theTypeOfAttribute); - Standard_EXPORT static std::string GetGUID(const std::string& theTypeOfAttribute); - }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx index cfddeb627..a28f2d164 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.hxx @@ -30,12 +30,12 @@ #include #include -// Cascade headers #include "DF_Document.hxx" #include "DF_Label.hxx" #include //SALOMEDSImpl headers +#include "SALOMEDSImpl_Defines.hxx" #include "SALOMEDSImpl_SComponentIterator.hxx" #include "SALOMEDSImpl_SObject.hxx" #include "SALOMEDSImpl_StudyBuilder.hxx" @@ -51,7 +51,7 @@ class SALOMEDSImpl_StudyManager; class SALOMEDSImpl_GenericAttribute; -class SALOMEDSImpl_Study +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_Study { private: std::string _name; @@ -70,194 +70,193 @@ private: std::map _mapOfSO; std::map _mapOfSCO; std::map myIORLabels; - + SALOMEDSImpl_SObject _FindObject(const SALOMEDSImpl_SObject& SO, - const std::string& anObjectName, - bool& _find); - + const std::string& anObjectName, + bool& _find); + SALOMEDSImpl_SObject _FindObjectIOR(const SALOMEDSImpl_SObject& SO, - const std::string& anObjectIOR, - bool& _find); + const std::string& anObjectIOR, + bool& _find); public: - Standard_EXPORT static SALOMEDSImpl_Study* GetStudy(const DF_Label& theLabel); - Standard_EXPORT static SALOMEDSImpl_SObject SObject(const DF_Label& theLabel); - Standard_EXPORT static SALOMEDSImpl_SComponent SComponent(const DF_Label& theLabel); - Standard_EXPORT static void IORUpdated(const SALOMEDSImpl_AttributeIOR* theAttribute); + static SALOMEDSImpl_Study* GetStudy(const DF_Label& theLabel); + static SALOMEDSImpl_SObject SObject(const DF_Label& theLabel); + static SALOMEDSImpl_SComponent SComponent(const DF_Label& theLabel); + static void IORUpdated(const SALOMEDSImpl_AttributeIOR* theAttribute); - //! standard constructor - Standard_EXPORT SALOMEDSImpl_Study(const DF_Document*, const std::string& study_name); + //! standard constructor + SALOMEDSImpl_Study(const DF_Document*, const std::string& study_name); //! standard destructor - Standard_EXPORT virtual ~SALOMEDSImpl_Study(); + virtual ~SALOMEDSImpl_Study(); //! method to Get persistent reference of study (idem URL()) - Standard_EXPORT virtual std::string GetPersistentReference(); + virtual std::string GetPersistentReference(); //! method to Get transient reference of study - Standard_EXPORT virtual std::string GetTransientReference(); + virtual std::string GetTransientReference(); - Standard_EXPORT virtual void SetTransientReference(const std::string& theIOR); + virtual void SetTransientReference(const std::string& theIOR); //! method to detect if a study is empty - Standard_EXPORT virtual bool IsEmpty(); + virtual bool IsEmpty(); //! method to Find a Component with ComponentDataType = aComponentName - Standard_EXPORT virtual SALOMEDSImpl_SComponent FindComponent (const std::string& aComponentName); + virtual SALOMEDSImpl_SComponent FindComponent (const std::string& aComponentName); //! method to Find a Component Find a Component from it's ID - Standard_EXPORT virtual SALOMEDSImpl_SComponent FindComponentID(const std::string& aComponentID); + virtual SALOMEDSImpl_SComponent FindComponentID(const std::string& aComponentID); //! method to Find an Object with SALOMEDSImpl::Name = anObjectName - Standard_EXPORT virtual SALOMEDSImpl_SObject FindObject(const std::string& anObjectName); + virtual SALOMEDSImpl_SObject FindObject(const std::string& anObjectName); //! method to Find Object(s) with SALOMEDSImpl::Name=anObjectName in a component with ComponentDataType = aComponentName - Standard_EXPORT virtual std::vector FindObjectByName( const std::string& anObjectName, + virtual std::vector FindObjectByName( const std::string& anObjectName, const std::string& aComponentName ) ; //! method to Find an Object with ID = anObjectID - Standard_EXPORT virtual SALOMEDSImpl_SObject FindObjectID(const std::string& anObjectID); - + virtual SALOMEDSImpl_SObject FindObjectID(const std::string& anObjectID); + //! method to Create an Object with ID = anObjectID - Standard_EXPORT virtual SALOMEDSImpl_SObject CreateObjectID(const std::string& anObjectID); + virtual SALOMEDSImpl_SObject CreateObjectID(const std::string& anObjectID); //! method to Find an Object with ID = anObjectIOR - Standard_EXPORT virtual SALOMEDSImpl_SObject FindObjectIOR(const std::string& anObjectIOR); + virtual SALOMEDSImpl_SObject FindObjectIOR(const std::string& anObjectIOR); //! method to Find an Object by its path - Standard_EXPORT virtual SALOMEDSImpl_SObject FindObjectByPath(const std::string& thePath); + virtual SALOMEDSImpl_SObject FindObjectByPath(const std::string& thePath); //! method to get a path of SObject - Standard_EXPORT virtual std::string GetObjectPath(const SALOMEDSImpl_SObject& theObject); + virtual std::string GetObjectPath(const SALOMEDSImpl_SObject& theObject); - Standard_EXPORT std::string GetObjectPathByIOR(const std::string& theIOR); + std::string GetObjectPathByIOR(const std::string& theIOR); //! method to set a context: root ('/') is UserData component - Standard_EXPORT virtual bool SetContext(const std::string& thePath); + virtual bool SetContext(const std::string& thePath); //! method to get a context - Standard_EXPORT virtual std::string GetContext(); + virtual std::string GetContext(); //! method to get all object names in the given context (or in the current context, if 'theContext' is empty) - Standard_EXPORT virtual std::vector GetObjectNames(const std::string& theContext); + virtual std::vector GetObjectNames(const std::string& theContext); //! method to get all directory names in the given context (or in the current context, if 'theContext' is empty) - Standard_EXPORT virtual std::vector GetDirectoryNames(const std::string& theContext); + virtual std::vector GetDirectoryNames(const std::string& theContext); //! method to get all file names in the given context (or in the current context, if 'theContext' is empty) - Standard_EXPORT virtual std::vector GetFileNames(const std::string& theContext); + virtual std::vector GetFileNames(const std::string& theContext); //! method to get all components names - Standard_EXPORT virtual std::vector GetComponentNames(const std::string& theContext); + virtual std::vector GetComponentNames(const std::string& theContext); //! method to Create a ChildIterator from an SObject - Standard_EXPORT virtual SALOMEDSImpl_ChildIterator NewChildIterator(const SALOMEDSImpl_SObject& aSO); + virtual SALOMEDSImpl_ChildIterator NewChildIterator(const SALOMEDSImpl_SObject& aSO); //! method to Create a SComponentIterator - Standard_EXPORT virtual SALOMEDSImpl_SComponentIterator NewComponentIterator(); + virtual SALOMEDSImpl_SComponentIterator NewComponentIterator(); //! method to Create a StudyBuilder - Standard_EXPORT virtual SALOMEDSImpl_StudyBuilder* NewBuilder(); + virtual SALOMEDSImpl_StudyBuilder* NewBuilder(); //! method to get study name - Standard_EXPORT virtual std::string Name(); + virtual std::string Name(); //! method to set study name - Standard_EXPORT virtual void Name(const std::string& name); - + virtual void Name(const std::string& name); + //! method to get if study has been saved - Standard_EXPORT virtual bool IsSaved(); + virtual bool IsSaved(); //! method to set if study has been saved - Standard_EXPORT virtual void IsSaved(bool save); + virtual void IsSaved(bool save); //! method to Detect if a Study has been modified since it has been saved - Standard_EXPORT virtual bool IsModified(); - + virtual bool IsModified(); + //! method to get URL of the study (idem GetPersistentReference) - Standard_EXPORT virtual std::string URL(); + virtual std::string URL(); //! method to set URL of the study - Standard_EXPORT virtual void URL(const std::string& url); - - Standard_EXPORT virtual bool IsLocked(); - - Standard_EXPORT virtual int StudyId(); - - Standard_EXPORT virtual void StudyId(int id); + virtual void URL(const std::string& url); - Standard_EXPORT virtual void UpdateIORLabelMap(const std::string& anIOR, const std::string& aLabel); + virtual bool IsLocked(); - Standard_EXPORT virtual std::vector FindDependances(const SALOMEDSImpl_SObject& anObject); - - Standard_EXPORT virtual SALOMEDSImpl_AttributeStudyProperties* GetProperties(); - - Standard_EXPORT virtual std::string GetLastModificationDate(); - - Standard_EXPORT virtual std::vector GetModificationsDate(); - - Standard_EXPORT virtual SALOMEDSImpl_UseCaseBuilder* GetUseCaseBuilder(); + virtual int StudyId(); - Standard_EXPORT virtual void Close(); - - Standard_EXPORT void EnableUseCaseAutoFilling(bool isEnabled); - - Standard_EXPORT virtual std::string GetErrorCode() { return _errorCode; } - Standard_EXPORT virtual bool IsError() { return _errorCode != ""; } - - Standard_EXPORT virtual SALOMEDSImpl_SComponent GetSComponent(const std::string& theEntry); - Standard_EXPORT virtual SALOMEDSImpl_SComponent GetSComponent(const DF_Label& theLabel); - Standard_EXPORT virtual SALOMEDSImpl_SObject GetSObject(const std::string& theEntry); - Standard_EXPORT virtual SALOMEDSImpl_SObject GetSObject(const DF_Label& theEntryLabel); - Standard_EXPORT virtual DF_Attribute* GetAttribute(const std::string& theEntry, + virtual void StudyId(int id); + + virtual void UpdateIORLabelMap(const std::string& anIOR, const std::string& aLabel); + + virtual std::vector FindDependances(const SALOMEDSImpl_SObject& anObject); + + virtual SALOMEDSImpl_AttributeStudyProperties* GetProperties(); + + virtual std::string GetLastModificationDate(); + + virtual std::vector GetModificationsDate(); + + virtual SALOMEDSImpl_UseCaseBuilder* GetUseCaseBuilder(); + + virtual void Close(); + + void EnableUseCaseAutoFilling(bool isEnabled); + + virtual std::string GetErrorCode() { return _errorCode; } + virtual bool IsError() { return _errorCode != ""; } + + virtual SALOMEDSImpl_SComponent GetSComponent(const std::string& theEntry); + virtual SALOMEDSImpl_SComponent GetSComponent(const DF_Label& theLabel); + virtual SALOMEDSImpl_SObject GetSObject(const std::string& theEntry); + virtual SALOMEDSImpl_SObject GetSObject(const DF_Label& theEntryLabel); + virtual DF_Attribute* GetAttribute(const std::string& theEntry, const std::string& theType); - Standard_EXPORT virtual bool HasCurrentContext() { return !_current.IsNull(); } + virtual bool HasCurrentContext() { return !_current.IsNull(); } - Standard_EXPORT virtual bool DumpStudy(const std::string& thePath, + virtual bool DumpStudy(const std::string& thePath, const std::string& theBaseName, bool isPublished, SALOMEDSImpl_DriverFactory* theFactory); - Standard_EXPORT static std::string GetDumpStudyComment(const char* theComponentName = 0); - - Standard_EXPORT virtual DF_Document* GetDocument() { return _doc; } + static std::string GetDumpStudyComment(const char* theComponentName = 0); + + virtual DF_Document* GetDocument() { return _doc; } //The method dump creates a txt file that contain a dump of the study, for debug use - Standard_EXPORT void dump(const std::string& theFileName); + void dump(const std::string& theFileName); //This method marks the study as being modified - Standard_EXPORT void Modify(); + void Modify(); - Standard_EXPORT SALOMEDSImpl_AttributeParameter* GetCommonParameters(const char* theID, int theSavePoint); + SALOMEDSImpl_AttributeParameter* GetCommonParameters(const char* theID, int theSavePoint); - Standard_EXPORT SALOMEDSImpl_AttributeParameter* GetModuleParameters(const char* theID, + SALOMEDSImpl_AttributeParameter* GetModuleParameters(const char* theID, const char* theModuleName, int theSavePoint); //Locks the study, theLockerID is identificator of the of the one who locked the study for ex. IOR - Standard_EXPORT void SetStudyLock(const char* theLockerID); + void SetStudyLock(const char* theLockerID); //Returns True if the study is locked - Standard_EXPORT bool IsStudyLocked(); + bool IsStudyLocked(); //Unlocks the study - Standard_EXPORT void UnLockStudy(const char* theLockerID); + void UnLockStudy(const char* theLockerID); //Returns an ID of the study locker - Standard_EXPORT std::vector GetLockerID(); + std::vector GetLockerID(); //Returns a callback - Standard_EXPORT SALOMEDSImpl_Callback* GetCallback() { return _cb; } + SALOMEDSImpl_Callback* GetCallback() { return _cb; } //Returns a list of IOR's stored in the study - Standard_EXPORT std::vector GetIORs(); - + std::vector GetIORs(); -friend class SALOMEDSImpl_StudyManager; -friend class SALOMEDSImpl_GenericAttribute; + friend class SALOMEDSImpl_StudyManager; + friend class SALOMEDSImpl_GenericAttribute; }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.hxx index 781103cb6..e6a996e70 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.hxx @@ -24,17 +24,18 @@ #ifndef __SALOMEDSImpl_STUDYBUILDER_H__ #define __SALOMEDSImpl_STUDYBUILDER_H__ +#include "SALOMEDSImpl_Defines.hxx" // std C++ headers #include #include #include - + #include "SALOMEDSImpl_Callback.hxx" #include "SALOMEDSImpl_Driver.hxx" class SALOMEDSImpl_Study; -class SALOMEDSImpl_StudyBuilder +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_StudyBuilder { private: DF_Document* _doc; @@ -44,74 +45,74 @@ private: std::string _errorCode; public: - - Standard_EXPORT SALOMEDSImpl_StudyBuilder(const SALOMEDSImpl_Study* theOwner); - Standard_EXPORT ~SALOMEDSImpl_StudyBuilder(); + SALOMEDSImpl_StudyBuilder(const SALOMEDSImpl_Study* theOwner); + + ~SALOMEDSImpl_StudyBuilder(); + + virtual SALOMEDSImpl_SComponent NewComponent(const std::string& ComponentDataType); - Standard_EXPORT virtual SALOMEDSImpl_SComponent NewComponent(const std::string& ComponentDataType); + virtual bool DefineComponentInstance (const SALOMEDSImpl_SComponent&, const std::string& ComponentIOR); - Standard_EXPORT virtual bool DefineComponentInstance (const SALOMEDSImpl_SComponent&, const std::string& ComponentIOR); - - Standard_EXPORT virtual bool RemoveComponent(const SALOMEDSImpl_SComponent& aComponent); + virtual bool RemoveComponent(const SALOMEDSImpl_SComponent& aComponent); - Standard_EXPORT virtual SALOMEDSImpl_SObject NewObject(const SALOMEDSImpl_SObject& theFatherObject); + virtual SALOMEDSImpl_SObject NewObject(const SALOMEDSImpl_SObject& theFatherObject); - Standard_EXPORT virtual SALOMEDSImpl_SObject NewObjectToTag(const SALOMEDSImpl_SObject& theFatherObject, - const int theTag); + virtual SALOMEDSImpl_SObject NewObjectToTag(const SALOMEDSImpl_SObject& theFatherObject, + const int theTag); //! The methods adds a new subdirectory, the path can be absolute or relative (then the current context is used) - Standard_EXPORT virtual bool AddDirectory(const std::string& thePath); + virtual bool AddDirectory(const std::string& thePath); - Standard_EXPORT virtual bool LoadWith(const SALOMEDSImpl_SComponent& sco, SALOMEDSImpl_Driver* Engine); - Standard_EXPORT virtual bool Load(const SALOMEDSImpl_SObject& sco); + virtual bool LoadWith(const SALOMEDSImpl_SComponent& sco, SALOMEDSImpl_Driver* Engine); + virtual bool Load(const SALOMEDSImpl_SObject& sco); - Standard_EXPORT virtual bool RemoveObject(const SALOMEDSImpl_SObject& anObject); - Standard_EXPORT virtual bool RemoveObjectWithChildren(const SALOMEDSImpl_SObject& anObject); + virtual bool RemoveObject(const SALOMEDSImpl_SObject& anObject); + virtual bool RemoveObjectWithChildren(const SALOMEDSImpl_SObject& anObject); - Standard_EXPORT virtual DF_Attribute* FindOrCreateAttribute(const SALOMEDSImpl_SObject& anObject, - const std::string& aTypeOfAttribute); - Standard_EXPORT virtual bool FindAttribute(const SALOMEDSImpl_SObject& anObject, - DF_Attribute*& anAttribute, - const std::string& aTypeOfAttribute); + virtual DF_Attribute* FindOrCreateAttribute(const SALOMEDSImpl_SObject& anObject, + const std::string& aTypeOfAttribute); + virtual bool FindAttribute(const SALOMEDSImpl_SObject& anObject, + DF_Attribute*& anAttribute, + const std::string& aTypeOfAttribute); - Standard_EXPORT virtual bool RemoveAttribute(const SALOMEDSImpl_SObject& anObject, const std::string& aTypeOfAttribute); + virtual bool RemoveAttribute(const SALOMEDSImpl_SObject& anObject, const std::string& aTypeOfAttribute); - Standard_EXPORT virtual bool Addreference(const SALOMEDSImpl_SObject& me, - const SALOMEDSImpl_SObject& thereferencedObject); + virtual bool Addreference(const SALOMEDSImpl_SObject& me, + const SALOMEDSImpl_SObject& thereferencedObject); - Standard_EXPORT virtual bool RemoveReference(const SALOMEDSImpl_SObject& me); + virtual bool RemoveReference(const SALOMEDSImpl_SObject& me); - Standard_EXPORT virtual bool SetGUID(const SALOMEDSImpl_SObject& anObject, const std::string& theGUID); - Standard_EXPORT virtual bool IsGUID(const SALOMEDSImpl_SObject& anObject, const std::string& theGUID); + virtual bool SetGUID(const SALOMEDSImpl_SObject& anObject, const std::string& theGUID); + virtual bool IsGUID(const SALOMEDSImpl_SObject& anObject, const std::string& theGUID); - Standard_EXPORT virtual void NewCommand(); - Standard_EXPORT virtual void CommitCommand(); - Standard_EXPORT virtual bool HasOpenCommand(); - Standard_EXPORT virtual void AbortCommand(); - Standard_EXPORT virtual void Undo(); - Standard_EXPORT virtual void Redo(); - Standard_EXPORT bool GetAvailableUndos(); - Standard_EXPORT bool GetAvailableRedos(); - Standard_EXPORT bool IsSaved(); - Standard_EXPORT bool IsModified(); - Standard_EXPORT virtual int UndoLimit(); - Standard_EXPORT virtual void UndoLimit(const int); + virtual void NewCommand(); + virtual void CommitCommand(); + virtual bool HasOpenCommand(); + virtual void AbortCommand(); + virtual void Undo(); + virtual void Redo(); + bool GetAvailableUndos(); + bool GetAvailableRedos(); + bool IsSaved(); + bool IsModified(); + virtual int UndoLimit(); + virtual void UndoLimit(const int); - Standard_EXPORT void CheckLocked(); + void CheckLocked(); - Standard_EXPORT virtual SALOMEDSImpl_Callback* SetOnAddSObject(const SALOMEDSImpl_Callback* theCallback); - Standard_EXPORT virtual SALOMEDSImpl_Callback* SetOnRemoveSObject(const SALOMEDSImpl_Callback* theCallback); + virtual SALOMEDSImpl_Callback* SetOnAddSObject(const SALOMEDSImpl_Callback* theCallback); + virtual SALOMEDSImpl_Callback* SetOnRemoveSObject(const SALOMEDSImpl_Callback* theCallback); - Standard_EXPORT virtual bool SetName(const SALOMEDSImpl_SObject& theSO, const std::string& theValue); + virtual bool SetName(const SALOMEDSImpl_SObject& theSO, const std::string& theValue); - Standard_EXPORT virtual bool SetComment(const SALOMEDSImpl_SObject& theSO, const std::string& theValue); + virtual bool SetComment(const SALOMEDSImpl_SObject& theSO, const std::string& theValue); - Standard_EXPORT virtual bool SetIOR(const SALOMEDSImpl_SObject& theSO, const std::string& theValue); + virtual bool SetIOR(const SALOMEDSImpl_SObject& theSO, const std::string& theValue); - Standard_EXPORT virtual std::string GetErrorCode() { return _errorCode; } - Standard_EXPORT virtual bool IsError() { return _errorCode != ""; } + virtual std::string GetErrorCode() { return _errorCode; } + virtual bool IsError() { return _errorCode != ""; } - Standard_EXPORT virtual SALOMEDSImpl_Study* GetOwner() { return _study; } + virtual SALOMEDSImpl_Study* GetOwner() { return _study; } }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.hxx index 5d8cff6a2..fe13af984 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyHandle.hxx @@ -24,37 +24,35 @@ #ifndef SALOMEDSImpl_StudyHandle_HeaderFile #define SALOMEDSImpl_StudyHandle_HeaderFile +#include "SALOMEDSImpl_Defines.hxx" #include "DF_Attribute.hxx" #include "DF_Label.hxx" /* - Class : SALOMEDSImpl_StudyHandle - Description : PRIVATE: This class is intended for storing of the study handle +Class : SALOMEDSImpl_StudyHandle +Description : PRIVATE: This class is intended for storing of the study handle */ #include "SALOMEDSImpl_Study.hxx" -#ifndef WNT -class Standard_EXPORT SALOMEDSImpl_StudyHandle : public DF_Attribute -#else -class SALOMEDSImpl_StudyHandle : public DF_Attribute -#endif +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_StudyHandle : + public DF_Attribute { public: -Standard_EXPORT SALOMEDSImpl_StudyHandle(); -Standard_EXPORT ~SALOMEDSImpl_StudyHandle() {; } - -Standard_EXPORT static SALOMEDSImpl_StudyHandle* Set(const DF_Label& theLabel, SALOMEDSImpl_Study* theStudy); -Standard_EXPORT static const std::string& GetID() ; - -Standard_EXPORT void Set(SALOMEDSImpl_Study* theStudy) { myHandle = theStudy; } -Standard_EXPORT SALOMEDSImpl_Study* Get() { return myHandle; } -Standard_EXPORT const std::string& ID() const; -Standard_EXPORT void Restore( DF_Attribute* theWith ); -Standard_EXPORT DF_Attribute* NewEmpty() const; -Standard_EXPORT void Paste( DF_Attribute* theInto); - + SALOMEDSImpl_StudyHandle(); + ~SALOMEDSImpl_StudyHandle() {; } + + static SALOMEDSImpl_StudyHandle* Set(const DF_Label& theLabel, SALOMEDSImpl_Study* theStudy); + static const std::string& GetID() ; + + void Set(SALOMEDSImpl_Study* theStudy) { myHandle = theStudy; } + SALOMEDSImpl_Study* Get() { return myHandle; } + const std::string& ID() const; + void Restore( DF_Attribute* theWith ); + DF_Attribute* NewEmpty() const; + void Paste( DF_Attribute* theInto); + private: SALOMEDSImpl_Study* myHandle; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx index 428c5b636..50099bcc9 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx @@ -134,18 +134,12 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::Open(const string& aUrl) } catch (HDFexception) { -//#ifndef WNT -// char eStr[strlen(aUrl.ToCString())+17]; -//#else - char *eStr; - eStr = new char[strlen(aUrl.c_str())+17]; -//#endif - sprintf(eStr,"Can't open file %s",aUrl.c_str()); -//#ifdef WNT - delete [] eStr; -//#endif - _errorCode = string(eStr); - return NULL; + char *eStr; + eStr = new char[strlen(aUrl.c_str())+17]; + sprintf(eStr,"Can't open file %s",aUrl.c_str()); + delete [] eStr; + _errorCode = string(eStr); + return NULL; } // Temporary aStudyUrl in place of study name @@ -174,11 +168,7 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::Open(const string& aUrl) } catch (HDFexception) { -//#ifndef WNT -// char eStr[strlen(aUrl.ToCString())+17]; -//#else - char *eStr = new char [strlen(aUrl.c_str())+17]; -//#endif + char *eStr = new char [strlen(aUrl.c_str())+17]; sprintf(eStr,"Can't open file %s", aUrl.c_str()); _errorCode = string(eStr); return NULL; @@ -462,7 +452,7 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const string& aUrl, HDFdataset *hdf_dataset =0; hdf_size size[1]; hdf_int32 name_len = 0; - char *component_name = 0; + string component_name; if(!aStudy) { _errorCode = "Study is null"; @@ -609,12 +599,12 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const string& aUrl, hdf_sco_group2->CreateOnDisk(); SaveAttributes(SC, hdf_sco_group2); // ComponentDataType treatment - component_name = (char*)SC.ComponentDataType().c_str(); - name_len = (hdf_int32)strlen(component_name); + component_name = SC.ComponentDataType(); + name_len = (hdf_int32)component_name.length(); size[0] = name_len +1 ; hdf_dataset = new HDFdataset("COMPONENTDATATYPE",hdf_sco_group2,HDF_STRING,size,1); hdf_dataset->CreateOnDisk(); - hdf_dataset->WriteOnDisk(component_name); + hdf_dataset->WriteOnDisk((char*)component_name.c_str()); hdf_dataset->CloseOnDisk(); hdf_dataset=0; //will be deleted by hdf_sco_group destructor Impl_SaveObject(SC, hdf_sco_group2); @@ -638,12 +628,12 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const string& aUrl, //----------------------------------------------------------------------- //5 - Write the Study Properties //----------------------------------------------------------------------- - name_len = (hdf_int32) aStudy->Name().size(); + string study_name = aStudy->Name(); + name_len = (hdf_int32) study_name.size(); size[0] = name_len +1 ; hdf_dataset = new HDFdataset("STUDY_NAME",hdf_group_study_structure,HDF_STRING,size,1); hdf_dataset->CreateOnDisk(); - char* studid = (char*)aStudy->Name().c_str(); - hdf_dataset->WriteOnDisk(studid); + hdf_dataset->WriteOnDisk((char*)study_name.c_str()); hdf_dataset->CloseOnDisk(); hdf_dataset=0; // will be deleted by hdf_group_study_structure destructor @@ -717,8 +707,8 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveObject(const SALOMEDSImpl_SObject& SC, SALOMEDSImpl_SObject SO = SALOMEDSImpl_Study::SObject(itchild.Value()); - char* scoid = (char*) SO.GetID().c_str(); - hdf_group_sobject = new HDFgroup(scoid, hdf_group_datatype); + string scoid = SO.GetID(); + hdf_group_sobject = new HDFgroup(scoid.c_str(), hdf_group_datatype); hdf_group_sobject->CreateOnDisk(); SaveAttributes(SO, hdf_group_sobject); Impl_SaveObject(SO, hdf_group_sobject); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.hxx index 190317bbc..b42dd8451 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.hxx @@ -24,6 +24,8 @@ #ifndef __SALOMEDSImpl_STUDYMANAGER_I_H__ #define __SALOMEDSImpl_STUDYMANAGER_I_H__ +#include "SALOMEDSImpl_Defines.hxx" + // std C++ headers #include #include @@ -39,7 +41,7 @@ class HDFgroup; -class SALOMEDSImpl_StudyManager +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_StudyManager { private: @@ -52,87 +54,87 @@ private: public: //! standard constructor - Standard_EXPORT SALOMEDSImpl_StudyManager(); + SALOMEDSImpl_StudyManager(); //! standard destructor - Standard_EXPORT virtual ~SALOMEDSImpl_StudyManager(); + virtual ~SALOMEDSImpl_StudyManager(); //! method to Create a New Study of name study_name - Standard_EXPORT virtual SALOMEDSImpl_Study* NewStudy(const std::string& study_name); + virtual SALOMEDSImpl_Study* NewStudy(const std::string& study_name); //! method to Open a Study from it's persistent reference - Standard_EXPORT virtual SALOMEDSImpl_Study* Open(const std::string& aStudyUrl); + virtual SALOMEDSImpl_Study* Open(const std::string& aStudyUrl); //! method to close a Study - Standard_EXPORT virtual void Close(SALOMEDSImpl_Study* aStudy); + virtual void Close(SALOMEDSImpl_Study* aStudy); //! method to save a Study - Standard_EXPORT virtual bool Save(SALOMEDSImpl_Study* aStudy, SALOMEDSImpl_DriverFactory* aFactory, bool theMultiFile); + virtual bool Save(SALOMEDSImpl_Study* aStudy, SALOMEDSImpl_DriverFactory* aFactory, bool theMultiFile); - Standard_EXPORT virtual bool SaveASCII(SALOMEDSImpl_Study* aStudy, - SALOMEDSImpl_DriverFactory* aFactory, - bool theMultiFile); + virtual bool SaveASCII(SALOMEDSImpl_Study* aStudy, + SALOMEDSImpl_DriverFactory* aFactory, + bool theMultiFile); //! method to save a Study to the persistent reference aUrl - Standard_EXPORT virtual bool SaveAs(const std::string& aUrl, - SALOMEDSImpl_Study* aStudy, - SALOMEDSImpl_DriverFactory* aFactory, - bool theMultiFile); + virtual bool SaveAs(const std::string& aUrl, + SALOMEDSImpl_Study* aStudy, + SALOMEDSImpl_DriverFactory* aFactory, + bool theMultiFile); - Standard_EXPORT virtual bool SaveAsASCII(const std::string& aUrl, - SALOMEDSImpl_Study* aStudy, - SALOMEDSImpl_DriverFactory* aFactory, - bool theMultiFile); + virtual bool SaveAsASCII(const std::string& aUrl, + SALOMEDSImpl_Study* aStudy, + SALOMEDSImpl_DriverFactory* aFactory, + bool theMultiFile); //! method to Get name list of open studies in the session - Standard_EXPORT virtual std::vector GetOpenStudies(); + virtual std::vector GetOpenStudies(); //! method to get a Study from it's name - Standard_EXPORT virtual SALOMEDSImpl_Study* GetStudyByName(const std::string& aStudyName) ; + virtual SALOMEDSImpl_Study* GetStudyByName(const std::string& aStudyName) ; //! method to get a Study from it's ID - Standard_EXPORT virtual SALOMEDSImpl_Study* GetStudyByID(int aStudyID) ; - - - Standard_EXPORT DF_Document* GetDocumentOfStudy(SALOMEDSImpl_Study* theStudy); - - Standard_EXPORT DF_Document* GetClipboard() { return _clipboard; } - - Standard_EXPORT bool CopyLabel(SALOMEDSImpl_Study* theSourceStudy, - SALOMEDSImpl_Driver* theEngine, - const int theSourceStartDepth, - const DF_Label& theSource, - const DF_Label& theDestinationMain); - - Standard_EXPORT DF_Label PasteLabel(SALOMEDSImpl_Study* theDestinationStudy, - SALOMEDSImpl_Driver* theEngine, - const DF_Label& theSource, - const DF_Label& theDestinationStart, - const int theCopiedStudyID, - const bool isFirstElement); - - Standard_EXPORT virtual bool CanCopy(const SALOMEDSImpl_SObject& theObject, SALOMEDSImpl_Driver* Engine); - Standard_EXPORT virtual bool Copy(const SALOMEDSImpl_SObject& theObject, SALOMEDSImpl_Driver* Engine); - Standard_EXPORT virtual bool CanPaste(const SALOMEDSImpl_SObject& theObject, SALOMEDSImpl_Driver* Engine); - Standard_EXPORT virtual SALOMEDSImpl_SObject Paste(const SALOMEDSImpl_SObject& theObject, SALOMEDSImpl_Driver* Engine); + virtual SALOMEDSImpl_Study* GetStudyByID(int aStudyID) ; + + + DF_Document* GetDocumentOfStudy(SALOMEDSImpl_Study* theStudy); + + DF_Document* GetClipboard() { return _clipboard; } + + bool CopyLabel(SALOMEDSImpl_Study* theSourceStudy, + SALOMEDSImpl_Driver* theEngine, + const int theSourceStartDepth, + const DF_Label& theSource, + const DF_Label& theDestinationMain); + + DF_Label PasteLabel(SALOMEDSImpl_Study* theDestinationStudy, + SALOMEDSImpl_Driver* theEngine, + const DF_Label& theSource, + const DF_Label& theDestinationStart, + const int theCopiedStudyID, + const bool isFirstElement); + + virtual bool CanCopy(const SALOMEDSImpl_SObject& theObject, SALOMEDSImpl_Driver* Engine); + virtual bool Copy(const SALOMEDSImpl_SObject& theObject, SALOMEDSImpl_Driver* Engine); + virtual bool CanPaste(const SALOMEDSImpl_SObject& theObject, SALOMEDSImpl_Driver* Engine); + virtual SALOMEDSImpl_SObject Paste(const SALOMEDSImpl_SObject& theObject, SALOMEDSImpl_Driver* Engine); // _SaveAs private function called by Save and SaveAs - Standard_EXPORT virtual bool Impl_SaveAs(const std::string& aUrl, - SALOMEDSImpl_Study* aStudy, - SALOMEDSImpl_DriverFactory* aFactory, - bool theMultiFile, - bool theASCII); + virtual bool Impl_SaveAs(const std::string& aUrl, + SALOMEDSImpl_Study* aStudy, + SALOMEDSImpl_DriverFactory* aFactory, + bool theMultiFile, + bool theASCII); // _SaveObject private function called by _SaveAs - Standard_EXPORT virtual bool Impl_SaveObject(const SALOMEDSImpl_SObject& SC, HDFgroup *hdf_group_datatype); + virtual bool Impl_SaveObject(const SALOMEDSImpl_SObject& SC, HDFgroup *hdf_group_datatype); // _SubstituteSlash function called by Open and GetStudyByName - Standard_EXPORT virtual std::string Impl_SubstituteSlash(const std::string& aUrl); + virtual std::string Impl_SubstituteSlash(const std::string& aUrl); - Standard_EXPORT virtual bool Impl_SaveProperties(SALOMEDSImpl_Study* aStudy, HDFgroup *hdf_group); + virtual bool Impl_SaveProperties(SALOMEDSImpl_Study* aStudy, HDFgroup *hdf_group); - Standard_EXPORT std::string GetErrorCode() { return _errorCode; } - Standard_EXPORT virtual bool IsError() { return _errorCode != ""; } + std::string GetErrorCode() { return _errorCode; } + virtual bool IsError() { return _errorCode != ""; } }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx index 3d63b66cd..a9ee8d706 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx @@ -21,19 +21,20 @@ #ifndef __SALOMEDSIMPL_TMPFILE_H__ #define __SALOMEDSIMPL_TMPFILE_H__ +#include "SALOMEDSImpl_Defines.hxx" #include "DF_definitions.hxx" -struct SALOMEDSImpl_TMPFile +struct SALOMEDSIMPL_EXPORT SALOMEDSImpl_TMPFile { typedef unsigned char TOctet; //typedef unsigned int size_t; - Standard_EXPORT virtual size_t Size() = 0; + virtual size_t Size() = 0; - Standard_EXPORT virtual TOctet* Data(); + virtual TOctet* Data(); - Standard_EXPORT virtual TOctet& Get(size_t) = 0; + virtual TOctet& Get(size_t) = 0; }; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx index 7d817c961..b65ad7bd5 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.cxx @@ -24,14 +24,14 @@ // Project : SALOME // Module : SALOMEDSImpl -#include "SALOMEDSImpl_Tool.hxx" - #include #include #include +#include +#include "SALOMEDSImpl_Tool.hxx" -#ifndef WNT +#ifndef WIN32 #include #include #include @@ -40,17 +40,17 @@ #else #include #include +//#include +#include #endif -#include - using namespace std; bool Exists(const string thePath) { -#ifdef WNT +#ifdef WIN32 if ( GetFileAttributes ( thePath.c_str() ) == 0xFFFFFFFF ) { if ( GetLastError () != ERROR_FILE_NOT_FOUND ) { return false; @@ -118,7 +118,7 @@ string SALOMEDSImpl_Tool::GetTmpDir() #endif -#ifdef WNT +#ifdef WIN32 CreateDirectory(aDir.c_str(), NULL); #else mkdir(aDir.c_str(), 0x1ff); @@ -143,7 +143,7 @@ void SALOMEDSImpl_Tool::RemoveTemporaryFiles(const string& theDirectory, aFile += theFiles[i-1]; if(!Exists(aFile)) continue; -#ifdef WNT +#ifdef WIN32 DeleteFile(aFile.c_str()); #else unlink(aFile.c_str()); @@ -152,8 +152,8 @@ void SALOMEDSImpl_Tool::RemoveTemporaryFiles(const string& theDirectory, if(IsDirDeleted) { if(Exists(aDirName)) { -#ifdef WNT - RemoveDirectory(aDireName.c_str()); +#ifdef WIN32 + RemoveDirectory(aDirName.c_str()); #else rmdir(aDirName.c_str()); #endif @@ -201,8 +201,8 @@ string SALOMEDSImpl_Tool::GetDirFromPath(const string& thePath) { path = thePath+"/"; } -#ifdef WNT //Check if the only disk letter is given as path - if(path.size() == 2 && path[1] == ":") path +='\\'; +#ifdef WIN32 //Check if the only disk letter is given as path + if(path.size() == 2 && path[1] == ':') path +='\\'; #endif for(int i = 0, len = path.size(); i SALOMEDSImpl_Tool::splitString(const string& theValue, char separ void SALOMEDSImpl_Tool::GetSystemDate(int& year, int& month, int& day, int& hours, int& minutes, int& seconds) { -#ifdef WNT +#ifdef WIN32 SYSTEMTIME st; GetLocalTime ( &st ); @@ -268,13 +268,17 @@ void SALOMEDSImpl_Tool::GetSystemDate(int& year, int& month, int& day, int& hour #endif } +//Warning undef of Ascii Winwows define +#ifdef WIN32 +# undef GetUserName +#endif string SALOMEDSImpl_Tool::GetUserName() { -#ifdef WNT +#ifdef WIN32 char* pBuff = new char[UNLEN + 1]; DWORD dwSize = UNLEN + 1; string retVal; - GetUserName ( pBuff, &dwSize ); + ::GetUserNameA( pBuff, &dwSize ); string theTmpUserName(pBuff,(int)dwSize -1 ); retVal = theTmpUserName; delete [] pBuff; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx index 36ca6874f..8fb8899b5 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Tool.hxx @@ -28,17 +28,19 @@ #ifndef __SALOMEDSIMPL_TOOL_H__ #define __SALOMEDSIMPL_TOOL_H__ +#include "SALOMEDSImpl_Defines.hxx" + #include #include #include "DF_Label.hxx" -class SALOMEDSImpl_Tool +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_Tool { public: // Returns the unique temporary directory, that is defined in SALOME_TMP_DIR if this variable is set - // otherwise return /tmp/something/ for Unix or c:\something\ for WNT + // otherwise return /tmp/something/ for Unix or c:\something\ for WIN32 static std::string GetTmpDir(); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.hxx index c54a5dd93..d9413c443 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.hxx @@ -24,6 +24,8 @@ #ifndef __SALOMEDSIMPL_USECaseBuilder_H__ #define __SALOMEDSIMPL_USECaseBuilder_H__ +#include "SALOMEDSImpl_Defines.hxx" + #include #include "DF_Document.hxx" @@ -31,7 +33,7 @@ #include "SALOMEDSImpl_AttributeTreeNode.hxx" #include "SALOMEDSImpl_UseCaseIterator.hxx" -class SALOMEDSImpl_UseCaseBuilder +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_UseCaseBuilder { private: @@ -41,38 +43,38 @@ private: public: //! standard constructor - Standard_EXPORT SALOMEDSImpl_UseCaseBuilder(DF_Document* theDocument); - + SALOMEDSImpl_UseCaseBuilder(DF_Document* theDocument); + //! standard destructor - Standard_EXPORT ~SALOMEDSImpl_UseCaseBuilder(); - - Standard_EXPORT virtual bool Append(const SALOMEDSImpl_SObject& theObject); + ~SALOMEDSImpl_UseCaseBuilder(); + + virtual bool Append(const SALOMEDSImpl_SObject& theObject); + + virtual bool Remove(const SALOMEDSImpl_SObject& theObject); - Standard_EXPORT virtual bool Remove(const SALOMEDSImpl_SObject& theObject); + virtual bool AppendTo(const SALOMEDSImpl_SObject& theFather, const SALOMEDSImpl_SObject& theObject); - Standard_EXPORT virtual bool AppendTo(const SALOMEDSImpl_SObject& theFather, const SALOMEDSImpl_SObject& theObject); + virtual bool InsertBefore(const SALOMEDSImpl_SObject& theFirst, const SALOMEDSImpl_SObject& theNext); - Standard_EXPORT virtual bool InsertBefore(const SALOMEDSImpl_SObject& theFirst, const SALOMEDSImpl_SObject& theNext); + virtual bool SetCurrentObject(const SALOMEDSImpl_SObject& theObject); - Standard_EXPORT virtual bool SetCurrentObject(const SALOMEDSImpl_SObject& theObject); - - Standard_EXPORT virtual bool SetRootCurrent(); + virtual bool SetRootCurrent(); - Standard_EXPORT virtual bool HasChildren(const SALOMEDSImpl_SObject& theObject); + virtual bool HasChildren(const SALOMEDSImpl_SObject& theObject); - Standard_EXPORT virtual bool IsUseCase(const SALOMEDSImpl_SObject& theObject); + virtual bool IsUseCase(const SALOMEDSImpl_SObject& theObject); - Standard_EXPORT virtual bool SetName(const std::string& theName); + virtual bool SetName(const std::string& theName); - Standard_EXPORT virtual SALOMEDSImpl_SObject GetCurrentObject(); + virtual SALOMEDSImpl_SObject GetCurrentObject(); - Standard_EXPORT virtual std::string GetName(); + virtual std::string GetName(); - Standard_EXPORT virtual SALOMEDSImpl_SObject AddUseCase(const std::string& theName); + virtual SALOMEDSImpl_SObject AddUseCase(const std::string& theName); - Standard_EXPORT virtual SALOMEDSImpl_UseCaseIterator GetUseCaseIterator(const SALOMEDSImpl_SObject& anObject); + virtual SALOMEDSImpl_UseCaseIterator GetUseCaseIterator(const SALOMEDSImpl_SObject& anObject); - Standard_EXPORT SALOMEDSImpl_SObject GetSObject(const std::string& theEntry); + SALOMEDSImpl_SObject GetSObject(const std::string& theEntry); }; #endif diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.hxx index a01cb1040..7d0182eb0 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.hxx @@ -24,13 +24,15 @@ #ifndef __SALOMEDSIMPL_USECASEITERATOR_H__ #define __SALOMEDSIMPL_USECASEITERATOR_H__ +#include "SALOMEDSImpl_Defines.hxx" + #include "SALOMEDSImpl_SObject.hxx" #include "DF_ChildIterator.hxx" #include "SALOMEDSImpl_ChildNodeIterator.hxx" #include -class Standard_EXPORT SALOMEDSImpl_UseCaseIterator +class SALOMEDSIMPL_EXPORT SALOMEDSImpl_UseCaseIterator { private: @@ -45,12 +47,12 @@ public: //! standard constructor SALOMEDSImpl_UseCaseIterator(const DF_Label& theLabel, - const std::string& theGUID, - const bool allLevels); - + const std::string& theGUID, + const bool allLevels); + //! standard destructor ~SALOMEDSImpl_UseCaseIterator(); - + virtual void Init(bool); virtual bool More(); virtual void Next(); diff --git a/src/SALOMELocalTrace/BaseTraceCollector.cxx b/src/SALOMELocalTrace/BaseTraceCollector.cxx index 5980a4075..9c3b222cb 100644 --- a/src/SALOMELocalTrace/BaseTraceCollector.cxx +++ b/src/SALOMELocalTrace/BaseTraceCollector.cxx @@ -37,7 +37,7 @@ using namespace std; // Class attributes initialisation, for class method BaseTraceCollector::run BaseTraceCollector* BaseTraceCollector::_singleton = 0; -#ifndef WNT +#ifndef WIN32 pthread_mutex_t BaseTraceCollector::_singletonMutex; #else pthread_mutex_t BaseTraceCollector::_singletonMutex = diff --git a/src/SALOMELocalTrace/FileTraceCollector.cxx b/src/SALOMELocalTrace/FileTraceCollector.cxx index 6646fbba6..42eac1161 100644 --- a/src/SALOMELocalTrace/FileTraceCollector.cxx +++ b/src/SALOMELocalTrace/FileTraceCollector.cxx @@ -124,7 +124,7 @@ void* FileTraceCollector::run(void *bid) myTraceBuffer->retrieve(myTrace); if (myTrace.traceType == ABORT_MESS) { -#ifndef WNT +#ifndef WIN32 traceFile << "INTERRUPTION from thread " << myTrace.threadId << " : " << myTrace.trace; #else @@ -134,7 +134,7 @@ void* FileTraceCollector::run(void *bid) #endif traceFile.close(); cout << flush ; -#ifndef WNT +#ifndef WIN32 cerr << "INTERRUPTION from thread " << myTrace.threadId << " : " << myTrace.trace; #else @@ -146,7 +146,7 @@ void* FileTraceCollector::run(void *bid) } else { -#ifndef WNT +#ifndef WIN32 traceFile << "th. " << myTrace.threadId << " " << myTrace.trace; #else diff --git a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx index 02fc9839d..345331c71 100644 --- a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx +++ b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx @@ -28,7 +28,7 @@ #include #include -#ifndef WNT +#ifndef WIN32 #include #else #include @@ -52,7 +52,7 @@ using namespace std; // Class static attributes initialisation LocalTraceBufferPool* LocalTraceBufferPool::_singleton = 0; -//#ifndef WNT +//#ifndef WIN32 //pthread_mutex_t LocalTraceBufferPool::_singletonMutex; //#else pthread_mutex_t LocalTraceBufferPool::_singletonMutex = @@ -110,7 +110,7 @@ LocalTraceBufferPool* LocalTraceBufferPool::instance() } else // --- try a dynamic library { -#ifndef WNT +#ifndef WIN32 void* handle; string impl_name = string ("lib") + traceKind + string("TraceCollector.so"); @@ -123,7 +123,7 @@ LocalTraceBufferPool* LocalTraceBufferPool::instance() if ( handle ) { typedef BaseTraceCollector * (*FACTORY_FUNCTION) (void); -#ifndef WNT +#ifndef WIN32 FACTORY_FUNCTION TraceCollectorFactory = (FACTORY_FUNCTION) dlsym(handle, "SingletonInstance"); #else @@ -133,7 +133,7 @@ LocalTraceBufferPool* LocalTraceBufferPool::instance() if ( !TraceCollectorFactory ) { cerr << "Can't resolve symbol: SingletonInstance" < #include -#ifdef WNT +#ifdef WIN32 #include #endif @@ -113,7 +113,7 @@ CORBA::Object_ptr TraceCollector_WaitForServerReadiness(CORBA::ORB_ptr orb, cout << "Caught exception: Naming Service can't found Logger"; } } -#ifndef WNT +#ifndef WIN32 nanosleep(&ts_req,&ts_rem); #else Sleep(TIMESleep / 1000000); -- 2.39.2