Wolframe, 0.0.3

Initializer of a structure based on a structure description feeded with a serialization. More...

#include <structParser.hpp>

Public Types

typedef boost::shared_ptr< void > ObjectReference
 

Public Member Functions

 StructParser (void *obj, const StructDescriptionBase *descr)
 Constructor. More...
 
 StructParser (const ObjectReference &obj, const StructDescriptionBase *descr)
 Constructor. More...
 
 StructParser (const StructParser &o)
 Copy constructor. More...
 
virtual ~StructParser ()
 Destructor. More...
 
void init (const langbind::TypedInputFilterR &i, serialize::Flags::Enum flags=serialize::Flags::None)
 Parser start initialization. More...
 
const ObjectReferenceobject () const
 Get a shared reference of the parsed objects base pointer. More...
 
const StructDescriptionBasedescr () const
 Get the structure description of the parsed object. More...
 
bool call ()
 Call of one processing step the parser. More...
 

Static Public Member Functions

static std::string getElementPath (const ParseStateStack &stk)
 Get the current element path defined by the stack 'stk' as string for error messages. More...
 

Private Attributes

void * m_ptr
 
ObjectReference m_obj
 
const StructDescriptionBasem_descr
 
Context m_ctx
 
langbind::TypedInputFilterR m_inp
 
ParseStateStack m_stk
 

Detailed Description

Initializer of a structure based on a structure description feeded with a serialization.

Member Typedef Documentation

typedef boost::shared_ptr<void> _Wolframe::serialize::StructParser::ObjectReference

Constructor & Destructor Documentation

_Wolframe::serialize::StructParser::StructParser ( void *  obj,
const StructDescriptionBase descr 
)

Constructor.

_Wolframe::serialize::StructParser::StructParser ( const ObjectReference obj,
const StructDescriptionBase descr 
)

Constructor.

_Wolframe::serialize::StructParser::StructParser ( const StructParser o)

Copy constructor.

virtual _Wolframe::serialize::StructParser::~StructParser ( )
inlinevirtual

Destructor.

Member Function Documentation

bool _Wolframe::serialize::StructParser::call ( )

Call of one processing step the parser.

Remarks
The processing is finished when the call returns true. In case of false returned you have to inspect the input filter state to determine what is to do next. In case of a validation error, the function throws a std::runtime_error
const StructDescriptionBase* _Wolframe::serialize::StructParser::descr ( ) const
inline

Get the structure description of the parsed object.

static std::string _Wolframe::serialize::StructParser::getElementPath ( const ParseStateStack stk)
static

Get the current element path defined by the stack 'stk' as string for error messages.

void _Wolframe::serialize::StructParser::init ( const langbind::TypedInputFilterR i,
serialize::Flags::Enum  flags = serialize::Flags::None 
)

Parser start initialization.

const ObjectReference& _Wolframe::serialize::StructParser::object ( ) const
inline

Get a shared reference of the parsed objects base pointer.

Member Data Documentation

Context _Wolframe::serialize::StructParser::m_ctx
private
const StructDescriptionBase* _Wolframe::serialize::StructParser::m_descr
private
langbind::TypedInputFilterR _Wolframe::serialize::StructParser::m_inp
private
ObjectReference _Wolframe::serialize::StructParser::m_obj
private
void* _Wolframe::serialize::StructParser::m_ptr
private
ParseStateStack _Wolframe::serialize::StructParser::m_stk
private

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