Wolframe, 0.0.3

_Wolframe::langbind::Input Class Reference

Input as seen from the application processor program. More...

#include <input.hpp>

Public Member Functions

 Input ()
 Constructor. More...
 
 Input (const Input &o)
 Copy constructor. More...
 
 Input (const std::string &docformat_)
 Constructor by input filter. More...
 
 Input (const std::string &docformat_, const std::string &content_)
 Constructor by content. More...
 
 ~Input ()
 Destructor. More...
 
const InputFilterRinputfilter () const
 Get the input filter attached to input. More...
 
InputFilterRinputfilter ()
 Get the input filter attached to input. More...
 
const std::string & docformat () const
 Get the document format as recognized by the document type detection as string {"xml","json",...}. More...
 
InputFilterRgetIterator ()
 Get the input filter attached to input and check for duplicate access. More...
 
bool isDocument () const
 Eval if this represents a document. More...
 
const char * documentptr () const
 Get content source string if input is not from network. More...
 
std::size_t documentsize () const
 Get size of the content source string if input is not from network. More...
 
void putInput (const void *data, std::size_t datasize, bool eod)
 Put input data to filter or buffer it. More...
 
void setInputFilter (const InputFilterR &filter)
 Defined the input filter and attach unconsumed input. More...
 
bool gotEoD () const
 Find out if the input has reached end of data. More...
 

Private Attributes

bool m_used
 only one iterator can be created from input. This is the guard for checking this. More...
 
InputFilterR m_inputfilter
 input is defined by the associated input filter More...
 
std::string m_docformat
 document format as recognized by the document type detection as string {"xml","json",...} More...
 
boost::shared_ptr< char > m_content
 content source string is input is not from network More...
 
std::size_t m_contentsize
 size of content in bytes More...
 
std::string m_unconsumedInput
 unconsumed network input More...
 
bool m_gotEoD
 Got end of data. More...
 

Detailed Description

Input as seen from the application processor program.

Constructor & Destructor Documentation

_Wolframe::langbind::Input::Input ( )
inline

Constructor.

_Wolframe::langbind::Input::Input ( const Input o)

Copy constructor.

Parameters
[in]ocopied item
_Wolframe::langbind::Input::Input ( const std::string &  docformat_)

Constructor by input filter.

Parameters
[in]docformat_document format
_Wolframe::langbind::Input::Input ( const std::string &  docformat_,
const std::string &  content_ 
)

Constructor by content.

Parameters
[in]docformat_document format
[in]content_content string
_Wolframe::langbind::Input::~Input ( )
inline

Destructor.

Member Function Documentation

const std::string& _Wolframe::langbind::Input::docformat ( ) const
inline

Get the document format as recognized by the document type detection as string {"xml","json",...}.

Returns
the document format as string
const char* _Wolframe::langbind::Input::documentptr ( ) const
inline

Get content source string if input is not from network.

Returns
the content string pointer or NULL, if not defined
std::size_t _Wolframe::langbind::Input::documentsize ( ) const
inline

Get size of the content source string if input is not from network.

Returns
the content string size or 0, if not defined
InputFilterR& _Wolframe::langbind::Input::getIterator ( )

Get the input filter attached to input and check for duplicate access.

Returns
the input filter reference
bool _Wolframe::langbind::Input::gotEoD ( ) const
inline

Find out if the input has reached end of data.

const InputFilterR& _Wolframe::langbind::Input::inputfilter ( ) const
inline

Get the input filter attached to input.

Returns
the input filter reference
InputFilterR& _Wolframe::langbind::Input::inputfilter ( )
inline

Get the input filter attached to input.

Returns
the input filter reference
bool _Wolframe::langbind::Input::isDocument ( ) const
inline

Eval if this represents a document.

Returns
true, if yes
void _Wolframe::langbind::Input::putInput ( const void *  data,
std::size_t  datasize,
bool  eod 
)

Put input data to filter or buffer it.

Parameters
[in]datapointer to input data
[in]datasizesize of input data in bytes
[in]eodend of data
void _Wolframe::langbind::Input::setInputFilter ( const InputFilterR filter)

Defined the input filter and attach unconsumed input.

Parameters
[in]filterinput filter

Member Data Documentation

boost::shared_ptr<char> _Wolframe::langbind::Input::m_content
private

content source string is input is not from network

std::size_t _Wolframe::langbind::Input::m_contentsize
private

size of content in bytes

std::string _Wolframe::langbind::Input::m_docformat
private

document format as recognized by the document type detection as string {"xml","json",...}

bool _Wolframe::langbind::Input::m_gotEoD
private

Got end of data.

InputFilterR _Wolframe::langbind::Input::m_inputfilter
private

input is defined by the associated input filter

std::string _Wolframe::langbind::Input::m_unconsumedInput
private

unconsumed network input

bool _Wolframe::langbind::Input::m_used
private

only one iterator can be created from input. This is the guard for checking this.


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