#else
#include <signal.h>
#include <process.h>
+#include <direct.h>
int SIGUSR1 = 1000;
#endif
#include <stdexcept>
#include <signal.h>
#include <sys/types.h>
-#include <sys/wait.h>
+#ifndef WIN32
+# include <sys/wait.h>
+#endif
+#ifndef WIN32
typedef void (*sighandler_t)(int);
sighandler_t setsig(int sig, sighandler_t handler)
{
return SIG_ERR;
return ocontext.sa_handler;
}
+#endif //WIN32
void AttachDebugger()
{
+#ifndef WIN32
if(getenv ("DEBUGGER"))
{
std::stringstream exec;
system(exec.str().c_str());
while(1);
}
+#endif
}
void Handler(int theSigId)
MPI_Init(&argc,&argv);
#endif
+#ifndef WIN32
if(getenv ("DEBUGGER"))
{
setsig(SIGSEGV,&Handler);
set_terminate(&terminateHandler);
set_unexpected(&unexpectedHandler);
}
+#endif
// Initialise the ORB.
//SRN: BugID: IPAL9541, it's necessary to set a size of one message to be at least 100Mb
#include <vector>
#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 RESOURCESMANAGER_EXPORTS
+# define RESOURCESMANAGER_EXPORT __declspec( dllexport )
+# else
+# define RESOURCESMANAGER_EXPORT __declspec( dllimport )
+# endif
#else
-#define RESOURCESMANAGER_EXPORT
-#endif
+# define RESOURCESMANAGER_EXPORT
#endif
// --- WARNING ---
SALOMEDSImpl_Study.hxx \
SALOMEDSImpl_StudyManager.hxx \
SALOMEDSImpl_ChildNodeIterator.hxx \
+ SALOMEDSImpl_Defines.hxx \
SALOMEDSImpl_IParameters.hxx \
SALOMEDSImpl_TMPFile.hxx
SALOMEDSImpl_Callback.hxx \
SALOMEDSImpl_ChildIterator.hxx \
SALOMEDSImpl_ChildNodeIterator.hxx \
+ SALOMEDSImpl_Defines.hxx \
SALOMEDSImpl_Driver.hxx \
SALOMEDSImpl_GenericAttribute.hxx \
SALOMEDSImpl_SComponent.hxx \
#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()))) {
//function : ID
//purpose :
//=======================================================================
-const std::string& SALOMEDSImpl_AttributeComment::ID () const { return GetID(); }
+const string& SALOMEDSImpl_AttributeComment::ID () const { return GetID(); }
//=======================================================================
//function : NewEmpty
#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 <string>
-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() {}
};
#ifndef _SALOMEDSImpl_AttributeDrawable_HeaderFile
#define _SALOMEDSImpl_AttributeDrawable_HeaderFile
+#include "SALOMEDSImpl_GenericAttribute.hxx"
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
-#include <string>
#include "DF_Label.hxx"
-#include "SALOMEDSImpl_GenericAttribute.hxx"
-
-class SALOMEDSImpl_AttributeDrawable : public SALOMEDSImpl_GenericAttribute
+#include <string>
+
+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() {}
};
#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 <string>
-#include "SALOMEDSImpl_GenericAttribute.hxx"
+#include <string>
-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() {}
};
#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 <string>
-#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; }
};
#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 <string>
-#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; }
};
#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;
};
#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 <map>
/*
- 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<int, int>& );
-Standard_EXPORT void SetVisibility( const std::map<int, int>& );
+ const std::map<int, int>& GetVisibility();
-Standard_EXPORT const std::map<int, int>& GetVisibility();
-
private:
std::map<int, int> myVisibility;
#ifndef _SALOMEDSImpl_AttributeIOR_HeaderFile
#define _SALOMEDSImpl_AttributeIOR_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include <string>
#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() {}
};
#include "SALOMEDSImpl_AttributeInteger.hxx"
-#ifndef WNT
-using namespace std;
-#endif
-
#include <stdlib.h>
+using namespace std;
//=======================================================================
//function : GetID
#ifndef _SALOMEDSImpl_AttributeInteger_HeaderFile
#define _SALOMEDSImpl_AttributeInteger_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include <string>
#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() {}
};
#ifndef _SALOMEDSImpl_AttributeLocalID_HeaderFile
#define _SALOMEDSImpl_AttributeLocalID_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include <string>
#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() {}
};
#ifndef _SALOMEDSImpl_AttributeName_HeaderFile
#define _SALOMEDSImpl_AttributeName_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include <string>
#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() {}
};
#ifndef _SALOMEDSImpl_AttributeOpened_HeaderFile
#define _SALOMEDSImpl_AttributeOpened_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include <string>
#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() {}
};
#ifndef _SALOMEDSImpl_AttributeParameter_HeaderFile
#define _SALOMEDSImpl_AttributeParameter_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include "SALOMEDSImpl_GenericAttribute.hxx"
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<std::string, int> _ints;
std::map<std::string, double> _reals;
std::map<std::string, std::string> _strings;
std::map< std::string, std::vector<std::string> > _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<double>& theArray);
- Standard_EXPORT std::vector<double> GetRealArray(const std::string& theID);
-
- Standard_EXPORT void SetIntArray(const std::string& theID, const std::vector<int>& theArray);
- Standard_EXPORT std::vector<int> GetIntArray(const std::string& theID);
-
- Standard_EXPORT void SetStrArray(const std::string& theID, const std::vector<std::string>& theArray);
- Standard_EXPORT std::vector<std::string> 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<std::string> 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<double>& theArray);
+ std::vector<double> GetRealArray(const std::string& theID);
+
+ void SetIntArray(const std::string& theID, const std::vector<int>& theArray);
+ std::vector<int> GetIntArray(const std::string& theID);
+
+ void SetStrArray(const std::string& theID, const std::vector<std::string>& theArray);
+ std::vector<std::string> 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<std::string> 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
#ifndef _SALOMEDSImpl_AttributePersistentRef_HeaderFile
#define _SALOMEDSImpl_AttributePersistentRef_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include <string>
#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() {}
};
#ifndef _SALOMEDSImpl_AttributePixMap_HeaderFile
#define _SALOMEDSImpl_AttributePixMap_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include <string>
#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() {}
};
#ifndef _SALOMEDSImpl_AttributePythonObject_HeaderFile
#define _SALOMEDSImpl_AttributePythonObject_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include <string>
#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;
};
#ifndef _SALOMEDSImpl_AttributeReal_HeaderFile
#define _SALOMEDSImpl_AttributeReal_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include <string>
#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() {}
};
#ifndef _SALOMEDSImpl_AttributeReference_HeaderFile
#define _SALOMEDSImpl_AttributeReference_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include <string>
#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
#ifndef _SALOMEDSImpl_AttributeSelectable_HeaderFile
#define _SALOMEDSImpl_AttributeSelectable_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include <string>
#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() {}
};
#ifndef _SALOMEDSImpl_AttributeSequenceOfInteger_HeaderFile
#define _SALOMEDSImpl_AttributeSequenceOfInteger_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include <vector>
#include <string>
#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<int>& 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<int>& 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<int>& 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<int>& Array() { return myValue; }
private:
-std::vector<int> myValue;
+ std::vector<int> myValue;
};
#endif
#ifndef _SALOMEDSImpl_AttributeSequenceOfReal_HeaderFile
#define _SALOMEDSImpl_AttributeSequenceOfReal_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include <string>
#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<double>& 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<double>& 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<double>& 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<double>& Array() { return myValue; }
private:
-std::vector<double> myValue;
+ std::vector<double> myValue;
};
#ifndef _SALOMEDSImpl_AttributeStudyProperties_HeaderFile
#define _SALOMEDSImpl_AttributeStudyProperties_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include <string>
#include <vector>
#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<std::string>& theUserNames,
- std::vector<int>& theMinutes,
- std::vector<int>& theHours,
- std::vector<int>& theDays,
- std::vector<int>& theMonths,
- std::vector<int>& 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<std::string>& theUserNames,
+ std::vector<int>& theMinutes,
+ std::vector<int>& theHours,
+ std::vector<int>& theDays,
+ std::vector<int>& theMonths,
+ std::vector<int>& 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<std::string> myUserName;
-std::vector<int> myMinute;
-std::vector<int> myHour;
-std::vector<int> myDay;
-std::vector<int> myMonth;
-std::vector<int> myYear;
-int myMode;
-int myModified;
-bool myLocked;
-bool myLockChanged;
+ std::vector<std::string> myUserName;
+ std::vector<int> myMinute;
+ std::vector<int> myHour;
+ std::vector<int> myDay;
+ std::vector<int> myMonth;
+ std::vector<int> myYear;
+ int myMode;
+ int myModified;
+ bool myLocked;
+ bool myLockChanged;
};
aString += myRows[i][j];
aString += '\n';
}
- }
+ }
//Nb columns
sprintf(buffer, "%d\n", myNbColumns);
#ifndef _SALOMEDSImpl_AttributeTableOfInteger_HeaderFile
#define _SALOMEDSImpl_AttributeTableOfInteger_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include "SALOMEDSImpl_GenericAttribute.hxx"
#include <map>
-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<int>& theData) ;
-Standard_EXPORT std::vector<int> 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<std::string>& theUnits) ;
-Standard_EXPORT std::vector<std::string> GetRowUnits();
-Standard_EXPORT void SetRowTitles(const std::vector<std::string>& theTitles) ;
-Standard_EXPORT std::vector<std::string> GetRowTitles();
-Standard_EXPORT std::string GetRowTitle(const int theRow) const;
-Standard_EXPORT void SetColumnData(const int theColumn,const std::vector<int>& theData) ;
-Standard_EXPORT std::vector<int> 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<std::string>& theTitles);
-Standard_EXPORT std::vector<std::string> 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<int>& theData) ;
+ std::vector<int> 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<std::string>& theUnits) ;
+ std::vector<std::string> GetRowUnits();
+ void SetRowTitles(const std::vector<std::string>& theTitles) ;
+ std::vector<std::string> GetRowTitles();
+ std::string GetRowTitle(const int theRow) const;
+ void SetColumnData(const int theColumn,const std::vector<int>& theData) ;
+ std::vector<int> 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<std::string>& theTitles);
+ std::vector<std::string> 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<int> GetSetRowIndices(const int theRow);
-Standard_EXPORT std::vector<int> GetSetColumnIndices(const int theColumn);
+ std::vector<int> GetSetRowIndices(const int theRow);
+ std::vector<int> GetSetColumnIndices(const int theColumn);
-Standard_EXPORT ~SALOMEDSImpl_AttributeTableOfInteger() {}
+ ~SALOMEDSImpl_AttributeTableOfInteger() {}
private:
-std::map<int, int> myTable;
-std::string myTitle;
-std::vector<std::string> myRows;
-std::vector<std::string> myCols;
-int myNbRows;
-int myNbColumns;
+ std::map<int, int> myTable;
+ std::string myTitle;
+ std::vector<std::string> myRows;
+ std::vector<std::string> myCols;
+ int myNbRows;
+ int myNbColumns;
};
aString += myTitle[i];
aString +='\n';
}
-
+
//Nb rows
sprintf(buffer, "%d\n", myNbRows);
aString+=buffer;
aString += myRows[i][j];
aString += '\n';
}
- }
+ }
//Nb columns
sprintf(buffer, "%d\n", myNbColumns);
sprintf(buffer, "%d\n%.64e\n", p->first, p->second);
aString += buffer;
}
-
+
delete []buffer;
return aString;
}
#ifndef _SALOMEDSImpl_AttributeTableOfReal_HeaderFile
#define _SALOMEDSImpl_AttributeTableOfReal_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include "SALOMEDSImpl_GenericAttribute.hxx"
#include <vector>
#include <map>
-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<double>& theData) ;
-Standard_EXPORT std::vector<double> 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<std::string>& theUnits) ;
-Standard_EXPORT std::vector<std::string> GetRowUnits();
-Standard_EXPORT void SetRowTitles(const std::vector<std::string>& theTitles) ;
-Standard_EXPORT std::vector<std::string> GetRowTitles();
-Standard_EXPORT std::string GetRowTitle(const int theRow) const;
-Standard_EXPORT void SetColumnData(const int theColumn,const std::vector<double>& theData) ;
-Standard_EXPORT std::vector<double> GetColumnData(const int theColumn) ;
-Standard_EXPORT void SetColumnTitle(const int theColumn,const std::string& theTitle) ;
-Standard_EXPORT void SetColumnTitles(const std::vector<std::string>& theTitles);
-Standard_EXPORT std::vector<std::string> 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<double>& theData) ;
+ std::vector<double> 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<std::string>& theUnits) ;
+ std::vector<std::string> GetRowUnits();
+ void SetRowTitles(const std::vector<std::string>& theTitles) ;
+ std::vector<std::string> GetRowTitles();
+ std::string GetRowTitle(const int theRow) const;
+ void SetColumnData(const int theColumn,const std::vector<double>& theData) ;
+ std::vector<double> GetColumnData(const int theColumn) ;
+ void SetColumnTitle(const int theColumn,const std::string& theTitle) ;
+ void SetColumnTitles(const std::vector<std::string>& theTitles);
+ std::vector<std::string> 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<int> GetSetRowIndices(const int theRow);
-Standard_EXPORT std::vector<int> GetSetColumnIndices(const int theColumn);
+ std::vector<int> GetSetRowIndices(const int theRow);
+ std::vector<int> GetSetColumnIndices(const int theColumn);
-Standard_EXPORT ~SALOMEDSImpl_AttributeTableOfReal() {}
+ ~SALOMEDSImpl_AttributeTableOfReal() {}
private:
-std::map<int, double> myTable;
-std::string myTitle;
-std::vector<std::string> myRows;
-std::vector<std::string> myCols;
-int myNbRows;
-int myNbColumns;
+ std::map<int, double> myTable;
+ std::string myTitle;
+ std::vector<std::string> myRows;
+ std::vector<std::string> myCols;
+ int myNbRows;
+ int myNbColumns;
};
aString += myRows[i][j];
aString += '\n';
}
- }
+ }
//Nb columns
sprintf(buffer, "%d\n", myNbColumns);
#ifndef _SALOMEDSImpl_AttributeTableOfString_HeaderFile
#define _SALOMEDSImpl_AttributeTableOfString_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Label.hxx"
#include "DF_Attribute.hxx"
#include "SALOMEDSImpl_GenericAttribute.hxx"
#include <vector>
#include <map>
-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<std::string>& theData) ;
-Standard_EXPORT std::vector<std::string> 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<std::string>& theUnits) ;
-Standard_EXPORT std::vector<std::string> GetRowUnits();
-Standard_EXPORT void SetRowTitles(const std::vector<std::string>& theTitles) ;
-Standard_EXPORT std::vector<std::string> GetRowTitles();
-Standard_EXPORT std::string GetRowTitle(const int theRow) const;
-Standard_EXPORT void SetColumnData(const int theColumn,const std::vector<std::string>& theData) ;
-Standard_EXPORT std::vector<std::string> 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<std::string>& theTitles);
-Standard_EXPORT std::vector<std::string> 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<std::string>& theData) ;
+ std::vector<std::string> 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<std::string>& theUnits) ;
+ std::vector<std::string> GetRowUnits();
+ void SetRowTitles(const std::vector<std::string>& theTitles) ;
+ std::vector<std::string> GetRowTitles();
+ std::string GetRowTitle(const int theRow) const;
+ void SetColumnData(const int theColumn,const std::vector<std::string>& theData) ;
+ std::vector<std::string> 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<std::string>& theTitles);
+ std::vector<std::string> 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<int> GetSetRowIndices(const int theRow);
-Standard_EXPORT std::vector<int> GetSetColumnIndices(const int theColumn);
+ std::vector<int> GetSetRowIndices(const int theRow);
+ std::vector<int> GetSetColumnIndices(const int theColumn);
-Standard_EXPORT ~SALOMEDSImpl_AttributeTableOfString() {}
+ ~SALOMEDSImpl_AttributeTableOfString() {}
private:
-std::map<int, std::string> myTable;
-std::string myTitle;
-std::vector<std::string> myRows;
-std::vector<std::string> myCols;
-int myNbRows;
-int myNbColumns;
+ std::map<int, std::string> myTable;
+ std::string myTitle;
+ std::vector<std::string> myRows;
+ std::vector<std::string> myCols;
+ int myNbRows;
+ int myNbColumns;
};
#ifndef _SALOMEDSImpl_AttributeTarget_HeaderFile
#define _SALOMEDSImpl_AttributeTarget_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include <string>
#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<DF_Attribute*> myVariables;
+ std::string myRelation;
+ std::vector<DF_Attribute*> 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<SALOMEDSImpl_SObject> 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<DF_Attribute*>& 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<SALOMEDSImpl_SObject> Get();
+ void Remove(const SALOMEDSImpl_SObject& theSO);
+ std::string GetRelation() { return myRelation; }
+ void SetRelation(const std::string& theRelation);
+ std::vector<DF_Attribute*>& GetVariables() { return myVariables; }
+ const std::string& ID() const;
+ void Restore(DF_Attribute* with) ;
+ DF_Attribute* NewEmpty() const;
+ void Paste(DF_Attribute* into);
+ ~SALOMEDSImpl_AttributeTarget() {}
};
#ifndef _SALOMEDSImpl_AttributeTextColor_HeaderFile
#define _SALOMEDSImpl_AttributeTextColor_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include <string>
#include <vector>
#include "SALOMEDSImpl_GenericAttribute.hxx"
-class SALOMEDSImpl_AttributeTextColor : public SALOMEDSImpl_GenericAttribute
+class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTextColor :
+ public SALOMEDSImpl_GenericAttribute
{
private:
std::vector<double> 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<double> TextColor();
-Standard_EXPORT void ChangeArray(const std::vector<double>& 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<double> TextColor();
+ void ChangeArray(const std::vector<double>& newArray);
+ void Restore(DF_Attribute* with) ;
+ DF_Attribute* NewEmpty() const;
+ void Paste( DF_Attribute* into);
+ ~SALOMEDSImpl_AttributeTextColor() {}
};
#ifndef _SALOMEDSImpl_AttributeTextHighlightColor_HeaderFile
#define _SALOMEDSImpl_AttributeTextHighlightColor_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include <string>
#include "SALOMEDSImpl_GenericAttribute.hxx"
-class SALOMEDSImpl_AttributeTextHighlightColor : public SALOMEDSImpl_GenericAttribute
+class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AttributeTextHighlightColor :
+ public SALOMEDSImpl_GenericAttribute
{
private:
std::vector<double> 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<double> TextHighlightColor();
-Standard_EXPORT void ChangeArray(const std::vector<double>& 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<double> TextHighlightColor();
+ void ChangeArray(const std::vector<double>& newArray);
+ const std::string& ID() const;
+ void Restore(DF_Attribute* with) ;
+ DF_Attribute* NewEmpty() const;
+ void Paste(DF_Attribute* into);
+ ~SALOMEDSImpl_AttributeTextHighlightColor() {}
};
#endif
#ifndef _SALOMEDSImpl_AttributeTreeNode_HeaderFile
#define _SALOMEDSImpl_AttributeTreeNode_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include <string>
#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;
};
#ifndef _SALOMEDSImpl_AttributeUserID_HeaderFile
#define _SALOMEDSImpl_AttributeUserID_HeaderFile
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Attribute.hxx"
#include "DF_Label.hxx"
#include <string>
#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() {}
};
#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 <iostream>
class SALOMEDSIMPL_EXPORT LockProtection
#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);
+ }
};
#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;
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
#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;
};
--- /dev/null
+// 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
#ifndef __SALOMEDSIMPL_DRIVER_H__
#define __SALOMEDSIMPL_DRIVER_H__
+#include "SALOMEDSImpl_Defines.hxx"
#include <string>
#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;
using namespace std;
-char* SALOMEDSImpl_GenericAttribute::Impl_GetType(DF_Attribute* theAttr)
+string SALOMEDSImpl_GenericAttribute::Impl_GetType(DF_Attribute* theAttr)
{
SALOMEDSImpl_GenericAttribute* ga = dynamic_cast<SALOMEDSImpl_GenericAttribute*>(theAttr);
- return (char*)ga->Type().c_str();
+ if (ga)
+ return ga->Type();
+
+ return "";
}
-char* SALOMEDSImpl_GenericAttribute::Impl_GetClassType(DF_Attribute* theAttr)
+string SALOMEDSImpl_GenericAttribute::Impl_GetClassType(DF_Attribute* theAttr)
{
SALOMEDSImpl_GenericAttribute* ga = dynamic_cast<SALOMEDSImpl_GenericAttribute*>(theAttr);
- return (char*)ga->GetClassType().c_str();
+ if (ga)
+ return ga->GetClassType();
+
+ return "";
}
void SALOMEDSImpl_GenericAttribute::Impl_CheckLocked(DF_Attribute* theAttr)
#ifndef _GENERICIMPL_ATTRIBUTE_HXX_
#define _GENERICIMPL_ATTRIBUTE_HXX_
+#include "SALOMEDSImpl_Defines.hxx"
#include "DF_Label.hxx"
#include "DF_Attribute.hxx"
#include <string>
#include "SALOMEDSImpl_SObject.hxx"
-class SALOMEDSImpl_GenericAttribute: public DF_Attribute
+class SALOMEDSIMPL_EXPORT SALOMEDSImpl_GenericAttribute:
+ public DF_Attribute
{
protected:
public:
-Standard_EXPORT SALOMEDSImpl_GenericAttribute(const std::string& theType)
-:_type(theType)
-{}
+ SALOMEDSImpl_GenericAttribute(const std::string& theType)
+ :_type(theType)
+ {}
-Standard_EXPORT virtual std::string Type();
-Standard_EXPORT virtual void CheckLocked();
-Standard_EXPORT std::string GetClassType() { return _type; }
-Standard_EXPORT SALOMEDSImpl_SObject GetSObject();
-Standard_EXPORT void SetModifyFlag();
+ virtual std::string Type();
+ virtual void CheckLocked();
+ std::string GetClassType() { return _type; }
+ SALOMEDSImpl_SObject GetSObject();
+ void SetModifyFlag();
-Standard_EXPORT static char* Impl_GetType(DF_Attribute* theAttr);
-Standard_EXPORT static char* Impl_GetClassType(DF_Attribute* theAttr);
-Standard_EXPORT static void Impl_CheckLocked(DF_Attribute* theAttr);
+ static std::string Impl_GetType(DF_Attribute* theAttr);
+ static std::string Impl_GetClassType(DF_Attribute* theAttr);
+ static void Impl_CheckLocked(DF_Attribute* theAttr);
};
#ifndef SALOMEDSImpl_IParameters_H
#define SALOMEDSImpl_IParameters_H
+#include "SALOMEDSImpl_Defines.hxx"
#include <string>
#include <vector>
#include <map>
#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);
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<std::string> 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<std::string> 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<std::string> getAllParameterNames(const std::string& entry);
/*!
- Returns all parameter values of the given entry
- */
+ Returns all parameter values of the given entry
+ */
virtual std::vector<std::string> 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<std::string> 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<std::string> 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();
#define __SALOMEDSIMPL_SCOMPONENT_H__
//SALOMEDSImpl headers
+#include "SALOMEDSImpl_Defines.hxx"
#include "SALOMEDSImpl_SObject.hxx"
// std C++ headers
#include <iostream>
#include <string>
-// Cascade headers
#include "DF_Label.hxx"
#include "SALOMEDSImpl_SObject.hxx"
#include <stdio.h>
-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
//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 <stdio.h>
-class Standard_EXPORT SALOMEDSImpl_SComponentIterator
+class SALOMEDSIMPL_EXPORT SALOMEDSImpl_SComponentIterator
{
private:
DF_Label _lab;
public:
-
+
SALOMEDSImpl_SComponentIterator(const SALOMEDSImpl_SComponentIterator& theIterator)
{
_it = theIterator._it;
}
SALOMEDSImpl_SComponentIterator() {};
-
+
SALOMEDSImpl_SComponentIterator(DF_Document* theDocument);
-
+
~SALOMEDSImpl_SComponentIterator() {};
-
+
virtual void Init();
virtual bool More();
virtual void Next();
#ifndef __SALOMEDSIMPL_SOBJECT_H__
#define __SALOMEDSIMPL_SOBJECT_H__
+#include "SALOMEDSImpl_Defines.hxx"
+
#include "DF_Label.hxx"
#include "DF_Attribute.hxx"
#include <string>
class SALOMEDSImpl_SComponent;
class SALOMEDSImpl_Study;
-class SALOMEDSImpl_SObject
+class SALOMEDSIMPL_EXPORT SALOMEDSImpl_SObject
{
protected:
DF_Label _lab;
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<DF_Attribute*> 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<DF_Attribute*> 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
#include <vector>
#include <map>
-// Cascade headers
#include "DF_Document.hxx"
#include "DF_Label.hxx"
#include <stdio.h>
//SALOMEDSImpl headers
+#include "SALOMEDSImpl_Defines.hxx"
#include "SALOMEDSImpl_SComponentIterator.hxx"
#include "SALOMEDSImpl_SObject.hxx"
#include "SALOMEDSImpl_StudyBuilder.hxx"
class SALOMEDSImpl_GenericAttribute;
-class SALOMEDSImpl_Study
+class SALOMEDSIMPL_EXPORT SALOMEDSImpl_Study
{
private:
std::string _name;
std::map<std::string, SALOMEDSImpl_SObject> _mapOfSO;
std::map<std::string, SALOMEDSImpl_SComponent> _mapOfSCO;
std::map<std::string, DF_Label> 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<SALOMEDSImpl_SObject> FindObjectByName( const std::string& anObjectName,
+ virtual std::vector<SALOMEDSImpl_SObject> 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<std::string> GetObjectNames(const std::string& theContext);
+ virtual std::vector<std::string> 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<std::string> GetDirectoryNames(const std::string& theContext);
+ virtual std::vector<std::string> 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<std::string> GetFileNames(const std::string& theContext);
+ virtual std::vector<std::string> GetFileNames(const std::string& theContext);
//! method to get all components names
- Standard_EXPORT virtual std::vector<std::string> GetComponentNames(const std::string& theContext);
+ virtual std::vector<std::string> 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<SALOMEDSImpl_SObject> FindDependances(const SALOMEDSImpl_SObject& anObject);
-
- Standard_EXPORT virtual SALOMEDSImpl_AttributeStudyProperties* GetProperties();
-
- Standard_EXPORT virtual std::string GetLastModificationDate();
-
- Standard_EXPORT virtual std::vector<std::string> 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<SALOMEDSImpl_SObject> FindDependances(const SALOMEDSImpl_SObject& anObject);
+
+ virtual SALOMEDSImpl_AttributeStudyProperties* GetProperties();
+
+ virtual std::string GetLastModificationDate();
+
+ virtual std::vector<std::string> 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<std::string> GetLockerID();
+ std::vector<std::string> 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<std::string> GetIORs();
-
+ std::vector<std::string> GetIORs();
-friend class SALOMEDSImpl_StudyManager;
-friend class SALOMEDSImpl_GenericAttribute;
+ friend class SALOMEDSImpl_StudyManager;
+ friend class SALOMEDSImpl_GenericAttribute;
};
#endif
#ifndef __SALOMEDSImpl_STUDYBUILDER_H__
#define __SALOMEDSImpl_STUDYBUILDER_H__
+#include "SALOMEDSImpl_Defines.hxx"
// std C++ headers
#include <iostream>
#include <string>
#include <vector>
-
+
#include "SALOMEDSImpl_Callback.hxx"
#include "SALOMEDSImpl_Driver.hxx"
class SALOMEDSImpl_Study;
-class SALOMEDSImpl_StudyBuilder
+class SALOMEDSIMPL_EXPORT SALOMEDSImpl_StudyBuilder
{
private:
DF_Document* _doc;
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
#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;
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";
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);
//-----------------------------------------------------------------------
//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
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);
#ifndef __SALOMEDSImpl_STUDYMANAGER_I_H__
#define __SALOMEDSImpl_STUDYMANAGER_I_H__
+#include "SALOMEDSImpl_Defines.hxx"
+
// std C++ headers
#include <strstream>
#include <string>
class HDFgroup;
-class SALOMEDSImpl_StudyManager
+class SALOMEDSIMPL_EXPORT SALOMEDSImpl_StudyManager
{
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<SALOMEDSImpl_Study*> GetOpenStudies();
+ virtual std::vector<SALOMEDSImpl_Study*> 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 != ""; }
};
#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;
};
// Project : SALOME
// Module : SALOMEDSImpl
-#include "SALOMEDSImpl_Tool.hxx"
-
#include <stdio.h>
#include <iostream>
#include <fstream>
+#include <stdlib.h>
+#include "SALOMEDSImpl_Tool.hxx"
#ifndef WNT
#include <sys/time.h>
#else
#include <time.h>
#include <lmcons.h>
+//#include <winbase.h>
+#include <windows.h>
#endif
-#include <stdlib.h>
-
using namespace std;
if(IsDirDeleted) {
if(Exists(aDirName)) {
#ifdef WNT
- RemoveDirectory(aDireName.c_str());
+ RemoveDirectory(aDirName.c_str());
#else
rmdir(aDirName.c_str());
#endif
}
#ifdef WNT //Check if the only disk letter is given as path
- if(path.size() == 2 && path[1] == ":") path +='\\';
+ if(path.size() == 2 && path[1] == ':') path +='\\';
#endif
for(int i = 0, len = path.size(); i<len; i++)
#endif
}
+//Warning undef of Ascii Winwows define
+#ifdef WNT
+# undef GetUserName
+#endif
string SALOMEDSImpl_Tool::GetUserName()
{
#ifdef WNT
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;
#ifndef __SALOMEDSIMPL_TOOL_H__
#define __SALOMEDSIMPL_TOOL_H__
+#include "SALOMEDSImpl_Defines.hxx"
+
#include <string>
#include <vector>
#include "DF_Label.hxx"
-class SALOMEDSImpl_Tool
+class SALOMEDSIMPL_EXPORT SALOMEDSImpl_Tool
{
public:
#ifndef __SALOMEDSIMPL_USECaseBuilder_H__
#define __SALOMEDSIMPL_USECaseBuilder_H__
+#include "SALOMEDSImpl_Defines.hxx"
+
#include <string>
#include "DF_Document.hxx"
#include "SALOMEDSImpl_AttributeTreeNode.hxx"
#include "SALOMEDSImpl_UseCaseIterator.hxx"
-class SALOMEDSImpl_UseCaseBuilder
+class SALOMEDSIMPL_EXPORT SALOMEDSImpl_UseCaseBuilder
{
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
#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 <string>
-class Standard_EXPORT SALOMEDSImpl_UseCaseIterator
+class SALOMEDSIMPL_EXPORT SALOMEDSImpl_UseCaseIterator
{
private:
//! 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();
#include "SALOMEDS_Tool.hxx"
#include "utilities.h"
+#include "OpUtil.hxx"
#ifndef WNT
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <iostream.h>
-#include <fstream.h>
#include <pwd.h>
#include <unistd.h>
#else
#include <lmcons.h>
#endif
+#include <iostream>
+#include <fstream>
#include <stdlib.h>
#include <SALOMEconfig.h>
{
#ifdef WNT
if ( GetFileAttributes ( thePath.c_str() ) == 0xFFFFFFFF ) {
- if ( GetLastError () != ERROR_FILE_NOT_FOUND ) {
+ if ( GetLastError () == ERROR_FILE_NOT_FOUND ) {
return false;
}
}
//============================================================================
std::string SALOMEDS_Tool::GetTmpDir()
{
+ return OpUtil_Dir::GetTmpDirByEnv("SALOME_TMP_DIR");
//Find a temporary directory to store a file
- string aTmpDir = "";
+ /*string aTmpDir = "";
char *Tmp_dir = getenv("SALOME_TMP_DIR");
if(Tmp_dir != NULL) {
mkdir(aDir.c_str(), 0x1ff);
#endif
- return aDir;
+ return aDir;*/
}
//============================================================================
if(IsDirDeleted) {
if(Exists(aDirName)) {
#ifdef WNT
- RemoveDirectory(aDireName.c_str());
+ RemoveDirectory(aDirName.c_str());
#else
rmdir(aDirName.c_str());
#endif
}
#ifdef WNT //Check if the only disk letter is given as path
- if(path.size() == 2 && path[1] == ":") path +='\\';
+ if(path.size() == 2 && path[1] == ':') path +='\\';
#endif
for(int i = 0, len = path.size(); i<len; i++)
#ifndef WNT
#include <unistd.h>
+#include <sys/stat.h>
#else
#include <winsock2.h>
#endif
using namespace std;
+
//int gethostname(char *name, size_t len);
std::string GetHostname()
return p;
}
+
+std::string OpUtil_Dir::GetTmpDirByEnv( const std::string& tmp_path_env )
+{
+ string dir;
+ char* val = getenv( tmp_path_env.c_str() );
+ val ? dir = string( val ) : "";
+ return GetTmpDirByPath( dir );
+}
+
+std::string OpUtil_Dir::GetTmpDirByPath( const std::string& tmp_path )
+{
+ string aTmpDir = tmp_path;
+ char sep =
+#ifdef WNT
+ '\\';
+#else
+ '/';
+#endif
+ /*if ( tmp_path.length() > 0 )
+ {
+ char *Tmp_dir = getenv(tmp_path_env.c_str());
+ if( Tmp_dir != NULL )
+ {
+ aTmpDir = string(Tmp_dir);
+ if(aTmpDir[aTmpDir.size()-1] != sep)
+ aTmpDir+=sep;
+ }
+ }*/
+ if ( aTmpDir == "" )
+ {
+#ifdef WNT
+ char *Tmp_dir = getenv("TEMP");
+ if( Tmp_dir == NULL )
+ {
+ Tmp_dir = getenv("TMP");
+ if (Tmp_dir == NULL)
+ aTmpDir = string("C:\\");
+ else
+ aTmpDir = string(Tmp_dir);
+ }
+ else
+ aTmpDir = string(Tmp_dir);
+#else
+ aTmpDir = string("/tmp/");
+#endif
+ }
+
+ if(aTmpDir[aTmpDir.size()-1] != sep)
+ aTmpDir+=sep;
+
+ srand((unsigned int)time(NULL));
+ int aRND = 999 + (int)(100000.0*rand()/(RAND_MAX+1.0)); //Get a random number to present a name of a sub directory
+ char buffer[127];
+ sprintf(buffer, "%d", aRND);
+ string aSubDir(buffer);
+ if(aSubDir.size() <= 1) aSubDir = string("123409876");
+
+ aTmpDir += aSubDir; //Get RND sub directory
+
+ string aDir = aTmpDir;
+
+ if(IsExists(aDir)) {
+ for(aRND = 0; IsExists(aDir); aRND++) {
+ sprintf(buffer, "%d", aRND);
+ aDir = aTmpDir+buffer; //Build a unique directory name
+ }
+ }
+
+ if(aDir[aDir.size()-1] != sep) aDir+=sep;
+
+#ifdef WNT
+ CreateDirectory(aDir.c_str(), NULL);
+#else
+ mkdir(aDir.c_str(), 0x1ff);
+#endif
+
+ return aDir;
+}
+
+//============================================================================
+// function : GetTempDir
+// purpose : Return a temp directory to store created files like "/tmp/sub_dir/"
+//============================================================================
+std::string OpUtil_Dir::GetTmpDir()
+{
+ return GetTmpDirByPath( "" );
+ //Find a temporary directory to store a file
+/*
+ string aTmpDir = "";
+ char sep =
+#ifdef WNT
+ '\\';
+#else
+ '/';
+#endif
+ if ( tmp_path_env.length() > 0 )
+ {
+ char *Tmp_dir = getenv(tmp_path_env.c_str());
+ if( Tmp_dir != NULL )
+ {
+ aTmpDir = string(Tmp_dir);
+ if(aTmpDir[aTmpDir.size()-1] != sep)
+ aTmpDir+=sep;
+ }
+ }
+ if ( aTmpDir == "" )
+ {
+#ifdef WNT
+ char *Tmp_dir = getenv("TEMP");
+ if( Tmp_dir == NULL )
+ {
+ Tmp_dir = getenv("TMP");
+ if (Tmp_dir == NULL)
+ aTmpDir = string("C:\\");
+ else
+ aTmpDir = string(Tmp_dir);
+ }
+ else
+ aTmpDir = string(Tmp_dir);
+#else
+ aTmpDir = string("/tmp/");
+#endif
+ }
+
+ srand((unsigned int)time(NULL));
+ int aRND = 999 + (int)(100000.0*rand()/(RAND_MAX+1.0)); //Get a random number to present a name of a sub directory
+ char buffer[127];
+ sprintf(buffer, "%d", aRND);
+ string aSubDir(buffer);
+ if(aSubDir.size() <= 1) aSubDir = string("123409876");
+
+ aTmpDir += aSubDir; //Get RND sub directory
+
+ string aDir = aTmpDir;
+
+ if(Exists(aDir)) {
+ for(aRND = 0; Exists(aDir); aRND++) {
+ sprintf(buffer, "%d", aRND);
+ aDir = aTmpDir+buffer; //Build a unique directory name
+ }
+ }
+
+ if(aDir[aDir.size()-1] != sep) aDir+=sep;
+
+#ifdef WNT
+ CreateDirectory(aDir.c_str(), NULL);
+#else
+ mkdir(aDir.c_str(), 0x1ff);
+#endif
+
+ return aDir;*/
+}
+
+bool OpUtil_Dir::IsExists(const string& thePath)
+{
+#ifdef WNT
+ if ( GetFileAttributes ( thePath.c_str() ) == 0xFFFFFFFF ) {
+ if ( GetLastError () == ERROR_FILE_NOT_FOUND ) {
+ return false;
+ }
+ }
+#else
+ int status = access ( thePath.c_str() , F_OK );
+ if (status != 0) return false;
+#endif
+ return true;
+}
\ No newline at end of file
UTILS_EXPORT std::string GetHostname();
UTILS_EXPORT const char *duplicate(const char * const);
+class UTILS_EXPORT OpUtil_Dir
+{
+public:
+ // Returns the unique temporary directory, that is defined in tmp_path_env if this variable is set
+ // otherwise return /tmp/something/ for Unix or c:\something\ for WNT
+ static std::string GetTmpDirByEnv( const std::string& tmp_path_env );
+
+ // Returns the unique temporary directory, that is defined in tmp_path if this variable is set
+ // otherwise return /tmp/something/ for Unix or c:\something\ for WNT
+ static std::string GetTmpDirByPath( const std::string& tmp_path );
+
+ // Returns the unique temporary directory in
+ // /tmp/something/ for Unix or c:\something\ for WNT
+ static std::string GetTmpDir();
+
+ // Returns True(False) if the path (not)exists
+ static bool IsExists( const std::string& path );
+
+};
+
#endif