strusAnalyzer  0.17
documentMetaData.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_ANALYZER_DOCUMENT_METADATA_HPP_INCLUDED
11 #define _STRUS_ANALYZER_DOCUMENT_METADATA_HPP_INCLUDED
12 #include "strus/numericVariant.hpp"
13 #include <string>
14 
16 namespace strus {
18 namespace analyzer {
19 
22 {
23 public:
27 #if __cplusplus >= 201103L
28  DocumentMetaData( DocumentMetaData&& ) = default;
29  DocumentMetaData( const DocumentMetaData& ) = default;
30  DocumentMetaData& operator= ( DocumentMetaData&& ) = default;
31  DocumentMetaData& operator= ( const DocumentMetaData& ) = default;
32 #else
34  :m_name(o.m_name),m_value(o.m_value){}
35 #endif
36  DocumentMetaData( const std::string& n, const NumericVariant& v)
40  :m_name(n),m_value(v){}
41 
44  const std::string& name() const {return m_name;}
45 
48  const NumericVariant& value() const {return m_value;}
49 
50 private:
51  std::string m_name;
52  NumericVariant m_value;
53 };
54 
55 }}//namespace
56 #endif
57 
const std::string & name() const
Get the name of the meta data element.
Definition: documentMetaData.hpp:44
DocumentMetaData()
Default constructor.
Definition: documentMetaData.hpp:25
Structure describing a document meta data element.
Definition: documentMetaData.hpp:21
DocumentMetaData(const DocumentMetaData &o)
Copy constructor.
Definition: documentMetaData.hpp:33
const NumericVariant & value() const
Get the value of the meta data element.
Definition: documentMetaData.hpp:48