]> OCCT Git - occt-copy.git/commitdiff
Porting the fix 26229 to OCCT 6.9.1
authormsv <msv@opencascade.com>
Mon, 25 Apr 2016 10:00:05 +0000 (13:00 +0300)
committermsv <msv@opencascade.com>
Mon, 25 Apr 2016 12:15:55 +0000 (15:15 +0300)
33 files changed:
src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cdl
src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx
src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cdl
src/CDF/CDF_Application.cdl
src/CDM/CDM.cdl
src/CDM/CDM_Document.cdl
src/CDM/CDM_Reference.cdl
src/FSD/FSD_BinaryFile.cdl
src/FSD/FSD_BinaryFile.cxx
src/FSD/FSD_CmpFile.cdl
src/FSD/FSD_File.cdl
src/PCDM/PCDM.cdl
src/PCDM/PCDM_ReadWriter.cdl
src/PCDM/PCDM_Reader.cdl
src/PCDM/PCDM_RetrievalDriver.cdl
src/PCDM/PCDM_StorageDriver.cdl
src/PCDM/PCDM_Writer.cdl
src/Standard/Standard_Persistent_proto.hxx
src/Storage/Storage.cdl
src/Storage/Storage_BaseDriver.cdl
src/Storage/Storage_Data.cdl
src/Storage/Storage_HeaderData.cdl
src/Storage/Storage_InternalData.cdl
src/Storage/Storage_InternalData.cxx
src/Storage/Storage_Root.cdl
src/Storage/Storage_RootData.cdl
src/Storage/Storage_TypeData.cdl
src/TDocStd/TDocStd_Application.cdl
src/TDocStd/TDocStd_Application.cxx
src/XmlLDrivers/XmlLDrivers.cdl
src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cdl
src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx
src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cdl

index dc67cc2536710a892f41561fbbea001f7f291eda..c04a0758ab0012041702917e1844127718097f43 100644 (file)
@@ -18,6 +18,7 @@ class DocumentRetrievalDriver from BinLDrivers inherits RetrievalDriver from PCD
 uses
     HeaderData                  from Storage,
     Position                    from Storage,
+    Data                        from Storage,
     AsciiString                 from TCollection,
     ExtendedString              from TCollection,
     Document                    from PCDM,
@@ -57,6 +58,12 @@ is
                      theApplication: Application from CDM) is redefined virtual;
         ---Purpose: retrieves the content of the file into a new Document.
 
+    Read(me:mutable; theIStream:    in out IStream from Standard;
+                     theStorageData: Data from Storage;
+                     theNewDocument: Document    from CDM;
+                     theApplication: Application from CDM) is redefined virtual;
+        ---Purpose: retrieves the content of the stream into a new Document.
+
     AttributeDrivers  (me : mutable; theMsgDriver: MessageDriver from CDM)
         returns ADriverTable from BinMDF
         is virtual;
@@ -69,13 +76,6 @@ is
         is virtual protected;
         ---Purpose: Read the tree from the stream <theIS> to <theLabel>
 
-    ReadInfoSection(me: mutable; theFile : AsciiString from TCollection;
-                                 theData : in out HeaderData from Storage)
-        returns Position from Storage is protected;
-        ---Purpose: Read the  info  section  of  theFile into theData,
-        --          return a file  position  corresponding to the info
-        --          section end
-    
     ReadSection    (me: mutable;
                     theSection : in out DocumentSection from BinLDrivers;
                     theDoc     : Document    from CDM;
index f0bc9df6153200d7f56c69f4bee88a5746540ce3..7f62f8984d1855b3c0b6bb1f5e6fd1dfe35a6c7c 100644 (file)
 #include <BinObjMgt_Persistent.hxx>
 #include <FSD_BinaryFile.hxx>
 #include <FSD_FileHeader.hxx>
+#include <OSD_OpenFile.hxx>
 #include <PCDM_ReadWriter.hxx>
 #include <Standard_ErrorHandler.hxx>
 #include <Standard_Stream.hxx>
 #include <Storage_Schema.hxx>
+#include <Storage_HeaderData.hxx>
 #include <TDF_Data.hxx>
 #include <TDocStd_Document.hxx>
 #include <TDocStd_Owner.hxx>
index 088f292142c70004a0ad8207c78b75ed34cdd2c5..39655a14b2b5b027e4551415da3e57f6b379f888 100644 (file)
@@ -47,6 +47,11 @@ is
         is redefined virtual;
         ---Purpose: Write <theDocument> to the binary file <theFileName>
 
+    Write(me: mutable; aDocument: Document from CDM;
+                       theOStream: in out OStream from Standard)
+        is redefined virtual;
+        ---Purpose: Write <theDocument> to theOStream
+
     AttributeDrivers  (me : mutable; theMsgDriver: MessageDriver from CDM)
         returns ADriverTable from BinMDF
         is virtual;
@@ -82,7 +87,7 @@ is
         --          attributes to store
     
     WriteInfoSection(me: mutable; theDocument  : Document from CDM;
-                                  theFile      : AsciiString from TCollection)
+                                  theOS        : in out OStream from Standard)
         is private;
         ---Purpose: Write info secton using FSD_BinaryFile driver
     
