Versions Compared

Key

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

class Geo::GeoFileStream

    └>Geo::IGeoStream
        └>Geo::IGeoInputStream

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

Enums

NameDescription
EStreamFormat

The underlying stream format can be either binary or text.

EStreamMode

An IGeoStream is open in either esmRead or esmWrite mode.

Functions

NameDescription
~GeoFileStream()

close current file, if any

~IGeoInputStream()

Deleting a stream should behave like a close operation.

~IGeoStream()

Deleting a stream should behave like a close operation.

BeginType(TypeId, u32)

Provide information about the typed data written to the stream.

Close()

close current file, if any

EndType(u32)

Provide information about the typed data written to the stream.

GeoFileStream()

create with no attached file

GetPosition()

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

GetPosition()

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

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)

IsEof()

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

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.

IsOk()

Tests if the stream is valid.

IsOk(void)

Tests if the stream is valid.

NonCopyable(NonCopyable &&)

Defaulted to allow move.

Open(const char *, EStreamMode, EStreamFormat)

close current file, if any, and open filename

operator=(NonCopyable &&)

Defaulted to allow move.

Read(T(&))

Read a fixed size array.

Read(TIter, TIter)

Read a collection of objects, returning true on success.

Read(void *, size_t, size_t)

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

Read(T &)

Read a single object, returning true on success.

Read(void *, size_t, size_t)

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

ReadImpl(T &, GeoStd::TrueType)

Read a single object, returning true on success.

ReadImpl(T &, GeoStd::FalseType)

Read a single object, returning true on success.

ReadToEnd()

Reads the stream to its end and returns the data as a char array.

ReadToEnd()

Reads the stream to its end and returns the data as a char array.

SetPosition(u64)

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

SetPosition(u64)

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

SetPosition(Geo::u64)

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

Write(const T(&))

Write a fixed size array.

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.

Write(const void *, size_t, size_t)

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


Anchor
a3e0f1d736f012500afad8a8609dfb0c1
a3e0f1d736f012500afad8a8609dfb0c1

EStreamFormat

...

public: enum EStreamFormat
{
    esfBinary,
    esfText
}

...

The underlying stream format can be either binary or text.

enumerators
esfBinary
esfText


Anchor
aca99519cabcaf23c8e72eaf4c8b512c6
aca99519cabcaf23c8e72eaf4c8b512c6

EStreamMode

...

public: enum EStreamMode
{
    esmWrite,
    esmRead
}

...

An IGeoStream is open in either esmRead or esmWrite mode.

enumerators
esmWrite
esmRead


Anchor
a2e8d1042fffb4c50a24e9c137f477a9d
a2e8d1042fffb4c50a24e9c137f477a9d

Geo::GeoFileStream::~GeoFileStream

...

public: ~GeoFileStream()

...

close current file, if any


Anchor
ae01b40e7a8901409e456597b1c47ae68
ae01b40e7a8901409e456597b1c47ae68

virtual Geo::IGeoInputStream::~IGeoInputStream

...

public: virtual ~IGeoInputStream()

...

Deleting a stream should behave like a close operation.


Anchor
a7b80fec277336d2b47557a18f584fc22
a7b80fec277336d2b47557a18f584fc22

virtual Geo::IGeoStream::~IGeoStream

...

public: virtual ~IGeoStream()

...

Deleting a stream should behave like a close operation.


Anchor
a9896a7876fc70989f72d6bd7f6498c50
a9896a7876fc70989f72d6bd7f6498c50

virtual u32 Geo::IGeoStream::BeginType

...

public: virtual u32 BeginType
(
    TypeId type,
    u32 count
)

...

Provide information about the typed data written to the stream.


Anchor
a78173613458532a703c70809cde81660
a78173613458532a703c70809cde81660

void Geo::GeoFileStream::Close

...

public: void Close()

...

close current file, if any


Anchor
a95285795a88399f8cef771c68d78bf81
a95285795a88399f8cef771c68d78bf81

virtual void Geo::IGeoStream::EndType

...

public: virtual void EndType
(
    u32 index
)

...

Provide information about the typed data written to the stream.


Anchor
af771aec41c54199c869750f3e774a891
af771aec41c54199c869750f3e774a891

Geo::GeoFileStream::GeoFileStream

...

public: GeoFileStream()

...

create with no attached file


Anchor
a9fa5bc545724425bcd4fd79a0e63c598
a9fa5bc545724425bcd4fd79a0e63c598

virtual u64 Geo::GeoFileStream::GetPosition

...

public: virtual u64 GetPosition() const

...

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


Anchor
abb2da2774c474f504e4e483e96437b75
abb2da2774c474f504e4e483e96437b75

virtual Geo::u64 Geo::IGeoInputStream::GetPosition

...

public: Geo::u64 GetPosition() const

...

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


Anchor
a0b27c87c49e46548e24ec7337fb2a00d
a0b27c87c49e46548e24ec7337fb2a00d

virtual u64 Geo::IGeoStream::GetPosition

...

public: u64 GetPosition() const

...

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


Anchor
a1fef5fccfba744b8652feaf97f98b4f9
a1fef5fccfba744b8652feaf97f98b4f9

virtual bool Geo::GeoFileStream::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
a1d5d6429a25d9275e1b77c2390222f73
a1d5d6429a25d9275e1b77c2390222f73

virtual bool Geo::IGeoInputStream::IsEof

...

public: bool IsEof() const

...

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


Anchor
a9f7dc8618a046868907eb5a35f313a30
a9f7dc8618a046868907eb5a35f313a30

virtual bool Geo::IGeoStream::IsEof

