Tide 0.1.0
|
The Tide interface, the interface provided by all Tide objects. More...
#include <tide/tide.h>
Public Member Functions | |
Tide (std::iostream &stream) | |
Create a new Tide object. | |
virtual | ~Tide () |
Destroy the Tide object. |
The Tide interface, the interface provided by all Tide objects.
This class defines the Tide interface. All implementations must implement these methods. A Tide implementation may use whatever it desires to provide the functionality. Two commonly-used implementations are a file store and a memory store.
tide::Tide::Tide | ( | std::iostream & | stream | ) | [inline] |
Create a new Tide object.
This constructor makes a new Tide 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, NotTide 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 Tide::Tide(). Tide 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. |
virtual tide::Tide::~Tide | ( | ) | [inline, virtual] |
Destroy the Tide 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 Tide 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.