@@ -109,5 +114,6 @@ fields
     myTypesMap  :       IndexedMapOfTransient   from TColStd;
 
     mySections  :       VectorOfDocumentSection from BinLDrivers;
+    myFileName  :       ExtendedString          from TCollection;
 
 end DocumentStorageDriver;
index b321ab31c0c25e2123c38bbd7ac1b057f1a0e909..abca18606b0c2a494cf593269ccd1f2605b5a25d 100644 (file)
@@ -155,7 +155,10 @@ is
     Reader(me: mutable; aFileName: ExtendedString from TCollection) 
     returns Reader from PCDM
     raises NoSuchObject from Standard;
-    
+
+    Read(me: mutable; theIStream: in out IStream from Standard)
+    returns Document from CDM;
+
     FindReaderFromFormat(me: mutable; aFormat: ExtendedString from TCollection)
     returns Boolean from Standard;
     
index 7e5198e8471953cfb91262fddff22c13c62e8a05..d6a61d0a963f3a62e390edb2fb60725672871f8b 100644 (file)
@@ -50,7 +50,7 @@ is
     ---Purpose: this map will allows to get a directory object from a name.
          
     private pointer DocumentPointer to Document from CDM;
-    private class Reference;    
+    class Reference;    
 
     private class ListOfReferences instantiates List from TCollection(Reference from CDM);
     deferred class Application;
index c9170923ef1a0f6ec4af567cb781dc974152b96d..a8a41da76e782d56b3a036c08c33722ade30b8ef 100644 (file)
@@ -448,8 +448,7 @@ is
 ---Category: private methods;
 --           
     Reference(me; aReferenceIdentifier: Integer from Standard)
-    returns Reference from CDM
-    is private;
+    returns Reference from CDM;
 
     ComputePresentation(me: mutable)
     is private;
@@ -471,13 +470,11 @@ is
     RemoveFromReference(me: mutable; aReferenceIdentifier: Integer from Standard)
     is private;
 
-    SetModifications(me: mutable; Modifications: Integer from Standard)
-    is private;
+    SetModifications(me: mutable; Modifications: Integer from Standard);
 
     ReferenceCounter(me) returns Integer from Standard;
     
-    SetReferenceCounter(me: mutable; aReferenceCounter: Integer from Standard)
-    is private;
+    SetReferenceCounter(me: mutable; aReferenceCounter: Integer from Standard);
 
 ---Category: obsolete methods
 
index 8efe4cb74b3ba4223c1e3f990b4789b585947a75..74302cb19fbd006f770ad5a42ab4cc5b80834528 100644 (file)
@@ -14,7 +14,7 @@
 -- Alternatively, this file may be used under the terms of Open CASCADE
 -- commercial license or contractual agreement.
 
-private class Reference from CDM  inherits Transient from Standard
+class Reference from CDM  inherits Transient from Standard
 
 uses Document from CDM, DocumentPointer from CDM, Application from CDM, MetaData from CDM
 
index f096a5cc2a25d0045b2ac0dce8354b5a5b5adabb..5af22d072c07d7a240e42f90f81bcb59f0266d06 100644 (file)
@@ -26,7 +26,10 @@ uses Position    from Storage,
      SequenceOfExtendedString from TColStd,
      ExtendedString from TCollection,
      FileHeader from FSD,
-     BStream     from FSD
+     BStream     from FSD,
+     Data from Storage,
+     OStream from Standard,
+     HeaderData from Storage
      
 raises StreamTypeMismatchError from Storage,
        StreamFormatError from Storage,
@@ -61,8 +64,24 @@ is
                           objectType : ExtendedString from TCollection;
                           userInfo : SequenceOfAsciiString from TColStd)
     raises StreamWriteError;
+    
+    WriteInfo(myclass;     theOStream: in out OStream from Standard;
+                           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;
+                           theOnlyCount: Boolean = Standard_False)
+    returns Integer raises StreamWriteError;
                           
     EndWriteInfoSection(me : in out) returns Error from Storage;
+
+    EndWriteInfoSection(me : in out; theOStream: in out OStream from Standard)
+    returns Error from Storage;
     
     -- read
     -- 
@@ -79,6 +98,9 @@ is
                          userInfo : in out SequenceOfAsciiString from TColStd)
     raises StreamTypeMismatchError,StreamExtCharParityError;
     
+    ReadCompleteInfo(me: in out; theIStream: in out IStream from Standard;
+                                 theData: out Data from Storage) is redefined virtual;
+
     EndReadInfoSection(me : in out) returns Error from Storage;
 
     -- COMMENTS SECTION
