Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Classes

NameDescription
Geo::GeoBufferedFileStream

Simple IGeoStream implementation that saves/loads data into/from memory and performs all read/write operations on this copy.

Geo::GeoFileStream

Simple IGeoStream implementation that saves/loads data from a file.

Geo::GeoMemoryStream

Simple IGeoStream implementation that saves/loads data to a block of memory.

Geo::GeoZLibFileStream

IGeoStream implementation that saves/loads data from a zlib compressed file.

Geo::IffReader

An IffReader allows you to use an IGeoStream to read Iff format binary files easily.

Geo::IffWriter

An IffWriter allows you to use an IGeoStream to create Iff format binary files easily.

Geo::IGeoInputStream

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.

Geo::IGeoReleasable

A class implementing IGeoReleasable is usually created by the Enlighten libraries and so must have Release() called in order to return the memory.

Geo::IGeoSerialisable

A class implementing IGeoSerialisable adds the ability to save and load instances of the type from an IGeoStream.

Geo::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.

Geo::WriteRangePolicy

Policy to write pointers as a range with the given element count.

Geo::ZeroedPadding

Defines an N-byte block of padding which is zeroed on construction.

Functions

NameDescription
~GeoZLibFileStream()

Closes current file, if open.

CheckPaddingZeroed(const T &)

Checks if the given object has all it's 'padding' fields set to zero.

Close()

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>

CompressStream(GeoMemoryStream &, GeoMemoryStream &)

Compress the input stream with the ZLib library, placing the result in the output stream.

CopyStreamToStream(IGeoStream &, GeoMemoryStream &)

Copy the contents of the source IGeoStream (src) to the destination GeoMemoryStream (dst).

GeoZLibFileStream()

Create with no attached file.

GetFilename()

Return the filename with which this stream was opened (not available if created with FILE*)

GetPosition()

Return the position of the read/write pointer within the stream (prototype matches ftell)

IsEof()

Is the read/write pointer at the end of the file (as with feof, only returns true if you have read past end)

IsOk()

Tests if the stream is valid.

LoadInterface(const char *, u32, bool)

Load a Precompute interface from disk, using the given filename.

LoadInterface(IGeoInputStream &, u32)

Load an Interface object from a stream. Interface must have same functional API as an IGeoSerialisable.

LoadInterfaceCompressed(const char *, u32, bool)

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.

Open(char const *, EStreamMode)

Close current file, if any, and open filename.

Read(void *, size_t, size_t)

Read data (prototype matches fread). Prefer to use the templated Read methods.

ReadArray(IGeoInputStream &, GeoArray< T > &)

Helper function to read a GeoArray from an IGeoInputStream, with all memory issues monitored and errors reported to GeoPrintf.

ReadMap(IGeoInputStream &, GeoMap< K, T > &)

Helper function to read a GeoMap from an IGeoInputStream, with all memory issues monitored and errors reported to GeoPrintf.

ReadObject(IGeoInputStream &, Geo::GeoArray< T > &)

ReadObject adapter for ReadArray.

ReadObject(Reader &, T &)

default implementation of overloadable reader function

ReadObject(IGeoInputStream &, bool &)

Ensure that boolean values are read/written 'efficiently' and portably.

SaveInterface(const Interface *, const char *, Geo::u32)

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.

SetPosition(u64)

Set the position of the read/write pointer within the stream (prototype matches fseek)

UncompressStream(GeoMemoryStream &, GeoMemoryStream &)

Uncompress a stream created by the CompressStream function above into a new stream.

Write(TIter, TIter)

Write a collection of objects, in range [begin, end) as STL-style classes support.

Write(const void *, size_t, size_t)

Write data (prototype matches fwrite). Prefer to use the templated Write methods.

Write(const T &)

Write a single object, returning true on success.

WriteArray(IGeoStream &, const GeoArray< T > &)

Helper function to write a GeoArray to an IGeoStream. Deals with arrays of values.

WriteArray(IGeoStream &, const GeoImmutableArray< T > &)

Helper function to write a GeoImmutableArray to an IGeoStream. Deals with arrays of values.

WriteArray(IGeoStream &, const GeoArray< T * > &)

Helper function to write a GeoArray to an IGeoStream.

WriteArrayImpl(Writer &, const T *, const T *)

Write an array to the stream.

WriteFileIfChanged(GeoMemoryStream &, const char *)