...

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

virtual bool Geo::IGeoInputStream::IsOk

...

public: bool IsOk() const

...

Tests if the stream is valid.


Anchor
a2b7274441a0649847a8850974f0c4b30
a2b7274441a0649847a8850974f0c4b30

virtual bool Geo::IGeoStream::IsOk

...

public: bool IsOk() const

...

Tests if the stream is valid.


Anchor
a0fe17282d20d283b7d1cf7c367245690
a0fe17282d20d283b7d1cf7c367245690

virtual bool Geo::GeoFileStream::IsOk

...

public: virtual bool IsOk
(
    void
) const

...

Tests if the stream is valid.


Anchor
adaed81b4c59f263dcb4e78c4126f4683
adaed81b4c59f263dcb4e78c4126f4683

Geo::NonCopyable::NonCopyable

...

public: NonCopyable
(
    NonCopyable &&
)

...

Defaulted to allow move.


Anchor
a80d31d3b78fcedeae6fb166572c96291
a80d31d3b78fcedeae6fb166572c96291

bool Geo::GeoFileStream::Open

...

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

...

close current file, if any, and open filename


Anchor
a6abc781e23b8f4864e0b868806e0acbf
a6abc781e23b8f4864e0b868806e0acbf

NonCopyable& Geo::NonCopyable::operator=

...

public: NonCopyable & operator=
(
    NonCopyable &&
)

...

Defaulted to allow move.


Anchor
a8873e5418d057d093fbdd0c69cc383f2
a8873e5418d057d093fbdd0c69cc383f2

bool Geo::IGeoInputStream::Read

...

public: bool Read
(
    T(&) a
)

...

Read a fixed size array.


Anchor
a7564a03e0ebbee028920a1770ccc5cdd
a7564a03e0ebbee028920a1770ccc5cdd

bool Geo::IGeoInputStream::Read

...

public: bool Read
(
    TIter begin,
    TIter end
)

...

Read a collection of objects, returning true on success.

Object must be considered blittable (see IsBlittable<T>). Note that the storage must have been pre-allocated as it will write directly to the iterators provided. Given that we do not have the STL-style 'back-inserter' classes, for GeoArrays you should use the ReadArray helper function.


Anchor
a2bdc1ec2ed234832370c8e5f1dcc923c
a2bdc1ec2ed234832370c8e5f1dcc923c

virtual size_t Geo::IGeoInputStream::Read

...

public: size_t Read
(
    void * pData,
    size_t size,
    size_t count
)

...

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


Anchor
aa299ffca66c6b0cf5a4cdeedcebf4cf4
aa299ffca66c6b0cf5a4cdeedcebf4cf4

GEO_FORCE_INLINE bool Geo::IGeoInputStream::Read

...

public: GEO_FORCE_INLINE bool Read
(
    T & object
)

...

Read a single object, returning true on success.

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


Anchor
a304b100e8fb300f18485ab8c31ae16d0
a304b100e8fb300f18485ab8c31ae16d0

virtual size_t Geo::GeoFileStream::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
a95aa1b762401c201b68c020cb20a0e34
a95aa1b762401c201b68c020cb20a0e34

bool Geo::IGeoInputStream::ReadImpl

...

public: bool ReadImpl
(
    T & object,
    GeoStd::TrueType
)

...

Read a single object, returning true on success.

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


Anchor
a85890dac322ac71c33ec6049ff351000
a85890dac322ac71c33ec6049ff351000

bool Geo::IGeoInputStream::ReadImpl

...

public: bool ReadImpl
(
    T & object,
    GeoStd::FalseType
)

...

Read a single object, returning true on success.

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


Anchor
ad1748f884ed4358b4b42d8c8fc7b3fb7
ad1748f884ed4358b4b42d8c8fc7b3fb7

virtual Geo::GeoArray<char> Geo::IGeoInputStream::ReadToEnd

...

public: virtual Geo::GeoArray< char > ReadToEnd()

...

Reads the stream to its end and returns the data as a char array.


Anchor
a5d845b3b3cb2f3f6cca6c7905312ef5a
a5d845b3b3cb2f3f6cca6c7905312ef5a

virtual Geo::GeoArray<char> Geo::GeoFileStream::ReadToEnd

...

public: virtual Geo::GeoArray< char > ReadToEnd()

...

Reads the stream to its end and returns the data as a char array.


Anchor
aa575f6a9cf81f0d62e6a90a97398f621
aa575f6a9cf81f0d62e6a90a97398f621

virtual bool Geo::IGeoStream::SetPosition

...

public: bool SetPosition
(
    u64 pos
)

...

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


Anchor
acaa583569b41105d1abf5b610da01e35
acaa583569b41105d1abf5b610da01e35

virtual bool Geo::GeoFileStream::SetPosition

...

public: virtual bool SetPosition
(
    u64 pos
)

...

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


Anchor
aaedb05f09c0b2f105e77388160aa9541
aaedb05f09c0b2f105e77388160aa9541

virtual bool Geo::IGeoInputStream::SetPosition

...

public: bool SetPosition
(
    Geo::u64 pos
)

...

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


Anchor
aa99c0ecdb48edabd6805fb919bd2869e
aa99c0ecdb48edabd6805fb919bd2869e

bool Geo::IGeoStream::Write

...

public: bool Write
(
    const T(&) a
)

...

Write a fixed size array.


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
aa25cf8f181c9e97fefa181efffe2c78e
aa25cf8f181c9e97fefa181efffe2c78e

virtual size_t Geo::IGeoStream::Write

...

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

virtual size_t Geo::GeoFileStream::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.