@@ -86,10 +108,21 @@ is
     -- 
     BeginWriteCommentSection(me : in out) returns Error from Storage;    
     
+    BeginWriteCommentSection(me : in out; theOStream: in out OStream from Standard)
+    returns Error from Storage;
+    
     WriteComment(me : in out; userComments : SequenceOfExtendedString from TColStd)
     raises StreamWriteError;
+
+    WriteComment(myclass; theOStream: in out OStream from Standard;
+                          userComments : SequenceOfExtendedString from TColStd;
+                          theOnlyCount: Boolean = Standard_False)
+    returns Integer raises StreamWriteError;
                           
     EndWriteCommentSection(me : in out) returns Error from Storage;
+
+    EndWriteCommentSection(me : in out; theOStream: in out OStream from Standard)
+    returns Error from Storage;
     
     -- read
     -- 
@@ -97,6 +130,10 @@ is
 
     ReadComment(me : in out;  userComments : in out SequenceOfExtendedString from TColStd)
     raises StreamTypeMismatchError,StreamExtCharParityError;
+
+    ReadComment(myclass;  theIStream: in out IStream from Standard;
+                          userComments : in out SequenceOfExtendedString from TColStd)
+    raises StreamTypeMismatchError,StreamExtCharParityError;
     
     EndReadCommentSection(me : in out) returns Error from Storage;
 
@@ -118,9 +155,17 @@ is
     
     TypeSectionSize(me : in out) returns Integer from Standard
     raises StreamTypeMismatchError;
+
+    TypeSectionSize(myclass; theIStream: in out IStream from Standard) returns Integer from Standard
+    raises StreamTypeMismatchError;
     
     ReadTypeInformations(me : in out; typeNum : in out Integer from Standard; typeName : in out AsciiString from TCollection)
     raises StreamTypeMismatchError;
+
+    ReadTypeInformations(myclass; theIStream: in out IStream from Standard;
+                                  typeNum : in out Integer from Standard;
+                                  typeName : in out AsciiString from TCollection)
+    raises StreamTypeMismatchError;
     
     EndReadTypeSection(me : in out) returns Error from Storage;
     
@@ -143,9 +188,18 @@ is
     
     RootSectionSize(me : in out) returns Integer from Standard
     raises StreamTypeMismatchError;