Save a GeoMemoryStream to disk, modifying the file only if the contents change (or the file didn't exist).

WriteMap(IGeoStream &, const GeoMap< K, T > &)

Helper function to write a GeoMap to an IGeoStream.

WriteObject(IGeoStream &, const Geo::GeoArray< T > &)

WriteObject adapter for WriteArray.

WriteObject(IGeoStream &, const Geo::GeoImmutableArray< T > &)

WriteObject adapter for WriteArray.

WriteObject(IGeoStream &, ArrayRange< T >)

Write a blittable range object to the stream.

WriteObject(IGeoStream &, bool const &)

Ensure that boolean values are read/written 'efficiently' and portably.

WriteObject(IGeoStream &, const Geo::GeoPair< T1, T2 > &)

Write a GeoPair that is not blittable because it contains padding.

WriteObject(Writer &, const T &)

default implementation of overloadable writer function

WriteProperty(Geo::IGeoStream &, const char *, const T &, bool)

Write a blittable property.

WriteProperty(IGeoStream &, const char *, ArrayRange< T >)

Write a range property to the stream.

WriteRange(IGeoStream &, Iterator, Iterator)

Write a range property to the stream.

WriteRange(IGeoStream &, ArrayRange< T >)

Write a blittable range object to the stream.

WriteRangeImpl(Writer &, const T *, const T *, GeoStd::FalseType)

Write a non-blittable range to the stream.


Anchor
ad55b5b716e1b628063fae2a9d77a3bfa
ad55b5b716e1b628063fae2a9d77a3bfa

Geo::GeoZLibFileStream::~GeoZLibFileStream

...

public: ~GeoZLibFileStream()

...

Closes current file, if open.


Anchor
a76741642dc12471d6cf64d1f7bcdcf23
a76741642dc12471d6cf64d1f7bcdcf23

void Geo::CheckPaddingZeroed

...

public: 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.


Anchor
a7e9db952b2da35f56d940d2a0c16433d
a7e9db952b2da35f56d940d2a0c16433d

bool Geo::GeoZLibFileStream::Close

...

public: bool Close()

...

Close current file, if any.


Anchor
afe618eb1954d186e174b8869b2fe7a26
afe618eb1954d186e174b8869b2fe7a26

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>


Anchor
a93bef05f4aa1b52f9b09275affc5f9b2
a93bef05f4aa1b52f9b09275affc5f9b2

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.


Anchor
a846ac56cb60d5c80e63db7b743b8978a
a846ac56cb60d5c80e63db7b743b8978a

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).


Anchor
a3c73307acaf892962f48e65babd25e53
a3c73307acaf892962f48e65babd25e53

Geo::GeoZLibFileStream::GeoZLibFileStream

...

public: GeoZLibFileStream()

...

Create with no attached file.


Anchor
a3cdfa2be30bfebdadba576d0e2200e76
a3cdfa2be30bfebdadba576d0e2200e76

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*)


Anchor
aba520b28dfa02dc104c8c38a7a6a2199
aba520b28dfa02dc104c8c38a7a6a2199

u64 Geo::GeoZLibFileStream::GetPosition

...

public: virtual u64 GetPosition() const

...

Return the position of the read/write pointer within the stream (prototype matches ftell)


Anchor
a50c3955702514099fa0ad5ffdf26cb2c
a50c3955702514099fa0ad5ffdf26cb2c

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)


Anchor
a5ab48157e027726b4bdbb1897f74741b
a5ab48157e027726b4bdbb1897f74741b

bool Geo::GeoZLibFileStream::IsOk

...

public: virtual bool IsOk() const

...

Tests if the stream is valid.


Anchor
a1d6805a3f9eb2205e6cfd579d87b17ca
a1d6805a3f9eb2205e6cfd579d87b17ca

Interface* Geo::LoadInterface

...

public: Interface * LoadInterface
(
    const char * filename,
    u32 section,
    bool warnError
)

...

Load a Precompute interface from disk, using the given filename.


Anchor
a94c0ec25716ccd9652c8c05a2e3fcd55
a94c0ec25716ccd9652c8c05a2e3fcd55

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.


Anchor
a234896a40d27c0153cca20c84081d501
a234896a40d27c0153cca20c84081d501

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.


Anchor
a1cbb6c9d5f5819f4c4eb52818bd9e3e3
a1cbb6c9d5f5819f4c4eb52818bd9e3e3

IGeoStream* Geo::MakeFileStream

...

public: IGeoStream * MakeFileStream
(
    const char * filename,
    IGeoStream::EStreamMode mode,
    GeoFileStream::EStreamFormat format
)

...

Factory method to create appropriate file stream like object.


Anchor
a223cd8413614ab6c30774b47c6b085bc
a223cd8413614ab6c30774b47c6b085bc

bool Geo::GeoZLibFileStream::Open

...

public: bool Open
(
    char const * filename,
    EStreamMode mode
)

...

Close current file, if any, and open filename.


Anchor
a0b08a3cd65b5304433fe2bfdb21b82cf
a0b08a3cd65b5304433fe2bfdb21b82cf

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.


