mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Integration of OCCT 6.5.0 from SVN
This commit is contained in:
4
src/FSD/FILES
Executable file
4
src/FSD/FILES
Executable file
@@ -0,0 +1,4 @@
|
||||
FSD_FStream.hxx
|
||||
FILES
|
||||
FSD_BStream.hxx
|
||||
FSD_FileHeader.hxx
|
22
src/FSD/FSD.cdl
Executable file
22
src/FSD/FSD.cdl
Executable file
@@ -0,0 +1,22 @@
|
||||
-- File: FSD.cdl
|
||||
-- Created: Fri Nov 29 13:02:36 1996
|
||||
-- Author: Christophe LEYNADIER
|
||||
-- <cle@parigox.paris1.matra-dtv.fr>
|
||||
---Copyright: Matra Datavision 1996
|
||||
|
||||
package FSD
|
||||
uses Storage,
|
||||
TColStd,
|
||||
TCollection,
|
||||
OSD
|
||||
is
|
||||
|
||||
class File;
|
||||
class BinaryFile;
|
||||
class CmpFile;
|
||||
|
||||
imported FStream;
|
||||
imported BStream;
|
||||
imported FileHeader;
|
||||
|
||||
end;
|
8
src/FSD/FSD_BStream.hxx
Executable file
8
src/FSD/FSD_BStream.hxx
Executable file
@@ -0,0 +1,8 @@
|
||||
#ifndef _FSD_BStream_HeaderFile
|
||||
#define _FSD_BStream_HeaderFile
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
typedef FILE* FSD_BStream;
|
||||
|
||||
#endif
|
313
src/FSD/FSD_BinaryFile.cdl
Executable file
313
src/FSD/FSD_BinaryFile.cdl
Executable file
@@ -0,0 +1,313 @@
|
||||
-- File: FSD_BinaryFile.cdl
|
||||
-- Created: Fri Nov 29 13:03:05 1996
|
||||
-- Author: Christophe LEYNADIER
|
||||
-- <cle@parigox.paris1.matra-dtv.fr>
|
||||
---Copyright: Matra Datavision 1996
|
||||
|
||||
class BinaryFile from FSD
|
||||
|
||||
inherits BaseDriver from Storage
|
||||
|
||||
uses Position from Storage,
|
||||
Error from Storage,
|
||||
OpenMode from Storage,
|
||||
AsciiString from TCollection,
|
||||
SequenceOfAsciiString from TColStd,
|
||||
SequenceOfExtendedString from TColStd,
|
||||
ExtendedString from TCollection,
|
||||
FileHeader from FSD,
|
||||
BStream from FSD
|
||||
|
||||
raises StreamTypeMismatchError from Storage,
|
||||
StreamFormatError from Storage,
|
||||
StreamWriteError from Storage,
|
||||
StreamExtCharParityError from Storage
|
||||
|
||||
is
|
||||
Create returns BinaryFile from FSD;
|
||||
|
||||
Open(me : in out; aName : AsciiString from TCollection; aMode : OpenMode from Storage) returns Error from Storage;
|
||||
|
||||
IsEnd(me : in out) returns Boolean from Standard;
|
||||
|
||||
Tell( me : in out ) returns Position from Storage;
|
||||
---Purpose: return position in the file. Return -1 upon error.
|
||||
|
||||
IsGoodFileType(myclass; aName : AsciiString from TCollection)
|
||||
returns Error from Storage;
|
||||
|
||||
-- INFO SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteInfoSection(me : in out) returns Error from Storage;
|
||||
|
||||
WriteInfo(me : in out; nbObj : Integer from Standard;
|
||||
dbVersion : AsciiString from TCollection;
|
||||
date : AsciiString from TCollection;
|
||||
schemaName : AsciiString from TCollection;
|
||||
schemaVersion : AsciiString from TCollection;
|
||||
appName : ExtendedString from TCollection;
|
||||
appVersion : AsciiString from TCollection;
|
||||
objectType : ExtendedString from TCollection;
|
||||
userInfo : SequenceOfAsciiString from TColStd)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteInfoSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadInfoSection(me : in out) returns Error from Storage;
|
||||
|
||||
ReadInfo(me : in out; nbObj : in out Integer from Standard;
|
||||
dbVersion : in out AsciiString from TCollection;
|
||||
date : in out AsciiString from TCollection;
|
||||
schemaName : in out AsciiString from TCollection;
|
||||
schemaVersion : in out AsciiString from TCollection;
|
||||
appName : in out ExtendedString from TCollection;
|
||||
appVersion : in out AsciiString from TCollection;
|
||||
objectType : in out ExtendedString from TCollection;
|
||||
userInfo : in out SequenceOfAsciiString from TColStd)
|
||||
raises StreamTypeMismatchError,StreamExtCharParityError;
|
||||
|
||||
EndReadInfoSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- COMMENTS SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteCommentSection(me : in out) returns Error from Storage;
|
||||
|
||||
WriteComment(me : in out; userComments : SequenceOfExtendedString from TColStd)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteCommentSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadCommentSection(me : in out) returns Error from Storage;
|
||||
|
||||
ReadComment(me : in out; userComments : in out SequenceOfExtendedString from TColStd)
|
||||
raises StreamTypeMismatchError,StreamExtCharParityError;
|
||||
|
||||
EndReadCommentSection(me : in out) returns Error from Storage;
|
||||
|
||||
|
||||
-- TYPE SECTION
|
||||
--
|
||||
BeginWriteTypeSection(me : in out) returns Error from Storage;
|
||||
|
||||
SetTypeSectionSize(me : in out; aSize : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
WriteTypeInformations(me : in out; typeNum : Integer from Standard; typeName : AsciiString from TCollection)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteTypeSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
BeginReadTypeSection(me : in out) returns Error from Storage;
|
||||
|
||||
TypeSectionSize(me : in out) returns Integer from Standard
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
ReadTypeInformations(me : in out; typeNum : in out Integer from Standard; typeName : in out AsciiString from TCollection)
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
EndReadTypeSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- ROOT SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteRootSection(me : in out) returns Error from Storage;
|
||||
|
||||
SetRootSectionSize(me : in out; aSize : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
WriteRoot(me : in out; rootName : AsciiString from TCollection; aRef : Integer from Standard; aType : AsciiString from TCollection)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteRootSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadRootSection(me : in out) returns Error from Storage;
|
||||
|
||||
RootSectionSize(me : in out) returns Integer from Standard
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
ReadRoot(me : in out; rootName : in out AsciiString from TCollection; aRef : in out Integer from Standard; aType : in out AsciiString from TCollection)
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
EndReadRootSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- REF SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteRefSection(me : in out) returns Error from Storage;
|
||||
|
||||
SetRefSectionSize(me : in out; aSize : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
WriteReferenceType(me : in out; reference : Integer from Standard; typeNum : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteRefSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadRefSection(me : in out) returns Error from Storage;
|
||||
|
||||
RefSectionSize(me : in out) returns Integer from Standard
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
ReadReferenceType(me : in out; reference : in out Integer from Standard; typeNum : in out Integer from Standard)
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
EndReadRefSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- DATA SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteDataSection(me : in out) returns Error from Storage;
|
||||
|
||||
WritePersistentObjectHeader(me : in out; aRef : Integer from Standard; aType : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
BeginWritePersistentObjectData(me : in out)
|
||||
raises StreamWriteError;
|
||||
|
||||
BeginWriteObjectData(me : in out)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteObjectData(me : in out)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWritePersistentObjectData(me : in out)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteDataSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadDataSection(me : in out) returns Error from Storage;
|
||||
|
||||
ReadPersistentObjectHeader(me : in out; aRef : in out Integer from Standard; aType : in out Integer from Standard)
|
||||
raises StreamTypeMismatchError,StreamFormatError;
|
||||
|
||||
BeginReadPersistentObjectData(me : in out)
|
||||
raises StreamFormatError;
|
||||
|
||||
BeginReadObjectData(me : in out)
|
||||
raises StreamFormatError;
|
||||
|
||||
EndReadObjectData(me : in out)
|
||||
raises StreamFormatError;
|
||||
|
||||
EndReadPersistentObjectData(me : in out)
|
||||
raises StreamFormatError;
|
||||
|
||||
EndReadDataSection(me : in out) returns Error from Storage;
|
||||
|
||||
--
|
||||
SkipObject(me : in out);
|
||||
--
|
||||
|
||||
PutReference(me : in out; aValue : Integer from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: return &
|
||||
|
||||
PutCharacter(me : in out; aValue : Character from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutExtCharacter(me : in out; aValue : ExtCharacter from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutInteger(me : in out; aValue : Integer from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutBoolean(me : in out; aValue : Boolean from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutReal(me : in out; aValue : Real from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutShortReal(me : in out; aValue : ShortReal from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
GetReference(me : in out; aValue : in out Integer from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: return &
|
||||
|
||||
GetCharacter(me : in out; aValue : in out Character from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetExtCharacter(me : in out; aValue : in out ExtCharacter from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetInteger(me : in out; aValue : in out Integer from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetBoolean(me : in out; aValue : in out Boolean from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetReal(me : in out; aValue :in out Real from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetShortReal(me : in out; aValue : in out ShortReal from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
Close(me : in out) returns Error from Storage;
|
||||
|
||||
Destroy(me : in out);
|
||||
---C++: alias ~
|
||||
|
||||
WriteHeader(me : in out) is private;
|
||||
ReadHeader(me : in out) is private;
|
||||
|
||||
MagicNumber(myclass)
|
||||
returns CString from Standard is private;
|
||||
---C++: return const
|
||||
|
||||
ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Integer from Standard) is protected;
|
||||
---Purpose: read <rsize> character from the current position.
|
||||
|
||||
ReadString(me : in out; buffer : in out AsciiString from TCollection) is protected;
|
||||
---Purpose: read string from the current position.
|
||||
|
||||
WriteString(me : in out; buffer : AsciiString from TCollection) is protected;
|
||||
---Purpose: write string at the current position.
|
||||
|
||||
ReadExtendedString(me : in out; buffer : in out ExtendedString from TCollection) is protected;
|
||||
---Purpose: read string from the current position.
|
||||
|
||||
WriteExtendedString(me : in out; buffer : ExtendedString from TCollection) is protected;
|
||||
---Purpose: write string at the current position.
|
||||
|
||||
fields
|
||||
|
||||
myStream : BStream from FSD;
|
||||
myHeader : FileHeader from FSD;
|
||||
end;
|
1189
src/FSD/FSD_BinaryFile.cxx
Executable file
1189
src/FSD/FSD_BinaryFile.cxx
Executable file
File diff suppressed because it is too large
Load Diff
321
src/FSD/FSD_CmpFile.cdl
Executable file
321
src/FSD/FSD_CmpFile.cdl
Executable file
@@ -0,0 +1,321 @@
|
||||
-- File: FSD_CmpFile.cdl
|
||||
-- Created: Fri Nov 29 13:03:05 1996
|
||||
-- Author: Christophe LEYNADIER
|
||||
-- <cle@parigox.paris1.matra-dtv.fr>
|
||||
---Copyright: Matra Datavision 1996
|
||||
|
||||
class CmpFile from FSD
|
||||
|
||||
inherits BaseDriver from Storage
|
||||
|
||||
uses Position from Storage,
|
||||
Error from Storage,
|
||||
OpenMode from Storage,
|
||||
AsciiString from TCollection,
|
||||
SequenceOfAsciiString from TColStd,
|
||||
SequenceOfExtendedString from TColStd,
|
||||
ExtendedString from TCollection,
|
||||
FStream from FSD,
|
||||
Real2String from OSD
|
||||
|
||||
raises StreamTypeMismatchError from Storage,
|
||||
StreamFormatError from Storage,
|
||||
StreamWriteError from Storage,
|
||||
StreamExtCharParityError from Storage
|
||||
|
||||
is
|
||||
Create returns CmpFile from FSD;
|
||||
|
||||
Open(me : in out; aName : AsciiString from TCollection; aMode : OpenMode from Storage) returns Error from Storage;
|
||||
|
||||
IsEnd(me : in out) returns Boolean from Standard;
|
||||
|
||||
Tell( me : in out ) returns Position from Storage;
|
||||
---Purpose: return position in the file. Return -1 upon error.
|
||||
|
||||
IsGoodFileType(myclass; aName : AsciiString from TCollection)
|
||||
returns Error from Storage;
|
||||
|
||||
-- INFO SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteInfoSection(me : in out) returns Error from Storage;
|
||||
|
||||
WriteInfo(me : in out; nbObj : Integer from Standard;
|
||||
dbVersion : AsciiString from TCollection;
|
||||
date : AsciiString from TCollection;
|
||||
schemaName : AsciiString from TCollection;
|
||||
schemaVersion : AsciiString from TCollection;
|
||||
appName : ExtendedString from TCollection;
|
||||
appVersion : AsciiString from TCollection;
|
||||
objectType : ExtendedString from TCollection;
|
||||
userInfo : SequenceOfAsciiString from TColStd)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteInfoSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadInfoSection(me : in out) returns Error from Storage;
|
||||
|
||||
ReadInfo(me : in out; nbObj : in out Integer from Standard;
|
||||
dbVersion : in out AsciiString from TCollection;
|
||||
date : in out AsciiString from TCollection;
|
||||
schemaName : in out AsciiString from TCollection;
|
||||
schemaVersion : in out AsciiString from TCollection;
|
||||
appName : in out ExtendedString from TCollection;
|
||||
appVersion : in out AsciiString from TCollection;
|
||||
objectType : in out ExtendedString from TCollection;
|
||||
userInfo : in out SequenceOfAsciiString from TColStd)
|
||||
raises StreamTypeMismatchError,StreamExtCharParityError;
|
||||
|
||||
EndReadInfoSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- COMMENTS SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteCommentSection(me : in out) returns Error from Storage;
|
||||
|
||||
WriteComment(me : in out; userComments : SequenceOfExtendedString from TColStd)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteCommentSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadCommentSection(me : in out) returns Error from Storage;
|
||||
|
||||
ReadComment(me : in out; userComments : in out SequenceOfExtendedString from TColStd)
|
||||
raises StreamTypeMismatchError,StreamExtCharParityError;
|
||||
|
||||
EndReadCommentSection(me : in out) returns Error from Storage;
|
||||
|
||||
|
||||
-- TYPE SECTION
|
||||
--
|
||||
BeginWriteTypeSection(me : in out) returns Error from Storage;
|
||||
|
||||
SetTypeSectionSize(me : in out; aSize : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
WriteTypeInformations(me : in out; typeNum : Integer from Standard; typeName : AsciiString from TCollection)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteTypeSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
BeginReadTypeSection(me : in out) returns Error from Storage;
|
||||
|
||||
TypeSectionSize(me : in out) returns Integer from Standard
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
ReadTypeInformations(me : in out; typeNum : in out Integer from Standard; typeName : in out AsciiString from TCollection)
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
EndReadTypeSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- ROOT SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteRootSection(me : in out) returns Error from Storage;
|
||||
|
||||
SetRootSectionSize(me : in out; aSize : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
WriteRoot(me : in out; rootName : AsciiString from TCollection; aRef : Integer from Standard; aType : AsciiString from TCollection)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteRootSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadRootSection(me : in out) returns Error from Storage;
|
||||
|
||||
RootSectionSize(me : in out) returns Integer from Standard
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
ReadRoot(me : in out; rootName : in out AsciiString from TCollection; aRef : in out Integer from Standard; aType : in out AsciiString from TCollection)
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
EndReadRootSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- REF SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteRefSection(me : in out) returns Error from Storage;
|
||||
|
||||
SetRefSectionSize(me : in out; aSize : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
WriteReferenceType(me : in out; reference : Integer from Standard; typeNum : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteRefSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadRefSection(me : in out) returns Error from Storage;
|
||||
|
||||
RefSectionSize(me : in out) returns Integer from Standard
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
ReadReferenceType(me : in out; reference : in out Integer from Standard; typeNum : in out Integer from Standard)
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
EndReadRefSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- DATA SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteDataSection(me : in out) returns Error from Storage;
|
||||
|
||||
WritePersistentObjectHeader(me : in out; aRef : Integer from Standard; aType : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
BeginWritePersistentObjectData(me : in out)
|
||||
raises StreamWriteError;
|
||||
|
||||
BeginWriteObjectData(me : in out)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteObjectData(me : in out)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWritePersistentObjectData(me : in out)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteDataSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadDataSection(me : in out) returns Error from Storage;
|
||||
|
||||
ReadPersistentObjectHeader(me : in out; aRef : in out Integer from Standard; aType : in out Integer from Standard)
|
||||
raises StreamTypeMismatchError,StreamFormatError;
|
||||
|
||||
BeginReadPersistentObjectData(me : in out)
|
||||
raises StreamFormatError;
|
||||
|
||||
BeginReadObjectData(me : in out)
|
||||
raises StreamFormatError;
|
||||
|
||||
EndReadObjectData(me : in out)
|
||||
raises StreamFormatError;
|
||||
|
||||
EndReadPersistentObjectData(me : in out)
|
||||
raises StreamFormatError;
|
||||
|
||||
EndReadDataSection(me : in out) returns Error from Storage;
|
||||
|
||||
--
|
||||
SkipObject(me : in out);
|
||||
--
|
||||
|
||||
PutReference(me : in out; aValue : Integer from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: return &
|
||||
|
||||
PutCharacter(me : in out; aValue : Character from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutExtCharacter(me : in out; aValue : ExtCharacter from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutInteger(me : in out; aValue : Integer from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutBoolean(me : in out; aValue : Boolean from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutReal(me : in out; aValue : Real from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutShortReal(me : in out; aValue : ShortReal from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
GetReference(me : in out; aValue : in out Integer from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: return &
|
||||
|
||||
GetCharacter(me : in out; aValue : in out Character from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetExtCharacter(me : in out; aValue : in out ExtCharacter from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetInteger(me : in out; aValue : in out Integer from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetBoolean(me : in out; aValue : in out Boolean from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetReal(me : in out; aValue :in out Real from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetShortReal(me : in out; aValue : in out ShortReal from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
Close(me : in out) returns Error from Storage;
|
||||
|
||||
Destroy(me : in out);
|
||||
---C++: alias ~
|
||||
|
||||
ReadLine(me : in out; buffer : in out AsciiString from TCollection) is protected;
|
||||
---Purpose: read from the current position to the end of line.
|
||||
|
||||
ReadWord(me : in out; buffer : in out AsciiString from TCollection) is protected;
|
||||
---Purpose: read from the current position to the next white space or end of line.
|
||||
|
||||
ReadExtendedLine(me : in out; buffer : in out ExtendedString from TCollection)
|
||||
raises StreamExtCharParityError
|
||||
is protected;
|
||||
---Purpose: read extended chars (unicode) from the current position to the end of line.
|
||||
|
||||
WriteExtendedLine(me : in out; buffer : ExtendedString from TCollection) is protected;
|
||||
---Purpose: write from the current position to the end of line.
|
||||
|
||||
ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Integer from Standard) is protected;
|
||||
---Purpose: read <rsize> character from the current position.
|
||||
|
||||
ReadString(me : in out; buffer : in out AsciiString from TCollection) is protected;
|
||||
---Purpose: read from the first none space character position to the end of line.
|
||||
|
||||
FlushEndOfLine(me : in out) is protected;
|
||||
|
||||
FindTag(me : in out; aTag : CString from Standard) returns Error from Storage is protected;
|
||||
|
||||
MagicNumber(myclass)
|
||||
returns CString from Standard is private;
|
||||
---C++: return const
|
||||
|
||||
RaiseError(me: in out ; theFailure: Type from Standard) is private;
|
||||
|
||||
fields
|
||||
|
||||
myStream : FStream from FSD;
|
||||
myRealConv : Real2String from OSD; -- **** samtech modif
|
||||
end;
|
1421
src/FSD/FSD_CmpFile.cxx
Executable file
1421
src/FSD/FSD_CmpFile.cxx
Executable file
File diff suppressed because it is too large
Load Diff
9
src/FSD/FSD_FStream.hxx
Executable file
9
src/FSD/FSD_FStream.hxx
Executable file
@@ -0,0 +1,9 @@
|
||||
#ifndef _FSD_FStream_HeaderFile
|
||||
#define _FSD_FStream_HeaderFile
|
||||
|
||||
#include <stdio.h>
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
typedef fstream FSD_FStream;
|
||||
|
||||
#endif
|
333
src/FSD/FSD_File.cdl
Executable file
333
src/FSD/FSD_File.cdl
Executable file
@@ -0,0 +1,333 @@
|
||||
-- File: FSD_File.cdl
|
||||
-- Created: Fri Nov 29 13:03:05 1996
|
||||
-- Author: Christophe LEYNADIER
|
||||
-- <cle@parigox.paris1.matra-dtv.fr>
|
||||
---Copyright: Matra Datavision 1996
|
||||
|
||||
class File from FSD
|
||||
|
||||
inherits BaseDriver from Storage
|
||||
---Purpose:
|
||||
-- A general driver which defines as a file, the
|
||||
-- physical container for data to be stored or retrieved.
|
||||
uses Position from Storage,
|
||||
Error from Storage,
|
||||
OpenMode from Storage,
|
||||
AsciiString from TCollection,
|
||||
SequenceOfAsciiString from TColStd,
|
||||
SequenceOfExtendedString from TColStd,
|
||||
ExtendedString from TCollection,
|
||||
FStream from FSD
|
||||
|
||||
raises StreamTypeMismatchError from Storage,
|
||||
StreamFormatError from Storage,
|
||||
StreamWriteError from Storage,
|
||||
StreamExtCharParityError from Storage
|
||||
|
||||
is
|
||||
Create returns File from FSD;
|
||||
---Purpose:
|
||||
-- Constructs a driver defining as a file, the physical
|
||||
-- container for data to be stored or retrieved.
|
||||
-- Use the function Open to give the name of the driven file.
|
||||
Open(me : in out; aName : AsciiString from TCollection; aMode : OpenMode from Storage) returns Error from Storage;
|
||||
---Purpose:
|
||||
-- Assigns as aName the name of the file to be
|
||||
-- driven by this driver. aMode precises if the file is
|
||||
-- opened in read or write mode.
|
||||
-- The function returns Storage_VSOk if the file
|
||||
-- is opened correctly, or any other value of the
|
||||
-- Storage_Error enumeration which specifies the problem encountered.
|
||||
IsEnd(me : in out) returns Boolean from Standard;
|
||||
|
||||
Tell( me : in out ) returns Position from Storage;
|
||||
---Purpose: return position in the file. Return -1 upon error.
|
||||
|
||||
IsGoodFileType(myclass; aName : AsciiString from TCollection)
|
||||
returns Error from Storage;
|
||||
|
||||
-- INFO SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteInfoSection(me : in out) returns Error from Storage;
|
||||
|
||||
WriteInfo(me : in out; nbObj : Integer from Standard;
|
||||
dbVersion : AsciiString from TCollection;
|
||||
date : AsciiString from TCollection;
|
||||
schemaName : AsciiString from TCollection;
|
||||
schemaVersion : AsciiString from TCollection;
|
||||
appName : ExtendedString from TCollection;
|
||||
appVersion : AsciiString from TCollection;
|
||||
objectType : ExtendedString from TCollection;
|
||||
userInfo : SequenceOfAsciiString from TColStd)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteInfoSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadInfoSection(me : in out) returns Error from Storage;
|
||||
|
||||
ReadInfo(me : in out; nbObj : in out Integer from Standard;
|
||||
dbVersion : in out AsciiString from TCollection;
|
||||
date : in out AsciiString from TCollection;
|
||||
schemaName : in out AsciiString from TCollection;
|
||||
schemaVersion : in out AsciiString from TCollection;
|
||||
appName : in out ExtendedString from TCollection;
|
||||
appVersion : in out AsciiString from TCollection;
|
||||
objectType : in out ExtendedString from TCollection;
|
||||
userInfo : in out SequenceOfAsciiString from TColStd)
|
||||
raises StreamTypeMismatchError,StreamExtCharParityError;
|
||||
|
||||
EndReadInfoSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- COMMENTS SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteCommentSection(me : in out) returns Error from Storage;
|
||||
|
||||
WriteComment(me : in out; userComments : SequenceOfExtendedString from TColStd)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteCommentSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadCommentSection(me : in out) returns Error from Storage;
|
||||
|
||||
ReadComment(me : in out; userComments : in out SequenceOfExtendedString from TColStd)
|
||||
raises StreamTypeMismatchError,StreamExtCharParityError;
|
||||
|
||||
EndReadCommentSection(me : in out) returns Error from Storage;
|
||||
|
||||
|
||||
-- TYPE SECTION
|
||||
--
|
||||
BeginWriteTypeSection(me : in out) returns Error from Storage;
|
||||
|
||||
SetTypeSectionSize(me : in out; aSize : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
WriteTypeInformations(me : in out; typeNum : Integer from Standard; typeName : AsciiString from TCollection)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteTypeSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
BeginReadTypeSection(me : in out) returns Error from Storage;
|
||||
|
||||
TypeSectionSize(me : in out) returns Integer from Standard
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
ReadTypeInformations(me : in out; typeNum : in out Integer from Standard; typeName : in out AsciiString from TCollection)
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
EndReadTypeSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- ROOT SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteRootSection(me : in out) returns Error from Storage;
|
||||
|
||||
SetRootSectionSize(me : in out; aSize : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
WriteRoot(me : in out; rootName : AsciiString from TCollection; aRef : Integer from Standard; aType : AsciiString from TCollection)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteRootSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadRootSection(me : in out) returns Error from Storage;
|
||||
|
||||
RootSectionSize(me : in out) returns Integer from Standard
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
ReadRoot(me : in out; rootName : in out AsciiString from TCollection; aRef : in out Integer from Standard; aType : in out AsciiString from TCollection)
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
EndReadRootSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- REF SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteRefSection(me : in out) returns Error from Storage;
|
||||
|
||||
SetRefSectionSize(me : in out; aSize : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
WriteReferenceType(me : in out; reference : Integer from Standard; typeNum : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteRefSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadRefSection(me : in out) returns Error from Storage;
|
||||
|
||||
RefSectionSize(me : in out) returns Integer from Standard
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
ReadReferenceType(me : in out; reference : in out Integer from Standard; typeNum : in out Integer from Standard)
|
||||
raises StreamTypeMismatchError;
|
||||
|
||||
EndReadRefSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- DATA SECTION
|
||||
-- write
|
||||
--
|
||||
BeginWriteDataSection(me : in out) returns Error from Storage;
|
||||
|
||||
WritePersistentObjectHeader(me : in out; aRef : Integer from Standard; aType : Integer from Standard)
|
||||
raises StreamWriteError;
|
||||
|
||||
BeginWritePersistentObjectData(me : in out)
|
||||
raises StreamWriteError;
|
||||
|
||||
BeginWriteObjectData(me : in out)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteObjectData(me : in out)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWritePersistentObjectData(me : in out)
|
||||
raises StreamWriteError;
|
||||
|
||||
EndWriteDataSection(me : in out) returns Error from Storage;
|
||||
|
||||
-- read
|
||||
--
|
||||
BeginReadDataSection(me : in out) returns Error from Storage;
|
||||
|
||||
ReadPersistentObjectHeader(me : in out; aRef : in out Integer from Standard; aType : in out Integer from Standard)
|
||||
raises StreamTypeMismatchError,StreamFormatError;
|
||||
|
||||
BeginReadPersistentObjectData(me : in out)
|
||||
raises StreamFormatError;
|
||||
|
||||
BeginReadObjectData(me : in out)
|
||||
raises StreamFormatError;
|
||||
|
||||
EndReadObjectData(me : in out)
|
||||
raises StreamFormatError;
|
||||
|
||||
EndReadPersistentObjectData(me : in out)
|
||||
raises StreamFormatError;
|
||||
|
||||
EndReadDataSection(me : in out) returns Error from Storage;
|
||||
|
||||
--
|
||||
SkipObject(me : in out);
|
||||
--
|
||||
|
||||
PutReference(me : in out; aValue : Integer from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: return &
|
||||
|
||||
PutCharacter(me : in out; aValue : Character from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutExtCharacter(me : in out; aValue : ExtCharacter from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutInteger(me : in out; aValue : Integer from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutBoolean(me : in out; aValue : Boolean from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutReal(me : in out; aValue : Real from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
PutShortReal(me : in out; aValue : ShortReal from Standard) returns like me
|
||||
raises StreamWriteError;
|
||||
---C++: alias operator <<
|
||||
---C++: return &
|
||||
|
||||
GetReference(me : in out; aValue : in out Integer from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: return &
|
||||
|
||||
GetCharacter(me : in out; aValue : in out Character from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetExtCharacter(me : in out; aValue : in out ExtCharacter from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetInteger(me : in out; aValue : in out Integer from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetBoolean(me : in out; aValue : in out Boolean from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetReal(me : in out; aValue :in out Real from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
GetShortReal(me : in out; aValue : in out ShortReal from Standard) returns like me
|
||||
raises StreamTypeMismatchError;
|
||||
---C++: alias operator >>
|
||||
---C++: return &
|
||||
|
||||
Close(me : in out) returns Error from Storage;
|
||||
---Purpose:
|
||||
-- Closes the file driven by this driver. This file was
|
||||
-- opened by the last call to the function Open.
|
||||
-- The function returns Storage_VSOk if the
|
||||
-- closure is correctly done, or any other value of
|
||||
-- the Storage_Error enumeration which specifies the problem encountered.
|
||||
Destroy(me : in out);
|
||||
---C++: alias ~
|
||||
|
||||
ReadLine(me : in out; buffer : in out AsciiString from TCollection) is protected;
|
||||
---Purpose: read from the current position to the end of line.
|
||||
|
||||
ReadWord(me : in out; buffer : in out AsciiString from TCollection) is protected;
|
||||
---Purpose: read from the current position to the next white space or end of line.
|
||||
|
||||
ReadExtendedLine(me : in out; buffer : in out ExtendedString from TCollection)
|
||||
raises StreamExtCharParityError
|
||||
is protected;
|
||||
---Purpose: read extended chars (unicode) from the current position to the end of line.
|
||||
|
||||
WriteExtendedLine(me : in out; buffer : ExtendedString from TCollection) is protected;
|
||||
---Purpose: write from the current position to the end of line.
|
||||
|
||||
ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Integer from Standard) is protected;
|
||||
---Purpose: read <rsize> character from the current position.
|
||||
|
||||
ReadString(me : in out; buffer : in out AsciiString from TCollection) is protected;
|
||||
---Purpose: read from the first none space character position to the end of line.
|
||||
|
||||
FlushEndOfLine(me : in out) is protected;
|
||||
|
||||
FindTag(me : in out; aTag : CString from Standard) returns Error from Storage is protected;
|
||||
|
||||
MagicNumber(myclass)
|
||||
returns CString from Standard is private;
|
||||
---C++: return const
|
||||
|
||||
fields
|
||||
|
||||
myStream : FStream from FSD;
|
||||
end;
|
1385
src/FSD/FSD_File.cxx
Executable file
1385
src/FSD/FSD_File.cxx
Executable file
File diff suppressed because it is too large
Load Diff
118
src/FSD/FSD_FileHeader.hxx
Executable file
118
src/FSD/FSD_FileHeader.hxx
Executable file
@@ -0,0 +1,118 @@
|
||||
// File: FSD_FileHeader.hxx
|
||||
// Created: 20.06.08 18:01:46
|
||||
// Copyright: Open Cascade 2008
|
||||
|
||||
#ifndef _FSD_FileHeader_HeaderFile
|
||||
#define _FSD_FileHeader_HeaderFile
|
||||
|
||||
struct FSD_FileHeader {
|
||||
Standard_Integer testindian;
|
||||
Standard_Integer binfo;
|
||||
Standard_Integer einfo;
|
||||
Standard_Integer bcomment;
|
||||
Standard_Integer ecomment;
|
||||
Standard_Integer btype;
|
||||
Standard_Integer etype;
|
||||
Standard_Integer broot;
|
||||
Standard_Integer eroot;
|
||||
Standard_Integer bref;
|
||||
Standard_Integer eref;
|
||||
Standard_Integer bdata;
|
||||
Standard_Integer edata;
|
||||
};
|
||||
|
||||
#ifndef DO_INVERSE
|
||||
#if defined ( SOLARIS ) || defined ( IRIX )
|
||||
#define DO_INVERSE 1
|
||||
#else
|
||||
#define DO_INVERSE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//=======================================================================
|
||||
//function : InverseInt
|
||||
//purpose : Inverses bytes in the word
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Integer InverseInt (const Standard_Integer theValue)
|
||||
{
|
||||
return (0 | (( theValue & 0x000000ff ) << 24 )
|
||||
| (( theValue & 0x0000ff00 ) << 8 )
|
||||
| (( theValue & 0x00ff0000 ) >> 8 )
|
||||
| (( theValue >> 24 ) & 0x000000ff ) );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : InverseLong
|
||||
//purpose : Inverses bytes in the long word
|
||||
//=======================================================================
|
||||
|
||||
inline long InverseLong (const long theValue)
|
||||
{
|
||||
return (long) InverseInt ((Standard_Integer) theValue);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : InverseExtChar
|
||||
//purpose : Inverses bytes in the extended character
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_ExtCharacter InverseExtChar (const Standard_ExtCharacter theValue)
|
||||
{
|
||||
return (0 | (( theValue & 0x00ff ) << 8 )
|
||||
| (( theValue & 0xff00 ) >> 8 ) );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : InverseReal
|
||||
//purpose : Inverses bytes in the real value
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Real InverseReal (const Standard_Real theValue)
|
||||
{
|
||||
Standard_Real aResult;
|
||||
Standard_Integer *i = (Standard_Integer*) &theValue;
|
||||
Standard_Integer *j = (Standard_Integer*) &aResult;
|
||||
j[1] = InverseInt (i[0]);
|
||||
j[0] = InverseInt (i[1]);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : InverseShortReal
|
||||
//purpose : Inverses bytes in the short real value
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_ShortReal InverseShortReal (const Standard_ShortReal theValue)
|
||||
{
|
||||
Standard_ShortReal aResult;
|
||||
Standard_Integer *i = (Standard_Integer*) &aResult;
|
||||
*i = InverseInt (*(Standard_Integer*) &theValue);
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : InverseSize
|
||||
//purpose : Inverses bytes in size_t type instance
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Size InverseSize (const Standard_Size theValue)
|
||||
{
|
||||
if (sizeof(Standard_Size) == 4)
|
||||
return (0 | (( theValue & 0x000000ff ) << 24 )
|
||||
| (( theValue & 0x0000ff00 ) << 8 )
|
||||
| (( theValue & 0x00ff0000 ) >> 8 )
|
||||
| (( theValue >> 24 ) & 0x000000ff ) );
|
||||
else if (sizeof(Standard_Size) == 8) {
|
||||
Standard_Size aResult;
|
||||
Standard_Integer *i = (Standard_Integer*) &theValue;
|
||||
Standard_Integer *j = (Standard_Integer*) &aResult;
|
||||
j[1] = InverseInt (i[0]);
|
||||
j[0] = InverseInt (i[1]);
|
||||
return aResult;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user