+
+    RootSectionSize(myclass; theIStream: in out IStream from Standard) 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;
+
+    ReadRoot(myclass; theIStream: in out IStream from Standard;
+                      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;
     
@@ -168,9 +222,17 @@ is
     
     RefSectionSize(me : in out) returns Integer from Standard
     raises StreamTypeMismatchError;
+
+    RefSectionSize(myclass; theIStream: in out IStream from Standard) returns Integer from Standard
+    raises StreamTypeMismatchError;
     
     ReadReferenceType(me : in out; reference : in out Integer from Standard; typeNum : in out Integer from Standard)
     raises StreamTypeMismatchError;
+
+    ReadReferenceType(myclass; theIStream: in out IStream from Standard;
+                               reference : in out Integer from Standard; 
+                               typeNum : in out Integer from Standard)
+    raises StreamTypeMismatchError;
     
     EndReadRefSection(me : in out) returns Error from Storage;
     
@@ -235,6 +297,11 @@ is
     ---C++: alias operator <<
     ---C++: return &
 
+    PutInteger(myclass; theOStream: in out OStream from Standard;
+                        aValue : Integer from Standard;
+                        theOnlyCount: Boolean = Standard_False) returns Integer
+    raises StreamWriteError;
+
     PutInteger(me : in out; aValue : Integer from Standard) returns like me
     raises StreamWriteError;
     ---C++: alias operator <<
@@ -259,6 +326,10 @@ is
        raises StreamTypeMismatchError;
     ---C++: return &
 
+    GetReference(myclass; theIStream: in out IStream from Standard;
+                          aValue : in out Integer from Standard)
+       raises StreamTypeMismatchError;
+
     GetCharacter(me : in out; aValue : in out Character from Standard) returns like me
        raises StreamTypeMismatchError;
     ---C++: alias operator >>
@@ -273,6 +344,10 @@ is
        raises StreamTypeMismatchError;
     ---C++: alias operator >>
     ---C++: return &
+
+    GetInteger(myclass; theIStream: in out IStream from Standard;
+                        aValue : in out Integer from Standard)
+       raises StreamTypeMismatchError;
     
     GetBoolean(me : in out; aValue : in out Boolean from Standard) returns like me
        raises StreamTypeMismatchError;
@@ -294,11 +369,27 @@ is
     Destroy(me : in out);
     ---C++: alias ~
 
+    ReadHeader(myclass; theIStream: in out IStream from Standard;
+                        theFileHeader: in out FileHeader from FSD );
+
+    ReadHeaderData(myclass; theIStream: in out IStream from Standard;
+                            theHeaderData: HeaderData from Storage );
+
+    ReadString(myclass; theIStream: in out IStream from Standard;
+                        theBuffer: out AsciiString from TCollection);
+
+    ReadExtendedString(myclass; theIStream: in out IStream from Standard;
+                                theBuffer: out ExtendedString from TCollection);
+
+    WriteHeader(myclass; theOStream: in out OStream from Standard;
+                         theFileHeader: FileHeader from FSD;
+                         theOnlyCount: Boolean = Standard_False ) returns Integer;
+
     WriteHeader(me : in out) is private;
     ReadHeader(me : in out) is private;
     
     MagicNumber(myclass)
-       returns CString from Standard is private;
+       returns CString from Standard;
     ---C++: return const
  
     ReadChar(me : in out; buffer : in out AsciiString from TCollection; rsize : Size from Standard) is protected;
@@ -310,11 +401,21 @@ is
     WriteString(me : in out; buffer : AsciiString from TCollection) is protected;
     ---Purpose: write string at the current position.    
 
+    WriteString(myclass; theOStream: in out OStream from Standard;
+                         theString : AsciiString from TCollection;
+                         theOnlyCount: Boolean = Standard_False) returns Integer 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.    
+
+    WriteExtendedString(myclass; theOStream: in out OStream from Standard;
+                                 theString : ExtendedString from TCollection;
+                                 theOnlyCount: Boolean = Standard_False) returns Integer is protected;
+    ---Purpose: write string at the current position.
     
     fields
     
index 6bf7e61a055cc5f4cf9fdeabf0fefc7e84da929d..b931adaaedf978979e7751eddf0d3982cd13fb4f 100644 (file)
 #include <FSD_BinaryFile.ixx>
 #include <OSD.hxx>
 #include <OSD_OpenFile.hxx>
+#include <Storage_HArrayOfCallBack.hxx>
+#include <Storage_HSeqOfRoot.hxx>
+#include <Storage_HPArray.hxx>
+#include <Storage_InternalData.hxx>
+#include <Storage_HeaderData.hxx>
+#include <Storage_InternalData.hxx>
+#include <Storage_Root.hxx>
+#include <Storage_RootData.hxx>
+#include <Storage_TypeData.hxx>
 
 const Standard_CString MAGICNUMBER = "BINFILE";
 
index eb331861688fc18841bc366d6adecceab67229f3..4bba9cfe4669145bde436014e01a907c60959b30 100644 (file)
@@ -25,7 +25,8 @@ uses Position    from Storage,
      SequenceOfAsciiString from TColStd,
      SequenceOfExtendedString from TColStd,
      ExtendedString from TCollection,
-     FStream     from FSD
+     FStream     from FSD,
+     Data from Storage
      
 raises StreamTypeMismatchError from Storage,
        StreamFormatError from Storage,
@@ -78,6 +79,9 @@ is
                          userInfo : in out SequenceOfAsciiString from TColStd)
     raises StreamTypeMismatchError,StreamExtCharParityError;
     
+    ReadCompleteInfo(me: in out; theIStream: in out IStream from Standard;
+                                 theData: out Data from Storage) is redefined virtual;
+    
     EndReadInfoSection(me : in out) returns Error from Storage;
 
     -- COMMENTS SECTION
@@ -318,7 +322,7 @@ is
     FindTag(me : in out; aTag : CString from Standard) returns Error from Storage is protected; 
 
     MagicNumber(myclass)
-       returns CString from Standard is private;
+       returns CString from Standard;
     ---C++: return const
     
     RaiseError(me: in out ; theFailure: Type from Standard) is private;
index 86eb8e197f5870acca177b486654ca2d989e3718..043500547a53de88a6ff63f4cb83adfffde9335d 100644 (file)
@@ -27,7 +27,8 @@ uses Position    from Storage,
      SequenceOfAsciiString from TColStd,
      SequenceOfExtendedString from TColStd,
      ExtendedString from TCollection,
-     FStream     from FSD
+     FStream     from FSD,
+     Data from Storage
      
 raises StreamTypeMismatchError from Storage,
        StreamFormatError from Storage,
@@ -89,6 +90,9 @@ is
                          userInfo : in out SequenceOfAsciiString from TColStd)
     raises StreamTypeMismatchError,StreamExtCharParityError;
     
+    ReadCompleteInfo(me: in out; theIStream: in out IStream from Standard;
+                                 theData: out Data from Storage) is redefined virtual;
+    
     EndReadInfoSection(me : in out) returns Error from Storage;
 
     -- COMMENTS SECTION
@@ -334,7 +338,7 @@ is
     FindTag(me : in out; aTag : CString from Standard) returns Error from Storage is protected; 
 
     MagicNumber(myclass)
-       returns CString from Standard is private;
+       returns CString from Standard;
     ---C++: return const
     
     fields