Anchor
a843c1e2a141bb75731623430537c5af5
a843c1e2a141bb75731623430537c5af5

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>).


Anchor
ace555049ea4fba8282297de1f519dca3
ace555049ea4fba8282297de1f519dca3

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>).


Anchor
a88958a12bb6b5e0c6a619c6d46fe7ad3
a88958a12bb6b5e0c6a619c6d46fe7ad3

void Geo::ReadObject

...

public: void ReadObject
(
    IGeoInputStream & reader,
    Geo::GeoArray< T > & objects
)

...

ReadObject adapter for ReadArray.


Anchor
a3e3648bfa88268ed92e8f0d28a68bba4
a3e3648bfa88268ed92e8f0d28a68bba4

void Geo::ReadObject

...

public: void ReadObject
(
    Reader & ,
    T &
)

...

default implementation of overloadable reader function


Anchor
abdf3e92086f01b081828ae632a143a05
abdf3e92086f01b081828ae632a143a05

void Geo::ReadObject

...

public: void ReadObject
(
    IGeoInputStream & stream,
    bool & object
)

...

Ensure that boolean values are read/written 'efficiently' and portably.


Anchor
a1fd9ee1885e32c325f1ce86eb57d6788
a1fd9ee1885e32c325f1ce86eb57d6788

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.


Anchor
a3d69eed207e06eca4cfa84d4f42d821c
a3d69eed207e06eca4cfa84d4f42d821c

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.


Anchor
a023c88968244539d86eec959e49c6f23
a023c88968244539d86eec959e49c6f23

bool Geo::SaveInterfaceIfChanged

...

public: bool SaveInterfaceIfChanged
(
    const Interface * pInterface,
    const char * filename,
    Geo::u32 section
)

...

Save an IGeoSerialisable interface to disk, using the given filename.


Anchor
a4e651e5d87c4a6955bbfacdf8271aea5
a4e651e5d87c4a6955bbfacdf8271aea5

bool Geo::GeoZLibFileStream::SetPosition

...

public: virtual bool SetPosition
(
    u64 pos
)

...

Set the position of the read/write pointer within the stream (prototype matches fseek)


Anchor
a39bc845fc8bc862358e0647b8795895a
a39bc845fc8bc862358e0647b8795895a

bool GEO_CALL Geo::UncompressStream

...

public: bool GEO_CALL UncompressStream
(
    GeoMemoryStream & input,
    GeoMemoryStream & output
)

...

Uncompress a stream created by the CompressStream function above into a new stream.


Anchor
a0424d7821babe67cfda6f9e80660973a
a0424d7821babe67cfda6f9e80660973a

bool Geo::IGeoStream::Write

...

public: bool Write
(
    TIter begin,
    TIter end
)

...

Write a collection of objects, in range [begin, end) as STL-style classes support.

Objects have same requirements single object Write (see IsBlittable<T>).


Anchor
a6a8238b94608b6df8d1f39994359829a
a6a8238b94608b6df8d1f39994359829a

size_t Geo::GeoZLibFileStream::Write

...

public: virtual size_t Write
(
    const void * pData,
    size_t size,
    size_t count
)

...

Write data (prototype matches fwrite). Prefer to use the templated Write methods.


Anchor
a6187ed152803683bfaa674529e24c14d
a6187ed152803683bfaa674529e24c14d

GEO_FORCE_INLINE bool Geo::IGeoStream::Write

...

public: GEO_FORCE_INLINE bool Write
(
    const T & object
)

...

Write a single object, returning true on success.

There must either be a WriteObject overload for T, or T must be blittable (see IsBlittable<T>).


Anchor
a33372a8161daadf02214410d1d54c383
a33372a8161daadf02214410d1d54c383

bool Geo::WriteArray

...

public: bool WriteArray
(
    IGeoStream & writer,
    const GeoArray< T > & objects
)

...

Helper function to write a GeoArray to an IGeoStream. Deals with arrays of values.


Anchor
a10175a6589eada5ee5ea8cbbba9311cd
a10175a6589eada5ee5ea8cbbba9311cd

bool Geo::WriteArray

...

public: bool WriteArray
(
    IGeoStream & writer,
    const GeoImmutableArray< T > & objects
)

...

Helper function to write a GeoImmutableArray to an IGeoStream. Deals with arrays of values.


Anchor
a5bf5c4866d4a4135411aeee3ff23e249
a5bf5c4866d4a4135411aeee3ff23e249

bool Geo::WriteArray

...

public: bool WriteArray
(
    IGeoStream & writer,
    const GeoArray< T * > & objects
)

...

Helper function to write a GeoArray to an IGeoStream.

