strus  0.17
attributeReaderInterface.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
10 #ifndef _STRUS_ATTRIBUTE_READER_INTERFACE_HPP_INCLUDED
11 #define _STRUS_ATTRIBUTE_READER_INTERFACE_HPP_INCLUDED
12 #include "strus/index.hpp"
13 #include <string>
14 #include <vector>
15 
16 namespace strus
17 {
18 
21 {
22 public:
25 
29  virtual Index elementHandle( const char* name) const=0;
30 
33  virtual void skipDoc( const Index& docno)=0;
34 
38  virtual std::string getValue( const Index& elementHandle_) const=0;
39 
43  virtual std::vector<std::string> getNames() const=0;
44 };
45 }//namespace
46 #endif
47 
virtual Index elementHandle(const char *name) const =0
Get the handle of an element addressed by its name.
int32_t Index
Number type generally used for locally counted indices.
Definition: index.hpp:29
virtual std::vector< std::string > getNames() const =0
Get the names of all attributes defined in the storage.
Numeric types used for local and global indices.
Interface for accessing document attributes from a strus storage.
Definition: attributeReaderInterface.hpp:20
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(c...
virtual ~AttributeReaderInterface()
Destructor.
Definition: attributeReaderInterface.hpp:24
virtual void skipDoc(const Index &docno)=0
Move the attribute reader context to a specific document.