index 9aae68f53565111de23ca86a9c005448b83f020b..c60a50c763b1d91c99f9045c374e42d77c8ab8ac 100644 (file)
@@ -108,4 +108,9 @@ is
     FileDriverType(aFileName: AsciiString from TCollection; aBaseDriver: out BaseDriverPointer from PCDM)
     returns TypeOfFileDriver from PCDM
     is private;
+
+    FileDriverType(theIStream: in out IStream from Standard; aBaseDriver: out BaseDriverPointer from PCDM)
+    returns TypeOfFileDriver from PCDM
+    is private;
+
 end PCDM;
index 70eb68bbdeb6ff55edba31e5a4de0d4bfe6c39e2..28ab81540ee086fcd1888aaaac9fff4aac9b8487 100644 (file)
@@ -85,4 +85,8 @@ is
     ---Purpose: tries  to get a format  in the  file.  returns an empty
     --          string if the file could not be read or does not have 
     --          a FileFormat information.
+
+    FileFormat(myclass; theIStream: in out IStream from Standard; theData: out Data from Storage)
+    returns ExtendedString from TCollection;
+
 end ReadWriter from PCDM;
index 9bab9f37cfd9038aa7956b82709cf65f1100e8b1..a35ac25ab6bda93e569269094196998f238f4d9b 100644 (file)
@@ -21,8 +21,10 @@ uses
     Document from CDM, 
     ExtendedString from TCollection,  
     Application from CDM, 
-    ReaderStatus from PCDM
-
+    ReaderStatus from PCDM,
+    IStream from Standard,
+    Data from Storage
+                     
 raises  DriverError from PCDM
 
 
@@ -38,6 +40,14 @@ is
     raises DriverError from PCDM
     is deferred;
     ---Purpose: retrieves the content of the file into a new Document.  
+
+    Read(me: mutable; theIStream:  in out IStream from Standard;
+                      theStorageData: Data from Storage;
+                      aNewDocument: Document from CDM;
+                     anApplication: Application from CDM)
+    raises DriverError from PCDM
+    is deferred;
+    ---Purpose: retrieves the content of the stream into a new Document.  
     
     GetStatus(me) returns ReaderStatus from PCDM; 
     ---C++: inline
index 70dd2914211d1a71a2e4dc4816dcbcf1023c5f5d..627d4baa703a30b9f8cc71677e9a0f0b9d298c1d 100644 (file)
@@ -27,7 +27,9 @@ uses
     SequenceOfReference from PCDM, 
     Schema from Storage, 
     MessageDriver from CDM,
-    Application from CDM
+    Application from CDM,
+    IStream from Standard,
+    Data from Storage
 
 raises NoSuchObject from Standard,  DriverError from PCDM
 
@@ -48,6 +50,13 @@ is
     --          transient document.
     --          
 
+    Read(me: mutable; theIStream:  in out IStream from Standard;
+                      theStorageData: Data from Storage;
+                      aNewDocument: Document from CDM;
+                     anApplication: Application from CDM)
+    raises DriverError from PCDM
+    is redefined virtual;
+
     Make(me : mutable; aPCDM: Document from PCDM; aNewDocument: Document from CDM)
     raises DriverError from PCDM
     is deferred;
index 4b902ab8126f8aaf715857f607211af048d96bb2..622288cae94fd64f15f625368e3ac1335b8eb738 100644 (file)
@@ -41,7 +41,8 @@ uses
     Schema from Storage,
     SequenceOfExtendedString from TColStd,
     SequenceOfDocument from PCDM,
-    StoreStatus from PCDM
+    StoreStatus from PCDM,
+    OStream from Standard
 
 raises NoSuchObject from Standard,DriverError from PCDM
 is
@@ -76,6 +77,10 @@ is
     --          document and the Schema method to write the persistent document.
     --          
 
+    Write(me: mutable; aDocument: Document from CDM; theOStream: in out OStream from Standard)
+    raises DriverError
+    is redefined virtual;
+
     SetFormat (me : mutable; aformat : ExtendedString from TCollection);
 
     GetFormat (me)
index 75d0330db43b90310d59900546fbd7802af5995c..7dc1c6466067576a3dd9dbbcec677c5d933f48a9 100644 (file)
@@ -25,4 +25,8 @@ is
     raises DriverError
     is deferred;
 
+    Write(me: mutable; aDocument: Document from CDM; theOStream: in out OStream from Standard)
+    raises DriverError
+    is deferred;
+
 end Writer from PCDM;
index a73b70fa182d592239ce356f2e275a65a4fcf40d..8d3428f52c775d688ee0098095a027da4beb01e0 100644 (file)
@@ -52,6 +52,7 @@ public:
   Standard_EXPORT virtual const Handle_Standard_Type& DynamicType() const;
   Standard_EXPORT         Standard_Boolean            IsKind(const Handle_Standard_Type&)const;
   Standard_EXPORT         Standard_Boolean            IsInstance(const Handle_Standard_Type&)const;  
