Castor3D  ..
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Castor3D::BinaryParser< TParsed > Class Template Referenceabstract

Binary data chunk writer/reader base class. More...

Public Member Functions

C3D_API BinaryParser (Castor::Path const &p_path)
 Constructor. More...
 
virtual C3D_API bool Fill (TParsed const &p_obj, Castor::BinaryFile &p_file) const
 To chunk writer function. More...
 
virtual C3D_API bool Parse (TParsed &p_obj, Castor::BinaryFile &p_file) const
 From file reader function. More...
 
virtual C3D_API bool Fill (TParsed const &p_obj, BinaryChunk &p_chunk) const =0
 To chunk writer function. More...
 
virtual C3D_API bool Parse (TParsed &p_obj, BinaryChunk &p_chunk) const =0
 From chunk reader function. More...
 

Protected Member Functions

template<typename T >
bool DoParseChunk (T *p_pValues, uint32_t p_count, BinaryChunk &p_chunk) const
 Retrieves a value array from a chunk. More...
 
template<typename T , uint32_t Count>
bool DoParseChunk (T(&p_value)[Count], BinaryChunk &p_chunk) const
 Retrieves a value array from a chunk. More...
 
template<typename T >
bool DoParseChunk (T &p_value, BinaryChunk &p_chunk) const
 Retrieves a value from a chunk. More...
 
template<typename T >
bool DoFillChunk (T const *p_values, uint32_t p_count, eCHUNK_TYPE p_chunkType, BinaryChunk &p_chunk) const
 Writes a subchunk value into a chunk. More...
 
template<typename T , uint32_t Count>
bool DoFillChunk (T const(&p_value)[Count], eCHUNK_TYPE p_chunkType, BinaryChunk &p_chunk) const
 Writes a subchunk value into a chunk. More...
 
template<typename T >
bool DoFillChunk (T const &p_value, eCHUNK_TYPE p_chunkType, BinaryChunk &p_chunk) const
 Writes a subchunk value into a chunk. More...
 

Protected Attributes

Castor::Path m_path
 The current folder path. More...
 

Detailed Description

template<class TParsed>
class Castor3D::BinaryParser< TParsed >

Binary data chunk writer/reader base class.

Author
Sylvain DOREMUS
Version
0.7.0.0
Date
15/04/2013

Constructor & Destructor Documentation

◆ BinaryParser()

template<class TParsed>
C3D_API Castor3D::BinaryParser< TParsed >::BinaryParser ( Castor::Path const &  p_path)
inline

Constructor.

Parameters
[in]p_pathThe current folder path

Member Function Documentation

◆ DoFillChunk() [1/3]

template<class TParsed>
template<typename T >
bool Castor3D::BinaryParser< TParsed >::DoFillChunk ( T const *  p_values,
uint32_t  p_count,
eCHUNK_TYPE  p_chunkType,
BinaryChunk p_chunk 
) const
inlineprotected

Writes a subchunk value into a chunk.

Parameters
[in]p_valuesThe values
[in]p_countThe values count
[in]p_chunkTypeThe subchunk type
[in]p_chunkThe chunk
Returns
false if any error occured

◆ DoFillChunk() [2/3]

template<class TParsed>
template<typename T , uint32_t Count>
bool Castor3D::BinaryParser< TParsed >::DoFillChunk ( T const(&)  p_value[Count],
eCHUNK_TYPE  p_chunkType,
BinaryChunk p_chunk 
) const
inlineprotected

Writes a subchunk value into a chunk.

Parameters
[in]p_valueThe values
[in]p_chunkTypeThe subchunk type
[in]p_chunkThe chunk
Returns
false if any error occured

◆ DoFillChunk() [3/3]

template<class TParsed>
template<typename T >
bool Castor3D::BinaryParser< TParsed >::DoFillChunk ( T const &  p_value,
eCHUNK_TYPE  p_chunkType,
BinaryChunk p_chunk 
) const
inlineprotected

Writes a subchunk value into a chunk.

Parameters
[in]p_valueThe value
[in]p_chunkTypeThe subchunk type
[in]p_chunkThe chunk
Returns
false if any error occured

◆ DoParseChunk() [1/3]

template<class TParsed>
template<typename T >
bool Castor3D::BinaryParser< TParsed >::DoParseChunk ( T *  p_pValues,
uint32_t  p_count,
BinaryChunk p_chunk 
) const
inlineprotected

Retrieves a value array from a chunk.

Parameters
[out]p_pValuesReceives the parsed values
[out]p_countThe values count
[in]p_chunkThe chunk containing the values
Returns
false if any error occured

◆ DoParseChunk() [2/3]

template<class TParsed>
template<typename T , uint32_t Count>
bool Castor3D::BinaryParser< TParsed >::DoParseChunk ( T(&)  p_value[Count],
BinaryChunk p_chunk 
) const
inlineprotected

Retrieves a value array from a chunk.

Parameters
[out]p_valueReceives the parsed values
[in]p_chunkThe chunk containing the values
Returns
false if any error occured

◆ DoParseChunk() [3/3]

template<class TParsed>
template<typename T >
bool Castor3D::BinaryParser< TParsed >::DoParseChunk ( T &  p_value,
BinaryChunk p_chunk 
) const
inlineprotected

Retrieves a value from a chunk.

Parameters
[out]p_valueReceives the parsed value
[in]p_chunkThe chunk containing the value
Returns
false if any error occured

◆ Fill() [1/2]

template<class TParsed>
virtual C3D_API bool Castor3D::BinaryParser< TParsed >::Fill ( TParsed const &  p_obj,
Castor::BinaryFile &  p_file 
) const
inlinevirtual

To chunk writer function.

Parameters
[in]p_objThe object to write
[in]p_fileThe file
Returns
false if any error occured

Referenced by Castor3D::BinaryParser< RenderTarget >::Fill().

+ Here is the caller graph for this function:

◆ Fill() [2/2]

template<class TParsed>
virtual C3D_API bool Castor3D::BinaryParser< TParsed >::Fill ( TParsed const &  p_obj,
BinaryChunk p_chunk 
) const
pure virtual

◆ Parse() [1/2]

template<class TParsed>
virtual C3D_API bool Castor3D::BinaryParser< TParsed >::Parse ( TParsed &  p_obj,
Castor::BinaryFile &  p_file 
) const
inlinevirtual

From file reader function.

Parameters
[out]p_objThe object to read
[in]p_fileThe file containing the chunk
Returns
false if any error occured

Referenced by Castor3D::BinaryParser< RenderTarget >::Parse().

+ Here is the caller graph for this function:

◆ Parse() [2/2]

template<class TParsed>
virtual C3D_API bool Castor3D::BinaryParser< TParsed >::Parse ( TParsed &  p_obj,
BinaryChunk p_chunk 
) const
pure virtual

Member Data Documentation

◆ m_path

template<class TParsed>
Castor::Path Castor3D::BinaryParser< TParsed >::m_path
protected

The current folder path.


The documentation for this class was generated from the following file: