This is the documentation for Enlighten.
module Serialisation
Classes
Name | Description |
|---|---|
Simple IGeoStream implementation that saves/loads data into/from memory and performs all read/write operations on this copy. | |
Simple IGeoStream implementation that saves/loads data from a file. | |
Simple IGeoStream implementation that saves/loads data to a block of memory. | |
IGeoStream implementation that saves/loads data from a zlib compressed file. | |
An IffReader allows you to use an IGeoStream to read Iff format binary files easily. | |
An IffWriter allows you to use an IGeoStream to create Iff format binary files easily. | |
An IGeoInputStream allows you to read memory/files in a consistent manner, and is an extension point for users wishing to control where data is stored. | |
A class implementing IGeoReleasable is usually created by the Enlighten libraries and so must have Release() called in order to return the memory. | |
A class implementing IGeoSerialisable adds the ability to save and load instances of the type from an IGeoStream. | |
An IGeoStream allows you to read/write memory/files in a consistent manner, and is an extension point for users wishing to control where data is stored. | |
Policy to write pointers as a range with the given element count. | |
Defines an N-byte block of padding which is zeroed on construction. |
Functions
Name | Description |
|---|---|
Closes current file, if open. | |
Checks if the given object has all it's 'padding' fields set to zero. | |
Close current file, if any. | |
Compatibility_ReadWideString(IffReader &, GeoString< char > &, Geo::s32) | Read a type that used to be GeoString<wchar_t>, and is now GeoString<char> |
Compress the input stream with the ZLib library, placing the result in the output stream. | |
Copy the contents of the source IGeoStream (src) to the destination GeoMemoryStream (dst). | |
Create with no attached file. | |
Return the filename with which this stream was opened (not available if created with FILE*) | |
Return the position of the read/write pointer within the stream (prototype matches ftell) | |
Is the read/write pointer at the end of the file (as with feof, only returns true if you have read past end) | |
Tests if the stream is valid. | |
Load a Precompute interface from disk, using the given filename. | |
Load an Interface object from a stream. Interface must have same functional API as an IGeoSerialisable. | |
Load an IGeoSerialisable interface from disk, using the given compressed or uncompressed file. | |
MakeFileStream(const char *, IGeoStream::EStreamMode, GeoFileStream::EStreamFormat) | Factory method to create appropriate file stream like object. |
Close current file, if any, and open filename. | |
Read data (prototype matches fread). Prefer to use the templated Read methods. | |
Helper function to read a GeoArray from an IGeoInputStream, with all memory issues monitored and errors reported to GeoPrintf. | |
Helper function to read a GeoMap from an IGeoInputStream, with all memory issues monitored and errors reported to GeoPrintf. | |
ReadObject adapter for ReadArray. | |
default implementation of overloadable reader function | |
Ensure that boolean values are read/written 'efficiently' and portably. | |
Save an IGeoSerialisable interface to disk, using the given filename. | |
SaveInterfaceCompressed(const Interface *, const char *, Geo::u32) | Save an IGeoSerialisable interface to disk in compressed format, using the given filename. |
SaveInterfaceIfChanged(const Interface *, const char *, Geo::u32) | Save an IGeoSerialisable interface to disk, using the given filename. |
Set the position of the read/write pointer within the stream (prototype matches fseek) | |
Uncompress a stream created by the CompressStream function above into a new stream. | |
Write a collection of objects, in range [begin, end) as STL-style classes support. | |
Write data (prototype matches fwrite). Prefer to use the templated Write methods. | |
Write a single object, returning true on success. | |
Helper function to write a GeoArray to an IGeoStream. Deals with arrays of values. | |
Helper function to write a GeoImmutableArray to an IGeoStream. Deals with arrays of values. | |
Helper function to write a GeoArray to an IGeoStream. | |
Write an array to the stream. | |
Save a GeoMemoryStream to disk, modifying the file only if the contents change (or the file didn't exist). | |
Helper function to write a GeoMap to an IGeoStream. | |
WriteObject adapter for WriteArray. | |
WriteObject(IGeoStream &, const Geo::GeoImmutableArray< T > &) | WriteObject adapter for WriteArray. |
Write a blittable range object to the stream. | |
Ensure that boolean values are read/written 'efficiently' and portably. | |
Write a GeoPair that is not blittable because it contains padding. | |
default implementation of overloadable writer function | |
WriteProperty(Geo::IGeoStream &, const char *, const T &, bool) | Write a blittable property. |
Write a range property to the stream. | |
Write a range property to the stream. | |
Write a blittable range object to the stream. | |
WriteRangeImpl(Writer &, const T *, const T *, GeoStd::FalseType) | Write a non-blittable range to the stream. |
Geo::GeoZLibFileStream::~GeoZLibFileStream
public: ~GeoZLibFileStream()
Closes current file, if open.
GEO_FORCE_INLINE void Geo::CheckPaddingZeroed
public: GEO_FORCE_INLINE void CheckPaddingZeroed
(
const T & object
)
Checks if the given object has all it's 'padding' fields set to zero.
Padding fields are identified by their name.
bool Geo::GeoZLibFileStream::Close
public: bool Close()
Close current file, if any.
bool Geo::Compatibility_ReadWideString
public: bool Compatibility_ReadWideString
(
IffReader & reader,
GeoString< char > & object,
Geo::s32 lastWideVersion
)
Read a type that used to be GeoString<wchar_t>, and is now GeoString<char>
bool GEO_CALL Geo::CompressStream
public: bool GEO_CALL CompressStream
(
GeoMemoryStream & input,
GeoMemoryStream & output
)
Compress the input stream with the ZLib library, placing the result in the output stream.
bool GEO_CALL Geo::CopyStreamToStream
public: bool GEO_CALL CopyStreamToStream
(
IGeoStream & src,
GeoMemoryStream & dst
)
Copy the contents of the source IGeoStream (src) to the destination GeoMemoryStream (dst).
Geo::GeoZLibFileStream::GeoZLibFileStream
public: GeoZLibFileStream()
Create with no attached file.
const char * Geo::GeoZLibFileStream::GetFilename
public: const char * GetFilename() const
Return the filename with which this stream was opened (not available if created with FILE*)
u64 Geo::GeoZLibFileStream::GetPosition
public: virtual u64 GetPosition() const
Return the position of the read/write pointer within the stream (prototype matches ftell)
bool Geo::GeoZLibFileStream::IsEof
public: virtual bool IsEof() const
Is the read/write pointer at the end of the file (as with feof, only returns true if you have read past end)
bool Geo::GeoZLibFileStream::IsOk
public: virtual bool IsOk() const
Tests if the stream is valid.
Interface* Geo::LoadInterface
public: Interface * LoadInterface
(
const char * filename,
u32 section,
bool warnError
)
Load a Precompute interface from disk, using the given filename.
Interface* Geo::LoadInterface
public: Interface * LoadInterface
(
IGeoInputStream & stream,
u32 section
)
Load an Interface object from a stream. Interface must have same functional API as an IGeoSerialisable.
Interface * Geo::LoadInterfaceCompressed
public: Interface * LoadInterfaceCompressed
(
const char * filename,
u32 section,
bool warnError
)
Load an IGeoSerialisable interface from disk, using the given compressed or uncompressed file.
IGeoStream* Geo::MakeFileStream
public: IGeoStream * MakeFileStream
(
const char * filename,
IGeoStream::EStreamMode mode,
GeoFileStream::EStreamFormat format
)
Factory method to create appropriate file stream like object.
bool Geo::GeoZLibFileStream::Open
public: bool Open
(
char const * filename,
EStreamMode mode
)
Close current file, if any, and open filename.
size_t Geo::GeoZLibFileStream::Read
public: virtual size_t Read
(
void * pData,
size_t size,
size_t count
)
Read data (prototype matches fread). Prefer to use the templated Read methods.
bool Geo::ReadArray
public: bool ReadArray
(
IGeoInputStream & reader,
GeoArray< T > & objects
)
Helper function to read a GeoArray from an IGeoInputStream, with all memory issues monitored and errors reported to GeoPrintf.
Deals with arrays of values, the contained type must be considered blittable (see IsBlittable<T>).
bool Geo::ReadMap
public: bool ReadMap
(
IGeoInputStream & reader,
GeoMap< K, T > & map
)
Helper function to read a GeoMap from an IGeoInputStream, with all memory issues monitored and errors reported to GeoPrintf.
Deals with arrays of values, the contained type must be considered blittable (see IsBlittable<T>).
void Geo::ReadObject
public: void ReadObject
(
IGeoInputStream & reader,
Geo::GeoArray< T > & objects
)
ReadObject adapter for ReadArray.
void Geo::ReadObject
public: void ReadObject
(
Reader & ,
T &
)
default implementation of overloadable reader function
void Geo::ReadObject
public: void ReadObject
(
IGeoInputStream & stream,
bool & object
)
Ensure that boolean values are read/written 'efficiently' and portably.
bool Geo::SaveInterface
public: bool SaveInterface
(
const Interface * pInterface,
const char * filename,
Geo::u32 section
)
Save an IGeoSerialisable interface to disk, using the given filename.
bool Geo::SaveInterfaceCompressed
public: bool SaveInterfaceCompressed
(
const Interface * pInterface,
const char * filename,
Geo::u32 section
)
Save an IGeoSerialisable interface to disk in compressed format, using the given filename.