+  Standard_Integer& TypeNum() { return _typenum; }
 };
 
 #include <Handle_Standard_Persistent.hxx>
index cdb172530bea3b49cec0fb517f02e21f37ed6c57..15c18e00caff11369f5684cfc7096af64618f292 100644 (file)
@@ -134,9 +134,10 @@ is
     
     class HSeqOfRoot instantiates HSequence from TCollection(Root from Storage,SeqOfRoot);
 
+    class InternalData;
+
     -- PRIVATE
     
-    private class InternalData;
     private class stCONSTclCOM;
 
     private class TypedCallBack;
@@ -159,8 +160,8 @@ is
     class ArrayOfSchema instantiates Array1 from TCollection(Schema from Storage);
     class HArrayOfSchema instantiates HArray1 from TCollection(Schema from Storage,ArrayOfSchema from Storage);
     
-    private class PArray instantiates Array1 from TCollection(Persistent from Standard);  
-    private class HPArray instantiates HArray1 from TCollection(Persistent from Standard, PArray from Storage);
+    class PArray instantiates Array1 from TCollection(Persistent from Standard);  
+    class HPArray instantiates HArray1 from TCollection(Persistent from Standard, PArray from Storage);
     
     -- METHODS
     
index 3afdfbcd25d60e2483db6944101aec1d0cc86774..d935cdf7bea466603ef7b66ab30625d6456672bb 100644 (file)
@@ -26,7 +26,9 @@ uses Position    from Storage,
      Error       from Storage,
      ExtendedString from TCollection,
      SequenceOfAsciiString from TColStd,
-     SequenceOfExtendedString from TColStd
+     SequenceOfExtendedString from TColStd,
+     IStream from Standard,
+     Data from Storage
      
 raises StreamTypeMismatchError from Storage,
        StreamFormatError from Storage,
@@ -47,6 +49,9 @@ is
     OpenMode(me) returns OpenMode from Storage;
     ---C++: inline
 
+    ReadMagicNumber(myclass; theIStream: in out IStream from Standard)
+        returns AsciiString from TCollection;
+
     IsEnd(me : in out) returns Boolean from Standard is deferred;
     ---Purpose: returns True if we are at end of the stream    
 
@@ -90,6 +95,10 @@ is
     raises StreamTypeMismatchError,StreamExtCharParityError
     is deferred;
     
+    ReadCompleteInfo(me: in out; theIStream: in out IStream from Standard;
+                                 theData: out Data from Storage)
+    is deferred;
+
     EndReadInfoSection(me : in out) returns Error from Storage 
     is deferred;
 
index 83a33e302bc2b7f8654485fe597d75cb950889ec..ef43d8e8616b513efdc87dc78d41b072c8534592 100644 (file)
@@ -215,13 +215,14 @@ is
        ---Purpose: 
        -- Gives the list of types of objects used in this set of data in a sequence.
 
+    HeaderData(me) returns HeaderData from Storage;
+    RootData(me) returns RootData from Storage;
+    TypeData(me) returns TypeData from Storage;
+    InternalData(me) returns InternalData from Storage;
+    Clear(me);
+
     -- PRIVATE
 
-    HeaderData(me) returns HeaderData from Storage is private;
-    RootData(me) returns RootData from Storage is private;
-    TypeData(me) returns TypeData from Storage is private;
-    InternalData(me) returns InternalData from Storage is private;
-    Clear(me) is private;
     SetErrorStatus(me : mutable; anError : Error from Storage) is private;    
     SetErrorStatusExtension(me : mutable; anErrorExt : AsciiString from TCollection) is private;    
     
index ba62a92febce007ed26915f890cb4a0c009a1009..ce02fd3d251e1738406c0c9d0ac7e7c24d322057 100644 (file)
@@ -82,14 +82,14 @@ is
     
     ClearErrorStatus(me : mutable);
     
+    SetNumberOfObjects(me : mutable; anObjectNumber : Integer from Standard);
+    SetStorageVersion(me : mutable; aVersion : AsciiString from TCollection);
+    SetCreationDate(me : mutable; aDate : AsciiString from TCollection);
+    SetSchemaVersion(me : mutable; aVersion : AsciiString from TCollection);
+    SetSchemaName(me : mutable; aName : AsciiString from TCollection);
 
     -- PRIVATE
 
-    SetNumberOfObjects(me : mutable; anObjectNumber : Integer from Standard) is private;
-    SetStorageVersion(me : mutable; aVersion : AsciiString from TCollection) is private;
-    SetCreationDate(me : mutable; aDate : AsciiString from TCollection) is private;
-    SetSchemaVersion(me : mutable; aVersion : AsciiString from TCollection) is private;
-    SetSchemaName(me : mutable; aName : AsciiString from TCollection) is private;
     SetErrorStatus(me : mutable; anError : Error from Storage) is private;
     SetErrorStatusExtension(me : mutable; anErrorExt : AsciiString from TCollection) is private;    
 
