Tawara  0.1.0
Public Member Functions | List of all members
tawara::Tawara Class Reference

The Tawara interface, the interface provided by all Tawara objects. More...

#include <tawara/tawara.h>

Inheritance diagram for tawara::Tawara:
Inheritance graph
[legend]
Collaboration diagram for tawara::Tawara:
Collaboration graph
[legend]

Public Member Functions

 Tawara (std::iostream &stream)
 Create a new Tawara object. More...
 
virtual ~Tawara ()
 Destroy the Tawara object. More...
 

Detailed Description

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.

Definition at line 60 of file tawara.h.

Constructor & Destructor Documentation

tawara::Tawara::Tawara ( std::iostream &  stream)
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.

Parameters
[in]streamA reference to the std::iostream object to read from and write to.
Exceptions
NotEBMLif the stream is not empty and does not contain an EBML header.
NotTawaraif the stream is not empty and does not contain valid EBML with the "tawara" DocType.

Definition at line 88 of file tawara.h.

virtual tawara::Tawara::~Tawara ( )
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.

Definition at line 99 of file tawara.h.


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