Changes

Jump to navigation Jump to search
4,634 bytes added ,  00:01, 27 June 2017
→‎CSystemArchiveNod: Added all non virtual member functions
Line 974: Line 974:  
  class CSystemArchiveNod : public CClassicArchive
 
  class CSystemArchiveNod : public CClassicArchive
 
  {
 
  {
 +
public:
 +
    __thiscall CSystemArchiveNod(void);
 +
    virtual __thiscall ~CSystemArchiveNod(void);
 +
    virtual void __thiscall DoNodPtr(class CMwNod * &); // Reads or writes a reference to an object. If this is the first time the object is encountered, it is (de)serialized at this point.
 +
    virtual void __thiscall DoFid(class CSystemFidFile * &);
 +
    virtual void __thiscall DoFolder(class CSystemFidsFolder * &, int, class CSystemFidsFolder *);
 +
    virtual int __thiscall GetArchivingFileName(class CFastStringInt &)const;
 +
 +
    void __thiscall DoDecode(unsigned long);
 +
    int __thiscall DoFindNod(class CMwNod * &, class CSystemFid *);
 +
    int __thiscall DoIsFileSame(class CSystemFid *, class CClassicBufferMemory &)
 +
    void __thiscall DoFormatFromFid(void);
 +
    int __thiscall AddInternalRef(class CMwNod *, unsigned long &, char const *);
 +
    int __thiscall InsertExternalLocations(class CSystemFids *, class CFastBuffer<class CSystemFids *> *);
 +
    int __thiscall ExtractExternalLocations(class CFastBuffer<class CSystemFids *> * &, class CSystemFidsDrive *);
 +
    int __thiscall LoadCurrentHeader(enum EVersion);
 +
    int __thiscall DoLoadHeader(void);
 +
    int __thiscall DoSaveHeader(void);
 +
    int __thiscall DoLoadRef(void);
 +
    int __thiscall DoSaveRef(void);
 +
    int __thiscall DoLoadAllRef(void);
 +
    int __thiscall DoLoadBody(class CMwNod * &);
 +
    int __thiscall DoSaveBody(void);
 +
    int __thiscall DoSaveBodyMemory(class CMwNod *);
 +
    int __thiscall DoLoadAll(class CMwNod * &);
 +
    int __thiscall DoSaveAll(void);
 +
    int __thiscall DoSave(class CMwNod *, unsigned long, enum EArchive, int);
 +
    int __thiscall DoLoadResource(unsigned long, class CMwNod * &);
 +
    int __thiscall DoFidLoadFile(class CMwNod * &);
 +
    int __thiscall DoFidSaveFile(class CMwNod *);
 +
    int __thiscall DoFidSaveFileSafe(class CMwNod *, unsigned long);
 +
    int __thiscall DoFidLoadRefs(enum EArchive, class CClassicBuffer *);
 +
    int __thiscall DoFidLoadMemory(class CMwNod * &);
 +
    int __thiscall DoFidSaveMemory(class CMwNod *);
 +
    int __thiscall DoLoadFile(class CFastStringInt const &, class CMwNod * &, class CSystemFids *, enum EArchive);
 +
    int __thiscall DoSaveFile(class CFastStringInt const &, class CMwNod *, class CSystemFids *, unsigned long, enum EArchive, int);
 +
    int __thiscall DoLoadFromFid(class CMwNod * &);
 +
    int __thiscall DoLoadMemory(class CClassicBufferMemory *, class CMwNod * &);
 +
    int __thiscall DoSaveMemory(class CClassicBufferMemory *, class CMwNod *, unsigned long);
 +
    int __thiscall DoLoadMemoryTemp(class CClassicBufferMemory *, class CMwNod * &);
 +
    int __thiscall DoSaveMemoryTemp(class CClassicBufferMemory *, class CMwNod *, unsigned long, int);
 +
    static void __cdecl DoFolder(class CClassicArchive &, class CSystemFidsFolder * &, class CSystemFidsFolder *);
 +
    static int __cdecl SaveFile(class CFastStringInt const &, class CMwNod *, class CSystemFids *, unsigned long, enum EArchive, int);
 +
    static int __cdecl LoadFromFid(class CMwNod * &, class CSystemFid *, enum EArchive);
 +
    static int __cdecl SaveToFid(class CSystemFid *, class CMwNod *, unsigned long, int);
 +
    static int __cdecl LoadFileFrom(class CFastStringInt const &, class CMwNod * &, class CSystemFids *, enum EArchive);
 +
    static int __cdecl LoadFileToMemory(class CSystemFid *, class CClassicBufferMemory *)
 +
    static int __cdecl SaveMemoryToFile(class CSystemFid *, class CClassicBufferMemory *);
 +
    static int __cdecl SaveMemory(class CClassicBufferMemory *, class CMwNod *, unsigned long);
 +
    static int __cdecl LoadMemoryTemp(class CClassicBufferMemory *, class CMwNod * &);
 +
    static int __cdecl SaveMemoryTemp(class CClassicBufferMemory *, class CMwNod *, unsigned long, int);
 +
    static int __cdecl LoadResource(unsigned long, class CMwNod * &);
 +
    static int __cdecl Save(class CMwNod *, unsigned long, int);
 +
    static int __cdecl Compare(class CMwNod *, class CMwNod *, int &);
 +
    static int __cdecl Duplicate(class CMwNod * &, int);
 +
    static void __cdecl ComputeCrcNat32(class CMwNod *, unsigned long &);
 +
    static void __cdecl ComputeCrcString(class CMwNod *, class CFastString &);
 +
 +
private:
 +
    void __thiscall ParametrizedFinalization(class CMwNod *);
 +
    void __thiscall ParametrizedFindOrAddFid(class CSystemFid *,  class CMwNod *);
 +
 
  private:
 
  private:
 
     word version;                                      // .gbx file version
 
     word version;                                      // .gbx file version
Line 980: Line 1,042:  
     FastArray<CSystemFids*> externalFolders;          // References to other folders
 
     FastArray<CSystemFids*> externalFolders;          // References to other folders
 
     FastBuffer<ExternalNodEntry> externalNodEntries;  // References to other files
 
     FastBuffer<ExternalNodEntry> externalNodEntries;  // References to other files
     FastBuffer<NodEntry> nodEntries;                  // List of objects, both in the current .gbx file
+
     FastBuffer<NodEntry> nodEntries;                  // List of objects, both in the current .gbx file
 
                                                         // and from external files
 
                                                         // and from external files
 
     FastBuffer<CSystemFids*> folders;
 
     FastBuffer<CSystemFids*> folders;
Line 992: Line 1,054:  
           int nodIndex;          // Index in nodEntries of where the external object will be placed
 
           int nodIndex;          // Index in nodEntries of where the external object will be placed
 
           int folderIndex;      // Index in externalFolders to the folder containing the .gbx file
 
           int folderIndex;      // Index in externalFolders to the folder containing the .gbx file
           bool bUseFid;          // If false, the file pFid will be deserialized and nodEntries is
+
           bool bUseFid;          // If false, the file pFid will be deserialized and nodEntries is
 
                                 // populated with the resulting object.
 
                                 // populated with the resulting object.
                                 // If true, nodEntries is populated with pFid itself.
+
                                 // If true, nodEntries is populated with pFid itself.
 
     };
 
     };
 
   
 
   