index 3b2d2fe38b523362f445e190bc6be19f3c7f82bb..57de3c44feba322fdfa72ad39e78e72917ca3a2f 100644 (file)
@@ -14,7 +14,7 @@
 -- Alternatively, this file may be used under the terms of Open CASCADE
 -- commercial license or contractual agreement.
 
-private class InternalData from Storage
+class InternalData from Storage
 
 inherits TShared from MMgt
 
@@ -23,6 +23,9 @@ uses BucketOfPersistent from Storage,
      MapOfCallBack from Storage         
 is
     Create returns InternalData from Storage;
+
+    ReadArray(me: mutable) returns HPArray from Storage;
+    ---C++: return &
     
     Clear(me : mutable);
     
index 1b00b9648f1cb9b61faf5e0dc70adf1846c38734..da15ab18e6ec7131bd53c35023e42d0e5602915e 100644 (file)
@@ -27,3 +27,7 @@ void Storage_InternalData::Clear()
   myTypeBinding.Clear();
 }
 
+Handle(Storage_HPArray)& Storage_InternalData::ReadArray()
+{
+  return myReadArray;
+}
index 5d15895c9b505930d6367b800945c613648bdd7c..921061acdf345c606792c850727ac4416a099bd0 100644 (file)
@@ -64,9 +64,9 @@ is
     Type(me) returns AsciiString from TCollection;
        ---Purpose: Returns the name of this root type.   
     
-    SetReference(me : mutable; aRef : Integer from Standard) is private;
-    Reference(me) returns Integer from Standard is private;
-    SetType(me : mutable; aType : AsciiString from TCollection) is private;
+    SetReference(me : mutable; aRef : Integer from Standard);
+    Reference(me) returns Integer from Standard;
+    SetType(me : mutable; aType : AsciiString from TCollection);
     
     fields
        
index 0ec652a7577bab2aba283fa16abbc2762aa2d7b3..82ace4e4caf8a167c7c697d293fd3caa37a1a67e 100644 (file)
@@ -57,8 +57,7 @@ is
     -- PRIVATE
 
     UpdateRoot(me : mutable; aName : AsciiString from TCollection; aPers : Persistent from Standard) 
-    raises NoSuchObject
-    is private;
+    raises NoSuchObject;
 
     SetErrorStatus(me : mutable; anError : Error from Storage) is private;
     SetErrorStatusExtension(me : mutable; anErrorExt : AsciiString from TCollection) is private;    
index bade8ef5efd9fdf3fe2086d808dd245340713a07..fdbe28bdb611426132deb52e637193b54fb03346 100644 (file)
@@ -42,15 +42,15 @@ is
        
     -- PRIVATE
 
-    AddType(me : mutable; aName : AsciiString from TCollection; aTypeNum : Integer from Standard) is private;
+    AddType(me : mutable; aName : AsciiString from TCollection; aTypeNum : Integer from Standard);
     ---Purpose: add a type to the list
     
     Type(me; aTypeNum : Integer from Standard) returns AsciiString from TCollection
-      raises NoSuchObject is private;
+      raises NoSuchObject;
     ---Purpose: returns the name of the type with number <aTypeNum>
     
     Type(me; aTypeName : AsciiString from TCollection) returns Integer from Standard
-      raises NoSuchObject is private;
+      raises NoSuchObject;
     ---Purpose: returns the name of the type with number <aTypeNum>
 
     SetErrorStatus(me : mutable; anError : Error from Storage) is private;
index 700360d068b48d766351e18893e2c9d3cccc5e26..bc812b329cedcd0f520094f3bd668945a8dd9f74 100644 (file)
@@ -52,7 +52,9 @@ uses Manager                  from Resource,
      ExtendedString           from TCollection,
      SequenceOfExtendedString from TColStd,
      ReaderStatus             from PCDM,
-     StoreStatus              from PCDM
+     StoreStatus              from PCDM,
+     IStream                  from Standard,
+     OStream                  from Standard
 
 raises NoSuchObject from Standard
 
@@ -192,11 +194,21 @@ is
        -- to depend on the value returned by IsInSession.
     returns ReaderStatus from PCDM;
 
+    Open (me : mutable; theIStream: in out IStream from Standard;
+                        aDoc : out Document from TDocStd)
+       ---Purpose: Retrieves aDoc from standard SEEKABLE stream theIStream.
+    returns ReaderStatus from PCDM;
+
     SaveAs (me : mutable; aDoc : Document from TDocStd;
                           path : ExtendedString from TCollection)
        ---Purpose:  Save the  active document  in the file  <name> in the
        --           path <path> ; o verwrites  the file  if  it already exists.
     returns StoreStatus from PCDM;
