strusAnalyzer  0.17
patternMatcherResult.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 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_PATTERN_MATCHER_RESULT_HPP_INCLUDED
11 #define _STRUS_ANALYZER_PATTERN_MATCHER_RESULT_HPP_INCLUDED
13 #include "strus/base/stdint.h"
14 #include <string>
15 #include <vector>
16 
17 namespace strus {
18 namespace analyzer {
19 
23 {
24 public:
26 
29  :PatternMatcherResultItem(),m_itemlist(){}
31  PatternMatcherResult( const char* name_, const char* value_, int ordpos_, int ordend_, const Position& origpos_, const Position& origend_, const std::vector<Item>& itemlist_=std::vector<Item>())
32  :PatternMatcherResultItem(name_,value_,ordpos_,ordend_,origpos_,origend_),m_itemlist(itemlist_){}
34 #if __cplusplus >= 201103L
36  PatternMatcherResult( const PatternMatcherResult& ) = default;
37  PatternMatcherResult& operator= ( PatternMatcherResult&& ) = default;
38  PatternMatcherResult& operator= ( const PatternMatcherResult& ) = default;
39 #else
41  :PatternMatcherResultItem(o),m_itemlist(o.m_itemlist){}
42 #endif
45 
47  const std::vector<Item>& items() const {return m_itemlist;}
48 
49 private:
50  std::vector<Item> m_itemlist;
51 };
52 
53 
54 }} //namespace
55 #endif
56 
const std::vector< Item > & items() const
List of result items defined by variables assigned to nodes of the pattern of the match...
Definition: patternMatcherResult.hpp:47
~PatternMatcherResult()
Destructor.
Definition: patternMatcherResult.hpp:44
PatternMatcherResult()
Default constructor.
Definition: patternMatcherResult.hpp:28
PatternMatcherResult(const char *name_, const char *value_, int ordpos_, int ordend_, const Position &origpos_, const Position &origend_, const std::vector< Item > &itemlist_=std::vector< Item >())
Constructor.
Definition: patternMatcherResult.hpp:31
PatternMatcherResult(const PatternMatcherResult &o)
Copy constructor.
Definition: patternMatcherResult.hpp:40
Structure desribing a result item of a token pattern matcher.
analyzer::PatternMatcherResultItem Item
Definition: patternMatcherResult.hpp:25
Result item structure of a pattern match result.
Definition: patternMatcherResultItem.hpp:19
Structure desribing a result of a token pattern matcher.
Definition: patternMatcherResult.hpp:21
Structure describing a position in a document source by segment and offset.
Definition: position.hpp:22