|
|
|||
File indexing completed on 2026-05-21 08:29:19
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 : public Standard_Transient 0054 { 0055 0056 public: 0057 //! Creates an empty set of data. 0058 //! You explicitly create a StdStorage_Data object 0059 //! when preparing the set of objects to be stored 0060 //! together in a container (for example, in a file). 0061 //! Then use the function StdStorage_RootData's AddRoot 0062 //! to add persistent objects to the set of data. 0063 //! A StdStorage_Data object is also returned by the 0064 //! Read function of a StdStorage algorithm. Use the 0065 //! StdStorage_RootData's functions NumberOfRoots and 0066 //! Roots to find the roots which were stored in the 0067 //! read container. 0068 Standard_EXPORT StdStorage_Data(); 0069 0070 //! Makes the container empty 0071 Standard_EXPORT void Clear(); 0072 0073 //! Returns the header data section 0074 Handle(StdStorage_HeaderData) HeaderData() { return myHeaderData; } 0075 0076 //! Returns the type data section 0077 Handle(StdStorage_TypeData) TypeData() { return myTypeData; } 0078 0079 //! Returns the root data section 0080 Handle(StdStorage_RootData) RootData() { return myRootData; } 0081 0082 private: 0083 Handle(StdStorage_HeaderData) myHeaderData; 0084 Handle(StdStorage_TypeData) myTypeData; 0085 Handle(StdStorage_RootData) myRootData; 0086 }; 0087 0088 #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 |
|