+
+    SaveAs (me : mutable; aDoc : Document from TDocStd;
+                          theOStream : in out OStream from Standard)
+       ---Purpose:  Save theDoc to standard SEEKABLE stream theOStream.
+    returns StoreStatus from PCDM;
     
     
     Save (me : mutable; aDoc : Document from TDocStd)
@@ -213,6 +225,12 @@ is
        --           path <path>  .  overwrite  the file  if  it
        --          already exist. 
     returns StoreStatus from PCDM;    
+
+    SaveAs (me : mutable; aDoc : Document from TDocStd;
+                          theOStream : in out OStream from Standard;
+                          theStatusMessage:  out  ExtendedString from TCollection)
+       ---Purpose:  Save theDoc to standard SEEKABLE stream theOStream.
+    returns StoreStatus from PCDM;
     
     Save (me : mutable; aDoc : Document from TDocStd; 
                        theStatusMessage:  out  ExtendedString from TCollection)
index 4005d3e5c1a224cb4a9ed7a08efc497b6bcef202..28f2e9af798f0c06070460ebebc0a9e069b1a83c 100644 (file)
@@ -19,6 +19,8 @@
 #include <CDF_Session.hxx>
 #include <CDF_DirectoryIterator.hxx>
 #include <CDF_Directory.hxx>
+#include <PCDM_StorageDriver.hxx>
+#include <Plugin.hxx>
 
 #include <Standard_ErrorHandler.hxx>
 #include <Standard_NotImplemented.hxx>
index 9b4514ecb0cec4fe934a6913b80e8ff07bb1166b..17967a006b7e86f8920a51bc40c4bdfc436504cd 100644 (file)
@@ -17,6 +17,7 @@ package XmlLDrivers
 
 uses
     Standard,
+    Storage,
     TDF,
     TDocStd,
     TCollection,
index 53ea25c661557859ef06327d85a936b8c09bca9f..7692fa4d2241c2d2a5908e4b61a2b32d399e59e6 100644 (file)
@@ -26,7 +26,9 @@ uses
     ADriverTable               from XmlMDF,
     RRelocationTable           from XmlObjMgt,
     Element                    from XmlObjMgt,
-    MessageDriver               from CDM
+    MessageDriver               from CDM,
+    IStream                     from Standard,
+    Data                        from Storage
 
 is
     Create returns DocumentRetrievalDriver from XmlLDrivers;
@@ -50,6 +52,11 @@ is
                     theApplication: Application from CDM) is redefined virtual;
     -- 
 
+    Read(me:mutable; theIStream: in out IStream from Standard;
+                     theData: Data from Storage;
+                    theNewDocument: Document    from CDM;
+                    theApplication: Application from CDM) is redefined virtual;
+
     ReadFromDomDocument (me : mutable; theDomElement: Element from XmlObjMgt;
                                       theNewDocument: Document from CDM;
                                       theApplication: Application from CDM)
index 3842cea943b49569c0108905044dbadba0dac249..751027143281d5aba20454d4b8f551434f765406 100644 (file)
@@ -33,6 +33,7 @@
 #include <TCollection_AsciiString.hxx>
 #include <UTL.hxx>
 #include <OSD_Path.hxx>
+#include <OSD_OpenFile.hxx>
 
 #ifdef WNT
 # include <tchar.h>
index ae6c94fb4719c39039575dd791b29ee21600cd18..04311dc7c6a1cfbf4971be40e3cf8a4586012393 100644 (file)
@@ -25,7 +25,8 @@ uses
     Element                    from XmlObjMgt,
     SRelocationTable           from XmlObjMgt,
     ADriverTable               from XmlMDF,
-    MessageDriver               from CDM
+    MessageDriver               from CDM,
+    OStream                     from Standard
 
 is
     Create (theCopyright: ExtendedString from TCollection)
@@ -40,9 +41,12 @@ is
        is redefined virtual;
     -- Write <aDocument> to the xml file <theFileName>
 
+    Write            (me: mutable;theDocument: Document       from CDM;
+                                  theOStream: in out OStream from Standard)
+       is redefined virtual;
+
     WriteToDomDocument(me:mutable; theDocument: Document from CDM;
-                                  thePDoc    : out Element from XmlObjMgt;
-                                  theFileName: ExtendedString from TCollection)
+                                  thePDoc    : out Element from XmlObjMgt)
        returns Boolean from Standard
        is virtual protected;
 
@@ -67,5 +71,6 @@ fields
     mySeqOfNS  :       SequenceOfNamespaceDef   from XmlLDrivers;
     myCopyright :       ExtendedString           from TCollection;
     myRelocTable:      SRelocationTable         from XmlObjMgt  is protected;
+    myFileName  :       ExtendedString           from TCollection;
 
 end DocumentStorageDriver;