Mondschein Engine  0.3.0
Public Member Functions | List of all members
mondschein::io::Buffer Class Referenceabstract

This interface is the base for all file buffers. More...

#include <buffer.h>

Inheritance diagram for mondschein::io::Buffer:
mondschein::io::FI_Buffer mondschein::io::MBD_Buffer

Public Member Functions

virtual void set_io_objects (const io_objects_t &_io_objects)
 Set the I/O objects container. More...
 
virtual io_objects_t get_io_objects () const
 Get the I/O objects container. More...
 
virtual void parse_istream (std::istream &_in)=0
 Parse from an input stream. More...
 
virtual void parse_string (const std::string &_in)=0
 Parse from a string. More...
 
virtual void serialize_ostream (std::ostream &_out) const =0
 Serialize to an output stream. More...
 
virtual void serialize_string (std::string &_out) const =0
 Serialize to a string. More...
 

Detailed Description

This interface is the base for all file buffers.

The Buffer interface provides all base functionality to handle file types needed by the Mondschein Engine.

Definition at line 37 of file buffer.h.

Member Function Documentation

io_objects_t Buffer::get_io_objects ( ) const
virtual

Get the I/O objects container.

Returns
the I/O objectscontainer of *this

Definition at line 53 of file buffer.cpp.

virtual void mondschein::io::Buffer::parse_istream ( std::istream &  _in)
pure virtual

Parse from an input stream.

Parameters
_inthe input stream
Exceptions
mondschein::exceptionif a known exception is thrown during execution or if the file type doesn't match

If _in is a valid input stream containing data in the right format the buffer can parse all elements from that stream into the I/O objects container. What data can be parsed and how it is treated is implementation dependent.

Implemented in mondschein::io::MBD_Buffer, and mondschein::io::FI_Buffer.

virtual void mondschein::io::Buffer::parse_string ( const std::string &  _in)
pure virtual

Parse from a string.

Parameters
_inthe string
Exceptions
mondschein::exceptionif a known exception is thrown during execution or if the file type doesn't match

If _in is a valid string containing data in the right format the buffer can parse all elements from that string into the I/O objects container. What data can be parsed and how it is treated is implementation dependent.

Implemented in mondschein::io::MBD_Buffer, and mondschein::io::FI_Buffer.

virtual void mondschein::io::Buffer::serialize_ostream ( std::ostream &  _out) const
pure virtual

Serialize to an output stream.

Parameters
_outthe output stream
Exceptions
mondschein::exceptionif a known exception is thrown during execution

If _out is a valid output stream the buffer can serialize all elements in the I/O objects container into _out. What data can be processed and how it is treated is implementation dependent.

Implemented in mondschein::io::MBD_Buffer, and mondschein::io::FI_Buffer.

virtual void mondschein::io::Buffer::serialize_string ( std::string &  _out) const
pure virtual

Serialize to a string.

Parameters
_outthe string
Exceptions
mondschein::exceptionif a known exception is thrown during execution

If _out is a valid string the buffer can serialize all elements in the I/O objects container into _out. What data can be processed and how it is treated is implementation dependent.

Implemented in mondschein::io::MBD_Buffer, and mondschein::io::FI_Buffer.

void Buffer::set_io_objects ( const io_objects_t _io_objects)
virtual

Set the I/O objects container.

Parameters
_objthe I/O objects container

Definition at line 47 of file buffer.cpp.


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