Line 1,004: Line 1,066:  
     };
 
     };
 
  };
 
  };
 +
 +
For details on DoNodPtr, see the definition of "noderef" on the [[GBX#Primitives|GBX page]].
    
A .gbx file contains a serialized main object instance whose type is indicated by classID. This main object can reference other objects, which may be contained in the same .gbx file or in other files.
 
A .gbx file contains a serialized main object instance whose type is indicated by classID. This main object can reference other objects, which may be contained in the same .gbx file or in other files.
   −
All objects, both from the current .gbx file and from external files, are stored in the nodEntries list. The main object of the .gbx file is always at index 0. Every time a subobject is read from the .gbx file, or an external file is referenced, the nodEntries index is specified where the object should be stored. The process of reading .gbx files is explained in detail on the [[GBX|GBX page]].
+
All objects, both from the current .gbx file and from external files, are stored in the nodEntries list. The main object of the .gbx file is always at index 0. Every time a subobject is read from the .gbx file, or an external file is referenced, the nodEntries index is specified where the object should be stored. The process for reading a complete *.gbx file looks like this:
 +
LoadFileFrom -> DoLoadFile -> DoFidLoadFile -> DoLoadAll -> { DoLoadHeader { -> LoadCurrentHeader } -> DoLoadRef -> DoLoadBody }
 +
Reading the file header and body is explained in detail on the [[GBX|GBX page]].
    
== Tools ==
 
== Tools ==

Navigation menu