strusAnalyzer  0.17
featureOptions.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_FEATURE_OPTIONS_HPP_INCLUDED
11 #define _STRUS_ANALYZER_FEATURE_OPTIONS_HPP_INCLUDED
13 #include <utility>
14 
16 namespace strus {
17 namespace analyzer {
18 
22 {
23 public:
26  :m_opt(0){}
28 #if __cplusplus >= 201103L
29  FeatureOptions( FeatureOptions&& ) = default;
30  FeatureOptions( const FeatureOptions& ) = default;
31  FeatureOptions& operator= ( FeatureOptions&& ) = default;
32  FeatureOptions& operator= ( const FeatureOptions& ) = default;
33 #else
35  :m_opt(o.m_opt){}
36 #endif
37  FeatureOptions( unsigned int opt_)
39  :m_opt(opt_){}
40 
43 
45  void definePositionBind( analyzer::PositionBind b) {m_opt &= ~0x3; m_opt |= (unsigned int)b;}
46 
48  unsigned int opt() const {return m_opt;}
49 
50 private:
51  unsigned int m_opt;
52 };
53 
54 }}//namespace
55 #endif
56 
FeatureOptions()
Default constructor.
Definition: featureOptions.hpp:25
Options to stear the creation of terms in the analyzer.
Definition: featureOptions.hpp:21
PositionBind
Determines how document ordinal positions are assigned to terms.
Definition: positionBind.hpp:20
FeatureOptions(const FeatureOptions &o)
Copy constructor.
Definition: featureOptions.hpp:34
unsigned int opt() const
Get the options transacription as integer.
Definition: featureOptions.hpp:48
void definePositionBind(analyzer::PositionBind b)
Define the PositionBind value.
Definition: featureOptions.hpp:45
analyzer::PositionBind positionBind() const
Get the PositionBind value set.
Definition: featureOptions.hpp:42