Tawara
0.1.0
|
The Tawara interface, the interface provided by all Tawara objects. More...
#include <tawara/tawara.h>
Public Member Functions | |
Tawara (std::iostream &stream) | |
Create a new Tawara object. More... | |
virtual | ~Tawara () |
Destroy the Tawara object. More... | |
The Tawara interface, the interface provided by all Tawara objects.
This class defines the Tawara interface. All implementations must implement these methods. A Tawara implementation may use whatever it desires to provide the functionality. Two commonly-used implementations are a file store and a memory store.
|
inline |
Create a new Tawara object.
This constructor makes a new Tawara object around an input/output stream.
The stream will be checked for its current contents. If it is empty (i.e. the size of its contents is zero), then it will be initialised as a new EBML file. Otherwise, it will be treated as an existing EBML file and read. In this case, if an EBML header cannot be found or the DocType is incorrect, NotTawara will be raised.
EBML supports placing text before the EBML header. Anything up to the first 0x1A byte is ignored. This means you can place data into the stream before passing it to Tawara::Tawara(). Tawara will treat the current position in the stream when this constructor is called as the beginning of the stream.
[in] | stream | A reference to the std::iostream object to read from and write to. |
|
inlinevirtual |
Destroy the Tawara object.
All resources used by the object will be cleaned up when its destructor is called. Any other objects, such as Element objects, referencing this Tawara object will become invalid and should not be used. Behaviour if they are used is undefined.
The stream passed to the constructor is not closed.