Helper to write basic EBML types. More...
Inherited by CWriterHelper.
Public Member Functions | |
virtual void | release (void)=0 |
Tells this object it won't be used anymore. More... | |
Writer connection | |
virtual EBML::boolean | connect (EBML::IWriter *pWriter)=0 |
Connects an EBML writer to this helper. More... | |
virtual EBML::boolean | disconnect (void)=0 |
Disconnects the currently connected EBML writer. More... | |
Writer binding functions | |
virtual EBML::boolean | openChild (const EBML::CIdentifier &rIdentifier)=0 |
Child opening binding. More... | |
virtual EBML::boolean | closeChild (void)=0 |
Child closing binding. More... | |
Standard EBML formating | |
EBML::IWriter::setChildData replacement
Those functions should be used in place of the basic EBML::IWriter::setChildData function. They format standard EBML types into corresponding buffers and then send those built buffers to the writer using the EBML::IWriter::setChildData function. | |
virtual EBML::boolean | setSIntegerAsChildData (const EBML::int64 iValue)=0 |
Sets a signed integer as child data. More... | |
virtual EBML::boolean | setUIntegerAsChildData (const EBML::uint64 uiValue)=0 |
Sets an unsigned integer as child data. More... | |
virtual EBML::boolean | setFloat32AsChildData (const EBML::float32 fValue)=0 |
Sets a 32 bits float value as child data. More... | |
virtual EBML::boolean | setFloat64AsChildData (const EBML::float64 fValue)=0 |
Sets a 64 bits float value as child data. More... | |
virtual EBML::boolean | setBinaryAsChildData (const void *pBuffer, const EBML::uint64 ui64BufferLength)=0 |
Sets a buffer as child data. More... | |
virtual EBML::boolean | setASCIIStringAsChildData (const char *sValue)=0 |
Sets an ASCII string as child data. More... | |
Protected Member Functions | |
virtual | ~IWriterHelper (void) |
Virtual destructor - should be overloaded. | |
Detailed Description
Helper to write basic EBML types.
- Date
- 2006-08-07 This class may be used by the user in order to correctly format simple types defined in the EBML description such as integers, floats, strings etc... It directly uses the EBML::IWriter connected instance so one could simply use the helper in order to write his EBML stream.
A similar class exists to help parsing process... See EBML::IReaderHelper for more details.
Be sure to look at http://ebml.sourceforge.net/specs/ in order to understand what EBML is and how it should be used.
- Todo:
float80 formating implementation
date formating implementation
utf8 string formating implementation
Member Function Documentation
|
pure virtual |
Connects an EBML writer to this helper.
- Parameters
-
pWriter [in] : The writer to connect
- Returns
- true on success.
- false on error.
This function gives the helper a handle to the writer to use in order to forward requests. Thus, when the user calls a helper function, the call is forwarded to the correct writer that effictively does the work. The aim of this helper is simply to transform standard EBML types into bytes buffers.
Once a writer is connected, it could be disconnected thanks to the disconnect
function. It must be done before calling connect
again.
|
pure virtual |
|
pure virtual |
Child opening binding.
- Parameters
-
rIdentifier [in] : The identifier of the new child node
- Returns
- true on success.
- false on error.
This function simply forwards the call to the corresponding EBML::IWriter function. See EBML::IWriter::openChild for more details.
|
pure virtual |
Child closing binding.
- Returns
- true on success.
- false on error.
This function simply forwards the call to the corresponding EBML::IWriter function. See EBML::IWriter::closeChild for more details.
|
pure virtual |
Sets a signed integer as child data.
- Parameters
-
iValue [in] : The integer value to set
|
pure virtual |
Sets an unsigned integer as child data.
- Parameters
-
uiValue [in] : The integer value to set
|
pure virtual |
Sets a 32 bits float value as child data.
- Parameters
-
fValue [in] : The 32 bits float value to set
|
pure virtual |
Sets a 64 bits float value as child data.
- Parameters
-
fValue [in] : The 64 bits float value to set
|
pure virtual |
Sets a buffer as child data.
- Parameters
-
pBuffer [in] : The buffer to send to the writer ui64BufferLength [in] : The buffer size in bytes
- Note
- This function simply calls the basic EBML::IWriter::setChildData function with the same two parameters.
|
pure virtual |
Sets an ASCII string as child data.
- Parameters
-
sValue [in] : The ASCII string value to set
|
pure virtual |
Tells this object it won't be used anymore.
Instances of this class can not be instanciated another way than calling createWriterHelper
. They can not be deleted either because the destructor is. protected. The library knows how to create and delete an instance of this class... Calling release
will simply delete this instance and handle necessary cleanings when needed.
The current object is invalid after calling this function. It can not be used anymore.
- Warning
- Releasing this obbject does not release the connected writer instance !
Generated on Tue Jun 26 2012 15:25:54 for Documentation by