Deals with arrays of pointers, the storage type must implement IGeoSerialisable (or at least have same function prototype)


Anchor
ab8323034678f2be9447c2e2ec79fa03f
ab8323034678f2be9447c2e2ec79fa03f

bool Geo::WriteArrayImpl

...

public: bool WriteArrayImpl
(
    Writer & writer,
    const T * first,
    const T * last
)

...

Write an array to the stream.


Anchor
aee07fa4bfef5972bba1d01171c0c4a7e
aee07fa4bfef5972bba1d01171c0c4a7e

bool GEO_CALL Geo::WriteFileIfChanged

...

public: bool GEO_CALL WriteFileIfChanged
(
    GeoMemoryStream & ms,
    const char * filename
)

...

Save a GeoMemoryStream to disk, modifying the file only if the contents change (or the file didn't exist).


Anchor
a6bcb806fa105ffe9c2aabcd3911e70e2
a6bcb806fa105ffe9c2aabcd3911e70e2

bool Geo::WriteMap

...

public: bool WriteMap
(
    IGeoStream & writer,
    const GeoMap< K, T > & map
)

...

Helper function to write a GeoMap to an IGeoStream.

Deals with arrays of values, the contained type must be considered blittable (see IsBlittable<T>).


Anchor
a71e10c6ed0a80c4532ede47d213523ef
a71e10c6ed0a80c4532ede47d213523ef

void Geo::WriteObject

...

public: void WriteObject
(
    IGeoStream & writer,
    const Geo::GeoArray< T > & objects
)

...

WriteObject adapter for WriteArray.


Anchor
aad757b3f3e7afd1c440a9113036a4a78
aad757b3f3e7afd1c440a9113036a4a78

void Geo::WriteObject

...

public: void WriteObject
(
    IGeoStream & writer,
    const Geo::GeoImmutableArray< T > & objects
)

...

WriteObject adapter for WriteArray.


Anchor
ac1fbd1520485548f3a742daa3558f466
ac1fbd1520485548f3a742daa3558f466

void Geo::WriteObject

...

public: void WriteObject
(
    IGeoStream & stream,
    ArrayRange< T > range
)

...

Write a blittable range object to the stream.


Anchor
a2bf77a691067332bf35a71a92d56eb19
a2bf77a691067332bf35a71a92d56eb19

void Geo::WriteObject

...

public: void WriteObject
(
    IGeoStream & stream,
    bool const & object
)

...

Ensure that boolean values are read/written 'efficiently' and portably.


Anchor
ab552a8d2fd23df1ba7cbf9267c86682a
ab552a8d2fd23df1ba7cbf9267c86682a

void Geo::WriteObject

...

public: void WriteObject
(
    IGeoStream & stream,
    const Geo::GeoPair< T1, T2 > & p
)

...

Write a GeoPair that is not blittable because it contains padding.


Anchor
ad06a5a7a02030878f601a926474c0588
ad06a5a7a02030878f601a926474c0588

void Geo::WriteObject

...

public: void WriteObject
(
    Writer & ,
    const T &
)

...

default implementation of overloadable writer function


Anchor
aac019df7a286fe61754b9d8c98855690
aac019df7a286fe61754b9d8c98855690

void Geo::WriteProperty

...

public: void WriteProperty
(
    Geo::IGeoStream & stream,
    const char * name,
    const T & value,
    bool isFlaky
)

...

Write a blittable property.


Anchor
a57e40a3a8f4fe041f184b2edf59a7f53
a57e40a3a8f4fe041f184b2edf59a7f53

void Geo::WriteProperty

...

public: void WriteProperty
(
    IGeoStream & stream,
    const char * name,
    ArrayRange< T > range
)

...

Write a range property to the stream.


Anchor
a7f12015c2f50744506a2176f2af24fc5
a7f12015c2f50744506a2176f2af24fc5

void Geo::WriteRange

...

public: void WriteRange
(
    IGeoStream & stream,
    Iterator first,
    Iterator last
)

...

Write a range property to the stream.


Anchor
ade504af0a93fcba114d9eac767a321d5
ade504af0a93fcba114d9eac767a321d5

void Geo::WriteRange

...

public: void WriteRange
(
    IGeoStream & stream,
    ArrayRange< T > range
)

...

Write a blittable range object to the stream.


Anchor
a4e09f4e984fd4e1900e4ac3704db6063
a4e09f4e984fd4e1900e4ac3704db6063

bool Geo::WriteRangeImpl

...

public: bool WriteRangeImpl
(
    Writer & writer,
    const T * first,
    const T * last,
    GeoStd::FalseType isBlittable
)

...

Write a non-blittable range to the stream.

Write a blittable range to the stream.