#include <string.h>
#include <fcntl.h>
#include <stdio.h>
+
+#ifdef WNT
+#include <io.h>
+#include <time.h>
+#endif
+
using namespace std;
bool CreateAttributeFromASCII(HDFinternalObject *father, FILE* fp);
fprintf(fp, "\n");
+#ifndef WNT
for(unsigned j=0; j<nbAttr; j++) {
+#else
+ for(j=0; j<nbAttr; j++) {
+#endif
name = hdf_dataset->GetAttributeName(j);
HDFattribute *hdf_attribute = new HDFattribute(name, hdf_dataset);
delete name;
TCollection_AsciiString aTmpDir;
-#ifdef WIN32
- aTmpDir = TCollection_AsciiString("C:\\");
+#ifdef WNT
+ char *aTmp;
+ aTmp = getenv("TMP");
+ if(aTmp != NULL)
+ aTmpDir = TCollection_AsciiString(aTmp);
+ else
+ aTmpDir = TCollection_AsciiString("C:\\");
#else
aTmpDir = TCollection_AsciiString("/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
TCollection_AsciiString aSubDir(aRND);
if(aSubDir.Length() <= 1) aSubDir = TCollection_AsciiString("123409876");
#ifndef __HDFascii_H__
#define __HDFascii_H__
+#include <Standard_Macro.hxx>
-
-class HDFascii
+class Standard_EXPORT HDFascii
{
public:
}
#include "HDFobject.hxx"
#include "HDFinternalObject.hxx"
+#include <Standard_Macro.hxx>
-class HDFcontainerObject : public HDFinternalObject
+class Standard_EXPORT HDFcontainerObject : public HDFinternalObject
{
private :
HDFinternalObject *_firstson;
#include "HDFconvert.hxx"
using namespace std;
+#ifdef WNT
+#include <io.h>
+#include <windows.h>
+#endif
+
int HDFConvert::FromAscii(const string& file, const HDFcontainerObject & hdf_container, const string& nomdataset)
{
return -1;
};
- // Lit l'état du fichier
+ // Lit l'\89tat du fichier
if ( fstat(fd,&status) < 0) {
perror("HDFConvert::FromAscii");
return -1;
#ifdef _POSIX_MAPPED_FILES
- // Map le fichier en mémoire
+ // Map le fichier en m\89moire
if ( (buffer = (char *) mmap(0,length,PROT_READ,MAP_SHARED,fd,0)) == MAP_FAILED ) {
perror("HDFConvert::FromAscii");
return -1;
};
-
+#elif defined WNT
+
+#define SHMEMSIZE 4096
+
+ HANDLE hMapObject = CreateFileMapping(
+ INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, SHMEMSIZE, "");
+ if (hMapObject != NULL) {
+ // Get a pointer to the file-mapped shared memory.
+ buffer = ( char* ) MapViewOfFile(
+ hMapObject, FILE_MAP_WRITE, 0, 0, 0 );
+ if( buffer == NULL )
+ CloseHandle(hMapObject);
+ };
+
#else
// Sort de la compilation
// Creation du Dataset utilisateur
hdf_dataset = new HDFdataset( (char *) nomdataset.c_str(), /*discard const */
- (HDFcontainerObject*) &hdf_container, /*discard const, pas de constructeur par référence */
+ (HDFcontainerObject*) &hdf_container, /*discard const, pas de constructeur par r\89f\89rence */
HDF_STRING,
&length_long,1);
// Cree le Dataset sur le disk
extern "C"
{
#include "HDFtypes.h"
+#ifndef WNT
#include <unistd.h>
#include <sys/mman.h>
+#else
+#endif
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
}
#include "HDFinternalObject.hxx"
#include "HDFcontainerObject.hxx"
+#include <Standard_Macro.hxx>
-class HDFdataset : public HDFinternalObject
+class Standard_EXPORT HDFdataset : public HDFinternalObject
{
private :
HDFcontainerObject *_father;
extern "C"
{
#include "hdfi.h"
+#ifndef WNT
#include <unistd.h>
+#else
+#include <io.h>
+#define F_OK 0
+#endif
#include <string.h>
}
#include <iostream.h>
#include "HDFtypes.h"
}
#include "HDFcontainerObject.hxx"
+#include <Standard_Macro.hxx>
-class HDFfile : public HDFcontainerObject
+class Standard_EXPORT HDFfile : public HDFcontainerObject
{
private :
hdf_access_mode _access_mode;
#include "HDFtypes.h"
}
#include "HDFcontainerObject.hxx"
+#include <Standard_Macro.hxx>
-class HDFgroup : public HDFcontainerObject
+class Standard_EXPORT HDFgroup : public HDFcontainerObject
{
private :
HDFcontainerObject *_father;
#include "hdfi.h"
}
#include "HDFinternalObject.hxx"
+#ifndef WNT
using namespace std;
+#endif
HDFinternalObject::HDFinternalObject(char *name)
: HDFobject(name)
#include "HDFtypes.h"
}
#include "HDFobject.hxx"
+#include <Standard_Macro.hxx>
-class HDFinternalObject : public HDFobject
+class Standard_EXPORT HDFinternalObject : public HDFobject
{
private :
HDFinternalObject *_previousbrother;
{
#include "HDFtypes.h"
}
+#include <Standard_Macro.hxx>
-class HDFobject {
+class Standard_EXPORT HDFobject {
protected :
char *_name;
hdf_idt _id;
#include <ServiceUnreachable.hxx>
#include "SALOME_LifeCycleCORBA.hxx"
+#ifndef WNT
#include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
+#else
+#include "SALOME_ModuleCatalog.hh"
+#endif
#include "SALOME_ContainerManager.hxx"
#include "SALOME_Component_i.hxx"
#include "SALOME_NamingService.hxx"
const char *instanceName)
{
ASSERT(0);
+ return 0;
}
//=============================================================================
int studyId)
{
ASSERT(0);
+ return 0;
}
//=============================================================================
int count = 5 ;
while ( CORBA::is_nil( aFactoryServer ) && count )
{
+#ifndef WNT
sleep( 1 ) ;
+#else
+ Sleep(1);
+#endif
count-- ;
if ( count != 10 )
MESSAGE( count << ". Waiting for FactoryServer on " << theComputer)
#define _SALOME_LIFECYCLECORBA_HXX_
#include <stdlib.h>
+#ifndef WNT
#include <unistd.h>
+#endif
#include <string>
#include <SALOMEconfig.h>
// Author : Sergey RUIN
// Module : SALOME
+#ifndef WNT
using namespace std;
+#endif
#include "SALOMEDSImpl_AttributeComment.hxx"
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeComment, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
+#ifndef WNT
using namespace std;
+#endif
#include "SALOMEDSImpl_AttributeDrawable.hxx"
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeDrawable, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
+#ifndef WNT
using namespace std;
+#endif
#include "SALOMEDSImpl_AttributeExpandable.hxx"
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeExpandable, SALOMEDSImpl_GenericAttribute )
DEFINE_STANDARD_HANDLE( SALOMEDSImpl_AttributeFlags, SALOMEDSImpl_GenericAttribute )
+#ifndef WNT
class Standard_EXPORT SALOMEDSImpl_AttributeFlags : public SALOMEDSImpl_GenericAttribute
+#else
+class SALOMEDSImpl_AttributeFlags : public SALOMEDSImpl_GenericAttribute
+#endif
{
private:
Standard_Integer myValue;
+#ifndef WNT
class Standard_EXPORT SALOMEDSImpl_AttributeGraphic : public SALOMEDSImpl_GenericAttribute
+#else
+class SALOMEDSImpl_AttributeGraphic : public SALOMEDSImpl_GenericAttribute
+#endif
{
public:
// Author : Sergey RUIN
// Module : SALOME
+#ifndef WNT
using namespace std;
+#endif
#include "SALOMEDSImpl_AttributeIOR.hxx"
#include <TCollection_AsciiString.hxx>
#include "SALOMEDSImpl_Study.hxx"
// Author : Sergey RUIN
// Module : SALOME
+#ifndef WNT
using namespace std;
+#endif
#include "SALOMEDSImpl_AttributeInteger.hxx"
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeInteger, SALOMEDSImpl_GenericAttribute)
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_AttributeLocalID.hxx"
#include <Standard_GUID.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeLocalID, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeLocalID, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_AttributeName.hxx"
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeName, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeName, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_AttributeOpened.hxx"
#include <Standard_GUID.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeOpened, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeOpened, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_AttributePersistentRef.hxx"
#include <Standard_GUID.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributePersistentRef, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributePersistentRef, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
#include "SALOMEDSImpl_AttributePixMap.hxx"
#include <TCollection_ExtendedString.hxx>
#include <Standard_GUID.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributePixMap, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributePixMap, SALOMEDSImpl_GenericAttribute )
// Author : Michael Ponikarov
// Module : SALOME
-using namespace std;
#include "SALOMEDSImpl_AttributePythonObject.hxx"
#include <Standard_GUID.hxx>
#include <string>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributePythonObject, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributePythonObject, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
#include "SALOMEDSImpl_AttributeReal.hxx"
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeReal, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeReal, SALOMEDSImpl_GenericAttribute )
Standard_Real myValue;
public:
-Standard_EXPORT Standard_EXPORT static const Standard_GUID& GetID() ;
+Standard_EXPORT static const Standard_GUID& GetID() ;
Standard_EXPORT SALOMEDSImpl_AttributeReal():SALOMEDSImpl_GenericAttribute("AttributeReal") {}
Standard_EXPORT static Handle(SALOMEDSImpl_AttributeReal) Set (const TDF_Label& L, const Standard_Real Val);
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
#include "SALOMEDSImpl_AttributeReference.hxx"
#include <TDF_Tool.hxx>
#include <TDF_Data.hxx>
#include <TDF_RelocationTable.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeReference, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeReference, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
#include "SALOMEDSImpl_AttributeSelectable.hxx"
#include <Standard_GUID.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeSelectable, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeSelectable, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
#include "SALOMEDSImpl_AttributeSequenceOfInteger.hxx"
#include <Standard_GUID.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeSequenceOfInteger, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeSequenceOfInteger, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
#include "SALOMEDSImpl_AttributeSequenceOfReal.hxx"
#include <Standard_GUID.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeSequenceOfReal, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeSequenceOfReal, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
#include <SALOMEDSImpl_AttributeStudyProperties.hxx>
#include <Standard_GUID.hxx>
#include <TCollection_ExtendedString.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeStudyProperties, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeStudyProperties, SALOMEDSImpl_GenericAttribute )
// Author : Michael Ponikarov
// Module : SALOME
-using namespace std;
#include <SALOMEDSImpl_AttributeTableOfInteger.hxx>
#include <Standard_Failure.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
#include <Standard_GUID.hxx>
#include <TColStd_HSequenceOfExtendedString.hxx>
+using namespace std;
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeTableOfInteger, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeTableOfInteger, SALOMEDSImpl_GenericAttribute )
// Author : Michael Ponikarov
// Module : SALOME
-using namespace std;
#include <SALOMEDSImpl_AttributeTableOfReal.hxx>
#include <Standard_Failure.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfIntegerReal.hxx>
#include <stdio.h>
#include <TColStd_HSequenceOfExtendedString.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeTableOfReal, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeTableOfReal, SALOMEDSImpl_GenericAttribute )
// Author : Sergey Ruin
// Module : SALOME
-using namespace std;
#include <SALOMEDSImpl_AttributeTableOfString.hxx>
#include <Standard_Failure.hxx>
#include <Standard_GUID.hxx>
#include <stdio.h>
#include <TColStd_HSequenceOfExtendedString.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeTableOfString, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeTableOfString, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_AttributeTarget.hxx"
#include "SALOMEDSImpl_AttributeReference.hxx"
#include "SALOMEDSImpl_Study.hxx"
#include <TDF_ListIteratorOfAttributeList.hxx>
#include <Standard_GUID.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeTarget, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeTarget, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_AttributeTextColor.hxx"
#include <Standard_GUID.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeTextColor, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeTextColor, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_AttributeTextHighlightColor.hxx"
#include <Standard_GUID.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeTextHighlightColor, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeTextHighlightColor, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_AttributeTreeNode.hxx"
#include <Standard_DomainError.hxx>
#include <TDF_Tool.hxx>
#include <TDF_RelocationTable.hxx>
#include <TCollection_AsciiString.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeTreeNode, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeTreeNode, SALOMEDSImpl_GenericAttribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_AttributeUserID.hxx"
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_AttributeUserID, SALOMEDSImpl_GenericAttribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_AttributeUserID, SALOMEDSImpl_GenericAttribute )
void SALOMEDSImpl_ChildIterator::Next()
{
- return _it.Next();
+ _it.Next();
}
Handle(SALOMEDSImpl_SObject) SALOMEDSImpl_ChildIterator::Value()
// Author : SERGEY_RUIN
// Module : SALOME
-using namespace std;
#include "SALOMEDSImpl_Attributes.hxx"
#include "SALOMEDSImpl_Study.hxx"
#include "SALOMEDSImpl_StudyBuilder.hxx"
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_GenericAttribute, TDF_Attribute )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_GenericAttribute, TDF_Attribute )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
#include "SALOMEDSImpl_OCAFApplication.hxx"
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_OCAFApplication, TDocStd_Application )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_OCAFApplication, TDocStd_Application )
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_SComponent.hxx"
#include "SALOMEDSImpl_AttributeComment.hxx"
#include "SALOMEDSImpl_AttributeIOR.hxx"
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_SComponent, SALOMEDSImpl_SObject )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_SComponent, SALOMEDSImpl_SObject )
DEFINE_STANDARD_HANDLE( SALOMEDSImpl_SComponent, SALOMEDSImpl_SObject )
// std C++ headers
-#include <iostream.h>
+#include <iostream>
// Cascade headers
#include <TDF_Label.hxx>
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_SComponentIterator.hxx"
#include "SALOMEDSImpl_Study.hxx"
+using namespace std;
+
//============================================================================
/*! Function : constructor
*
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_SObject.hxx"
#include "SALOMEDSImpl_Attributes.hxx"
#include "SALOMEDSImpl_SComponent.hxx"
#include "SALOMEDSImpl_Study.hxx"
+using namespace std;
+
#include <TDF_AttributeIterator.hxx>
#include <map>
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_Study.hxx"
+using namespace std;
+
#include <TColStd_SequenceOfExtendedString.hxx>
#include <TCollection_ExtendedString.hxx>
DEFINE_STANDARD_HANDLE( SALOMEDSImpl_Study, MMgt_TShared )
// std C++ headers
-#include <iostream.h>
+#include <iostream>
// Cascade headers
#include <TDocStd_Document.hxx>
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_Attributes.hxx"
+using namespace std;
+
#include "SALOMEDSImpl_Study.hxx"
#include "SALOMEDSImpl_StudyBuilder.hxx"
#include "SALOMEDSImpl_SObject.hxx"
DEFINE_STANDARD_HANDLE( SALOMEDSImpl_StudyBuilder, MMgt_TShared )
// std C++ headers
-#include <iostream.h>
+#include <iostream>
// Cascade header
#include <TCollection_AsciiString.hxx>
#include "SALOMEDSImpl_Study.hxx"
+#ifndef WNT
class Standard_EXPORT SALOMEDSImpl_StudyHandle : public TDF_Attribute
+#else
+class SALOMEDSImpl_StudyHandle : public TDF_Attribute
+#endif
{
public:
- SALOMEDSImpl_StudyHandle();
- ~SALOMEDSImpl_StudyHandle() { myHandle.Nullify(); }
-
- static Handle(SALOMEDSImpl_StudyHandle) Set(const TDF_Label& theLabel, const Handle(SALOMEDSImpl_Study)& theStudy);
- static const Standard_GUID& GetID() ;
-
- void SetHandle(const Handle(SALOMEDSImpl_Study)& theStudy) { myHandle = theStudy; }
- Handle(SALOMEDSImpl_Study) GetHandle() { return myHandle; }
- const Standard_GUID& ID() const;
- void Restore( const Handle(TDF_Attribute)& theWith );
- Handle(TDF_Attribute) NewEmpty() const;
- void Paste( const Handle(TDF_Attribute)& theInto,
- const Handle(TDF_RelocationTable)& ) const;
+Standard_EXPORT SALOMEDSImpl_StudyHandle();
+Standard_EXPORT ~SALOMEDSImpl_StudyHandle() { myHandle.Nullify(); }
+
+Standard_EXPORT static Handle(SALOMEDSImpl_StudyHandle) Set(const TDF_Label& theLabel, const Handle(SALOMEDSImpl_Study)& theStudy);
+Standard_EXPORT static const Standard_GUID& GetID() ;
+
+Standard_EXPORT void SetHandle(const Handle(SALOMEDSImpl_Study)& theStudy) { myHandle = theStudy; }
+Standard_EXPORT Handle(SALOMEDSImpl_Study) GetHandle() { return myHandle; }
+Standard_EXPORT const Standard_GUID& ID() const;
+Standard_EXPORT void Restore( const Handle(TDF_Attribute)& theWith );
+Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const;
+Standard_EXPORT void Paste( const Handle(TDF_Attribute)& theInto,
+ const Handle(TDF_RelocationTable)& ) const;
private:
Handle(SALOMEDSImpl_Study) myHandle;
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
-
#include "SALOMEDSImpl_StudyManager.hxx"
+using namespace std;
+
#include <CDF_Session.hxx>
#include <CDF_DirectoryIterator.hxx>
#include <TDF_Label.hxx>
#include <map>
#include "HDFOI.hxx"
-#include <iostream.h>
+#include <iostream>
#include <stdlib.h>
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_StudyManager, MMgt_TShared )
}
catch (HDFexception)
{
+#ifndef WNT
char eStr[strlen(aUrl.ToCString())+17];
+#else
+ char *eStr;
+ eStr = new char[strlen(aUrl.ToCString())+17];
+#endif
sprintf(eStr,"Can't open file %s",aUrl.ToCString());
+#ifdef WNT
+ delete [] eStr;
+#endif
_errorCode = TCollection_AsciiString(eStr);
return NULL;
}
}
catch (HDFexception)
{
+#ifndef WNT
char eStr[strlen(aUrl.ToCString())+17];
+#else
+ char *eStr = new char [strlen(aUrl.ToCString())+17];
+#endif
sprintf(eStr,"Can't open file %s", aUrl.ToCString());
_errorCode = TCollection_AsciiString(eStr);
return NULL;
Handle(SALOMEDSImpl_AttributeInteger) anInteger;
if(aCompSpecificSO->GetLabel().FindAttribute(SALOMEDSImpl_AttributeInteger::GetID(), anInteger)) {
anInteger->SetValue(-1);
- while(anInteger->Value() < 0) { sleep(2); if(++aTimeOut > AUTO_SAVE_TIME_OUT_IN_SECONDS) break; }
+ while(anInteger->Value() < 0) {
+#ifndef WNT
+ sleep(2);
+#else
+ Sleep(2);
+#endif
+ if(++aTimeOut > AUTO_SAVE_TIME_OUT_IN_SECONDS)
+ break;
+ }
} // if(aCompSpecificSO->FindAttribute(anInteger, "AttributeInteger"))
} // if(!CORBA::is_nil(aCompSpecificSO))
} // if (strcmp(aRow[0], componentDataType) == 0)
-using namespace std;
// File : SALOMEDSImpl_Tool.cxx
// Created : Mon Oct 21 16:24:34 2002
// Author : Sergey RUIN
#include "SALOMEDSImpl_Tool.hxx"
#include <stdio.h>
-#include <iostream.h>
-#include <fstream.h>
+#include <iostream>
+#include <fstream>
#include <OSD_Path.hxx>
#include <OSD_File.hxx>
#include <OSD_Directory.hxx>
#include <OSD_SingleProtection.hxx>
#include <OSD_FileIterator.hxx>
+#ifndef WNT
#include <sys/time.h>
+#else
+#include <time.h>
+#endif
#include <stdlib.h>
+using namespace std;
+
//============================================================================
// function : GetTempDir
// Author : Sergey RUIN
// Module : SALOME
-using namespace std;
+
#include "SALOMEDSImpl_UseCaseBuilder.hxx"
#include "SALOMEDSImpl_SObject.hxx"
#include "SALOMEDSImpl_SComponent.hxx"
#include <TCollection_AsciiString.hxx>
#include <TDF_ChildIterator.hxx>
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_UseCaseBuilder, MMgt_TShared )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_UseCaseBuilder, MMgt_TShared )
// Author : Serge RUIN
// Module : SALOME
-using namespace std;
#include "SALOMEDSImpl_UseCaseIterator.hxx"
#include "SALOMEDSImpl_SObject.hxx"
#include "SALOMEDSImpl_Study.hxx"
+using namespace std;
+
IMPLEMENT_STANDARD_HANDLE( SALOMEDSImpl_UseCaseIterator, MMgt_TShared )
IMPLEMENT_STANDARD_RTTIEXT( SALOMEDSImpl_UseCaseIterator, MMgt_TShared )
#include "utilities.h"
#include <TCollection_AsciiString.hxx>
-#include <stdio.h>
-#include <iostream.h>
-#include <fstream.h>
+
#include <OSD_Path.hxx>
#include <OSD_File.hxx>
#include <OSD_Directory.hxx>
#include <OSD_SingleProtection.hxx>
#include <OSD_FileIterator.hxx>
+#ifndef WNT
+#include <stdio.h>
+#include <iostream.h>
+#include <fstream.h>
#include <sys/time.h>
+#else
+#endif
#include <stdlib.h>
#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)