|
||||
File indexing completed on 2025-01-18 10:05:01
0001 // Copyright (c) 2017 OPEN CASCADE SAS 0002 // 0003 // This file is part of Open CASCADE Technology software library. 0004 // 0005 // This library is free software; you can redistribute it and/or modify it under 0006 // the terms of the GNU Lesser General Public License version 2.1 as published 0007 // by the Free Software Foundation, with special exception defined in the file 0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0009 // distribution for complete text of the license and disclaimer of any warranty. 0010 // 0011 // Alternatively, this file may be used under the terms of Open CASCADE 0012 // commercial license or contractual agreement. 0013 0014 #ifndef _StdStorage_Data_HeaderFile 0015 #define _StdStorage_Data_HeaderFile 0016 0017 #include <Standard_Transient.hxx> 0018 #include <Standard_Macro.hxx> 0019 #include <Standard_Handle.hxx> 0020 0021 class StdStorage_HeaderData; 0022 class StdStorage_TypeData; 0023 class StdStorage_RootData; 0024 0025 //! A picture memorizing the stored in a 0026 //! container (for example, in a file). 0027 //! A StdStorage_Data object represents either: 0028 //! - persistent data to be written into a container, 0029 //! or 0030 //! - persistent data which are read from a container. 0031 //! A StdStorage_Data object is used in both the 0032 //! storage and retrieval operations: 0033 //! - Storage mechanism: create an empty 0034 //! StdStorage_Data object, then add successively 0035 //! persistent objects (roots) to be stored using 0036 //! the StdStorage_RootData's function AddRoot. When the set of 0037 //! data is complete, write it to a container using the 0038 //! function Write in your StdStorage algorithm. 0039 //! - Retrieval mechanism: a StdStorage_Data 0040 //! object is returned by the Read function from 0041 //! your StdStorage algorithm. Use the StdStorage_RootData's 0042 //! functions NumberOfRoots and Roots to find the roots which 0043 //! were stored in the read container. 0044 //! The roots of a StdStorage_Data object may share 0045 //! references on objects. The shared internal 0046 //! references of a StdStorage_Data object are 0047 //! maintained by the storage/retrieval mechanism. 0048 //! Note: References shared by objects which are 0049 //! contained in two distinct StdStorage_Data objects 0050 //! are not maintained by the storage/retrieval 0051 //! mechanism: external references are not 0052 //! supported by Storage_Schema algorithm 0053 class StdStorage_Data 0054 : public Standard_Transient 0055 { 0056 0057 public: 0058 0059 //! Creates an empty set of data. 0060 //! You explicitly create a StdStorage_Data object 0061 //! when preparing the set of objects to be stored 0062 //! together in a container (for example, in a file). 0063 //! Then use the function StdStorage_RootData's AddRoot 0064 //! to add persistent objects to the set of data. 0065 //! A StdStorage_Data object is also returned by the 0066 //! Read function of a StdStorage algorithm. Use the 0067 //! StdStorage_RootData's functions NumberOfRoots and 0068 //! Roots to find the roots which were stored in the 0069 //! read container. 0070 Standard_EXPORT StdStorage_Data(); 0071 0072 //! Makes the container empty 0073 Standard_EXPORT void Clear(); 0074 0075 //! Returns the header data section 0076 Handle(StdStorage_HeaderData) HeaderData() { return myHeaderData; } 0077 0078 //! Returns the type data section 0079 Handle(StdStorage_TypeData) TypeData() { return myTypeData; } 0080 0081 //! Returns the root data section 0082 Handle(StdStorage_RootData) RootData() { return myRootData; } 0083 0084 private: 0085 0086 Handle(StdStorage_HeaderData) myHeaderData; 0087 Handle(StdStorage_TypeData) myTypeData; 0088 Handle(StdStorage_RootData) myRootData; 0089 0090 }; 0091 0092 #endif // _StdStorage_Data_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |