strus  0.17
Public Member Functions | List of all members
strus::AttributeReaderInterface Class Referenceabstract

Interface for accessing document attributes from a strus storage. More...

#include <attributeReaderInterface.hpp>

Public Member Functions

virtual ~AttributeReaderInterface ()
 Destructor. More...
 
virtual Index elementHandle (const char *name) const =0
 Get the handle of an element addressed by its name. More...
 
virtual void skipDoc (const Index &docno)=0
 Move the attribute reader context to a specific document. More...
 
virtual std::string getValue (const Index &elementHandle_) const =0
 Get the value of the attribute of the document in the current readed context – defined with skipDoc(const Index&) More...
 
virtual std::vector< std::string > getNames () const =0
 Get the names of all attributes defined in the storage. More...
 

Detailed Description

Interface for accessing document attributes from a strus storage.

Constructor & Destructor Documentation

virtual strus::AttributeReaderInterface::~AttributeReaderInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual Index strus::AttributeReaderInterface::elementHandle ( const char *  name) const
pure virtual

Get the handle of an element addressed by its name.

Parameters
[in]namename of the element
Returns
the element handle as number (count starting with 1) or 0 on error
virtual std::vector<std::string> strus::AttributeReaderInterface::getNames ( ) const
pure virtual

Get the names of all attributes defined in the storage.

Returns
list of attribute names
Note
Returns the names of all attributes defined for any document, independent of the current document.
virtual std::string strus::AttributeReaderInterface::getValue ( const Index elementHandle_) const
pure virtual

Get the value of the attribute of the document in the current readed context – defined with skipDoc(const Index&)

Parameters
[in]elementHandle_the handle of the element to retrieve
Returns
the value of the element as string or an empty string if undefined
virtual void strus::AttributeReaderInterface::skipDoc ( const Index docno)
pure virtual

Move the attribute reader context to a specific document.

Parameters
[in]docnothe number of the document to move the context to

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