/usr/include/oce/Storage_Schema.hxx is in liboce-foundation-dev 0.18.2-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | // This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _Storage_Schema_HeaderFile
#define _Storage_Schema_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineHandle.hxx>
#include <Handle_Storage_Schema.hxx>
#include <Storage_MapOfCallBack.hxx>
#include <Standard_Boolean.hxx>
#include <Handle_Storage_CallBack.hxx>
#include <TCollection_AsciiString.hxx>
#include <Handle_Storage_HArrayOfSchema.hxx>
#include <MMgt_TShared.hxx>
#include <Handle_Storage_Data.hxx>
#include <Handle_Storage_HeaderData.hxx>
#include <Handle_Storage_TypeData.hxx>
#include <Handle_Storage_RootData.hxx>
#include <Handle_TColStd_HSequenceOfAsciiString.hxx>
#include <Handle_Standard_Persistent.hxx>
#include <Storage_SolveMode.hxx>
#include <Standard_CString.hxx>
class Storage_CallBack;
class Storage_HArrayOfSchema;
class Storage_StreamFormatError;
class TCollection_AsciiString;
class Storage_BaseDriver;
class Storage_Data;
class Storage_HeaderData;
class Storage_TypeData;
class Storage_RootData;
class TColStd_SequenceOfAsciiString;
class TColStd_HSequenceOfAsciiString;
class Standard_Persistent;
//! Root class for basic storage/retrieval algorithms.
//! A Storage_Schema object processes:
//! - writing of a set of persistent data into a
//! container (store mechanism),
//! - reading of a container to extract all the
//! contained persistent data (retrieve mechanism).
//! A Storage_Schema object is based on the data
//! schema for the persistent data of the application, i.e.:
//! - the list of all persistent objects which may be
//! known by the application,
//! - the organization of their data; a data schema
//! knows how to browse each persistent object it contains.
//! During the store or retrieve operation, only
//! persistent objects known from the data schema
//! can be processed; they are then stored or
//! retrieved according to their description in the schema.
//! A data schema is specific to the object classes to
//! be read or written. Tools dedicated to the
//! environment in use allow a description of the
//! application persistent data structure.
//! Storage_Schema algorithms are called basic
//! because they do not support external references
//! between containers.
class Storage_Schema : public MMgt_TShared
{
public:
//! Builds a storage/retrieval algorithm based on a
//! given data schema.
//! Example
//! For example, if ShapeSchema is the class
//! inheriting from Storage_Schema and containing
//! the description of your application data schema,
//! you create a storage/retrieval algorithm as follows:
//! Handle(ShapeSchema) s = new
//! ShapeSchema;
//! -------- --
//! USER API -- --------------------------------------------------------------
//! -------- --
Standard_EXPORT Storage_Schema();
//! returns version of the schema
Standard_EXPORT void SetVersion (const TCollection_AsciiString& aVersion) ;
//! returns the version of the schema
Standard_EXPORT TCollection_AsciiString Version() const;
//! set the schema's name
Standard_EXPORT void SetName (const TCollection_AsciiString& aSchemaName) ;
//! returns the schema's name
Standard_EXPORT TCollection_AsciiString Name() const;
//! Writes the data aggregated in aData into the
//! container defined by the driver s. The storage
//! operation is performed according to the data
//! schema with which this algorithm is working.
//! Note: aData may aggregate several root objects
//! to be stored together.
Standard_EXPORT void Write (Storage_BaseDriver& s, const Handle(Storage_Data)& aData) const;
//! Returns the data read from the container defined
//! by the driver s. The retrieval operation is
//! performed according to the data schema with
//! which this algorithm is working.
//! These data are aggregated in a Storage_Data
//! object which may be browsed in order to extract
//! the root objects from the container.
Standard_EXPORT Handle(Storage_Data) Read (Storage_BaseDriver& s) const;
//! read the header part of the stream
//! Arguments:
//! s: driver to read
Standard_EXPORT Handle(Storage_HeaderData) ReadHeaderSection (Storage_BaseDriver& s) const;
//! fill the TypeData with the names of the type used
//! in a stream
//! Arguments:
//! s: driver to read
Standard_EXPORT Handle(Storage_TypeData) ReadTypeSection (Storage_BaseDriver& s) const;
//! read root part of the file
//! Arguments:
//! s: driver to read
Standard_EXPORT Handle(Storage_RootData) ReadRootSection (Storage_BaseDriver& s) const;
//! returns the known types of a schema
Standard_EXPORT virtual const TColStd_SequenceOfAsciiString& SchemaKnownTypes() const;
//! indicates whether the are types in the driver
//! which are not known from the schema and for which
//! no callbacks have been set. The unknown types can
//! be read in <theUnknownTypes>.
Standard_EXPORT Standard_Boolean HasUnknownType (Storage_BaseDriver& aDriver, TColStd_SequenceOfAsciiString& theUnknownTypes) const;
//! returns the all known types of a schema and their
//! nested schemes.
Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) GetAllSchemaKnownTypes() const;
Standard_EXPORT void SetNestedSchemas (const Handle(Storage_HArrayOfSchema)& theSchemas) ;
Standard_EXPORT void ClearNestedSchemas() ;
Standard_EXPORT Handle(Storage_HArrayOfSchema) NestedSchemas() const;
//! return a current date string
Standard_EXPORT static TCollection_AsciiString ICreationDate() ;
//! returns True if theType migration is identified
//! the callback support provides a way to read a file
//! with a incomplete schema.
//! ex. : A file contains 3 types a,b and c.
//! The application's schema contains only 2
//! type a and b. If you try to read the file in
//! the application, you will have an error.To
//! bypass this problem you can give to your
//! application's schema a callback used when
//! the schema dosent know how to handle this
//! type.
Standard_EXPORT static Standard_Boolean CheckTypeMigration (const TCollection_AsciiString& theTypeName, TCollection_AsciiString& theNewName) ;
//! add two functions to the callback list
Standard_EXPORT void AddReadUnknownTypeCallBack (const TCollection_AsciiString& aTypeName, const Handle(Storage_CallBack)& aCallBack) ;
//! remove a callback for a type
Standard_EXPORT void RemoveReadUnknownTypeCallBack (const TCollection_AsciiString& aTypeName) ;
//! returns a list of type name with installed
//! callback.
Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) InstalledCallBackList() const;
//! clear all callback from schema instance.
Standard_EXPORT void ClearCallBackList() ;
//! install a callback for all unknown type. the
//! objects with unknown types will be skipped. (look
//! SkipObject method in BaseDriver)
Standard_EXPORT void UseDefaultCallBack() ;
//! tells schema to uninstall the default callback.
Standard_EXPORT void DontUseDefaultCallBack() ;
//! ask if the schema is using the default callback.
Standard_EXPORT Standard_Boolean IsUsingDefaultCallBack() const;
//! overload the default function for build.(use to
//! set an error message or skip an object while
//! reading an unknown type).
Standard_EXPORT void SetDefaultCallBack (const Handle(Storage_CallBack)& f) ;
//! reset the default function defined by Storage
//! package.
Standard_EXPORT void ResetDefaultCallBack() ;
//! returns the read function used when the
//! UseDefaultCallBack() is set.
Standard_EXPORT Handle(Storage_CallBack) DefaultCallBack() const;
Standard_EXPORT virtual Handle(Storage_CallBack) CallBackSelection (const TCollection_AsciiString& tName) const;
Standard_EXPORT virtual Handle(Storage_CallBack) AddTypeSelection (const Handle(Standard_Persistent)& sp) const;
void WritePersistentObjectHeader (const Handle(Standard_Persistent)& sp, Storage_BaseDriver& s) ;
void ReadPersistentObjectHeader (Storage_BaseDriver& s) ;
void WritePersistentReference (const Handle(Standard_Persistent)& sp, Storage_BaseDriver& s) ;
Standard_EXPORT void ReadPersistentReference (Handle(Standard_Persistent)& sp, Storage_BaseDriver& s) ;
Standard_EXPORT Standard_Boolean AddPersistent (const Handle(Standard_Persistent)& sp, const Standard_CString tName) const;
Standard_EXPORT Standard_Boolean PersistentToAdd (const Handle(Standard_Persistent)& sp) const;
DEFINE_STANDARD_RTTI(Storage_Schema)
protected:
Standard_EXPORT Standard_Boolean IsNested() const;
Standard_EXPORT Handle(Storage_CallBack) ResolveUnknownType (const TCollection_AsciiString& aTypeName, const Handle(Standard_Persistent)& aPers, const Storage_SolveMode aMode) const;
Standard_Boolean HasTypeBinding (const TCollection_AsciiString& aTypeName) const;
Standard_EXPORT void BindType (const TCollection_AsciiString& aTypeName, const Handle(Storage_CallBack)& aCallBack) const;
Standard_EXPORT Handle(Storage_CallBack) TypeBinding (const TCollection_AsciiString& aTypeName) const;
private:
Standard_EXPORT Standard_Boolean SetNested() ;
Standard_EXPORT Standard_Boolean UnsetNested() ;
Standard_EXPORT void Clear() const;
Standard_EXPORT Standard_Boolean IReadHeaderSection (Storage_BaseDriver& s, const Handle(Storage_HeaderData)& iData) const;
Standard_EXPORT Standard_Boolean IReadTypeSection (Storage_BaseDriver& s, const Handle(Storage_TypeData)& tData) const;
Standard_EXPORT Standard_Boolean IReadRootSection (Storage_BaseDriver& s, const Handle(Storage_RootData)& rData) const;
Standard_EXPORT static void ISetCurrentData (const Handle(Storage_Data)& dData) ;
Standard_EXPORT static Handle(Storage_Data)& ICurrentData() ;
Storage_MapOfCallBack myCallBack;
Standard_Boolean myCallBackState;
Handle(Storage_CallBack) myDefaultCallBack;
TCollection_AsciiString myName;
TCollection_AsciiString myVersion;
Handle(Storage_HArrayOfSchema) myArrayOfSchema;
Standard_Boolean myNestedState;
};
#include <Storage_Schema.lxx>
#endif // _Storage_Schema_HeaderFile
|