strus  0.17
metaDataReaderInterface.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_METADATA_READER_INTERFACE_HPP_INCLUDED
11 #define _STRUS_METADATA_READER_INTERFACE_HPP_INCLUDED
12 #include "strus/index.hpp"
13 #include "strus/numericVariant.hpp"
14 #include <string>
15 #include <vector>
16 
17 namespace strus
18 {
19 
21 class MetaDataRestrictionInterface;
22 
25 {
26 public:
29 
34  virtual Index elementHandle( const std::string& name_) const=0;
35 
39  virtual Index nofElements() const=0;
40 
44  virtual void skipDoc( const Index& docno)=0;
45 
49  virtual NumericVariant getValue( const Index& elementHandle_) const=0;
50 
54  virtual const char* getType( const Index& elementHandle_) const=0;
55 
59  virtual const char* getName( const Index& elementHandle_) const=0;
60 
63  virtual std::vector<std::string> getNames() const=0;
64 };
65 }//namespace
66 #endif
67 
int32_t Index
Number type generally used for locally counted indices.
Definition: index.hpp:29
virtual Index nofElements() const =0
Get the number of columns in the meta data table.
virtual Index elementHandle(const std::string &name_) const =0
Get the handle for a table element addressed by name.
Numeric types used for local and global indices.
virtual std::vector< std::string > getNames() const =0
Get the list of names of a table elements.
virtual const char * getName(const Index &elementHandle_) const =0
Get the name of a table element.
Interface for accessing meta data from a strus storage.
Definition: metaDataReaderInterface.hpp:24
virtual NumericVariant getValue(const Index &elementHandle_) const =0
Get the value a table element.
virtual void skipDoc(const Index &docno)=0
Skip to the document number equal to 'docno'.
virtual ~MetaDataReaderInterface()
Destructor.
Definition: metaDataReaderInterface.hpp:28
virtual const char * getType(const Index &elementHandle_) const =0
Get the type name of a table element (internal representation)