Dali 3D User Interface Engine
List of all members | Public Member Functions | Private Attributes
Dali::Internal::InputArchive Class Reference

Archive specialization. More...

#include <archive.h>

Inheritance diagram for Dali::Internal::InputArchive:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::InputArchive:
Collaboration graph
[legend]

Public Member Functions

 InputArchive (std::streambuf &buf, const unsigned int version)
 
virtual ~InputArchive ()
 
virtual bool Read (char *data, const unsigned int length)
 Read a bytestream from the archive. More...
 
virtual bool OpenChunk (const unsigned int tag)
 Open a new chunk. More...
 
virtual void SkipChunk (const unsigned int tag)
 Skip an entire chunk. More...
 
virtual void CloseChunk ()
 Close the current chunk The chunk length is written to the archive. More...
 
virtual unsigned int PeekChunk ()
 Peek at the tag of the next chunk. More...
 
void SetFileVersion (unsigned int version)
 Set the archive version as read from the archive. More...
 
unsigned int GetFileVersion () const
 Get the archive version number read from the archive. More...
 
- Public Member Functions inherited from Dali::Internal::Archive
 Archive (std::streambuf &buf)
 Constructor. More...
 
virtual ~Archive ()
 Destructor. More...
 
unsigned int GetVersion () const
 Get archive version. More...
 
void SetVersion (const unsigned int version)
 Set archive version. More...
 
bool GetResult () const
 Returns the result of the archiving operation The result status is initialised to true on construction Any failure will set it to false. More...
 
void SetResultFailed ()
 Set the archive status to failed. More...
 
virtual bool Write (const char *data, const unsigned int length)
 Write a bytestream to the archive. More...
 

Private Attributes

unsigned int mFileVersion
 

Additional Inherited Members

- Public Types inherited from Dali::Internal::Archive
typedef std::pair< unsigned
int, std::streampos > 
ChunkHeader
 
- Protected Attributes inherited from Dali::Internal::Archive
unsigned int mVersion
 
std::iostream mStream
 
std::stack< ChunkHeadermChunkStack
 
bool mResult
 

Detailed Description

Archive specialization.

Performs serialization from an Archive

Definition at line 185 of file archive.h.

Constructor & Destructor Documentation

Dali::Internal::InputArchive::InputArchive ( std::streambuf &  buf,
const unsigned int  version 
)

Definition at line 140 of file archive.cpp.

References Dali::Internal::Archive::SetVersion().

Here is the call graph for this function:

Dali::Internal::InputArchive::~InputArchive ( )
virtual

Definition at line 147 of file archive.cpp.

Member Function Documentation

void Dali::Internal::InputArchive::CloseChunk ( )
virtual

Close the current chunk The chunk length is written to the archive.

Implements Dali::Internal::Archive.

Definition at line 242 of file archive.cpp.

References Dali::Internal::Archive::mChunkStack, Dali::Internal::Archive::mStream, and Read().

Here is the call graph for this function:

unsigned int Dali::Internal::InputArchive::GetFileVersion ( ) const
inline

Get the archive version number read from the archive.

Definition at line 232 of file archive.h.

References mFileVersion.

bool Dali::Internal::InputArchive::OpenChunk ( const unsigned int  tag)
virtual

Open a new chunk.

Parameters
[in]tagThe FourCC tag for the chunk
Returns
true if success.

Implements Dali::Internal::Archive.

Definition at line 164 of file archive.cpp.

References DALI_LOG_INFO, Dali::Internal::Archive::mChunkStack, Dali::Internal::Archive::mResult, Dali::Internal::Archive::mStream, PeekChunk(), and Read().

Here is the call graph for this function:

unsigned int Dali::Internal::InputArchive::PeekChunk ( )
virtual

Peek at the tag of the next chunk.

This will move the file pointer to the next even byte, then read the next four bytes

Returns
The FourCC tag for the next chunk.

Reimplemented from Dali::Internal::Archive.

Definition at line 259 of file archive.cpp.

References DALI_LOG_INFO, Dali::Internal::Archive::mStream, and Read().

Referenced by OpenChunk(), and SkipChunk().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::InputArchive::Read ( char *  data,
const unsigned int  length 
)
virtual

Read a bytestream from the archive.

Parameters
[in]dataA pointer to a buffer to store the data
[in]lengthThe length of the data in bytes
Returns
true if the data was successfully read

Reimplemented from Dali::Internal::Archive.

Definition at line 151 of file archive.cpp.

References Dali::Internal::Archive::mResult, and Dali::Internal::Archive::mStream.

Referenced by CloseChunk(), OpenChunk(), PeekChunk(), and SkipChunk().

Here is the caller graph for this function:

void Dali::Internal::InputArchive::SetFileVersion ( unsigned int  version)
inline

Set the archive version as read from the archive.

Parameters
[in]versionThe archives version number

Definition at line 224 of file archive.h.

References mFileVersion.

void Dali::Internal::InputArchive::SkipChunk ( const unsigned int  tag)
virtual

Skip an entire chunk.

Parameters
[in]tagThe FourCC tag for the chunk

Reimplemented from Dali::Internal::Archive.

Definition at line 208 of file archive.cpp.

References DALI_LOG_INFO, Dali::Internal::Archive::mStream, PeekChunk(), and Read().

Here is the call graph for this function:

Member Data Documentation

unsigned int Dali::Internal::InputArchive::mFileVersion
private

Definition at line 237 of file archive.h.

Referenced by GetFileVersion(), and SetFileVersion().


The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali