strusAnalyzer  0.17
contentStatisticsResult.hpp
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2018 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_CONTENT_STATISTICS_RESULT_HPP_INCLUDED
11 #define _STRUS_ANALYZER_CONTENT_STATISTICS_RESULT_HPP_INCLUDED
13 #include <vector>
14 
16 namespace strus {
17 namespace analyzer {
18 
21 {
22 public:
24  :m_nofDocuments(0),m_items(){}
25  ContentStatisticsResult( int nofDocuments_, const std::vector<analyzer::ContentStatisticsItem>& items_)
26  :m_nofDocuments(nofDocuments_),m_items(items_){}
27 #if __cplusplus >= 201103L
30  ContentStatisticsResult& operator= ( ContentStatisticsResult&& ) = default;
31  ContentStatisticsResult& operator= ( const ContentStatisticsResult& ) = default;
32 #else
34  :m_nofDocuments(o.m_nofDocuments),m_items(o.m_items){}
35 #endif
36 
38  int nofDocuments() const {return m_nofDocuments;}
40  const std::vector<analyzer::ContentStatisticsItem>& items() const {return m_items;}
41 
42 private:
43  int m_nofDocuments;
44  std::vector<analyzer::ContentStatisticsItem> m_items;
45 };
46 
47 }}//namespace
48 #endif
49 
ContentStatisticsResult(const ContentStatisticsResult &o)
Definition: contentStatisticsResult.hpp:33
Defines the content statistics result from a collection sample.
Definition: contentStatisticsResult.hpp:20
Structure describing an item of the structure statistics analysis of a document.
ContentStatisticsResult(int nofDocuments_, const std::vector< analyzer::ContentStatisticsItem > &items_)
Definition: contentStatisticsResult.hpp:25
const std::vector< analyzer::ContentStatisticsItem > & items() const
Get the statistic items.
Definition: contentStatisticsResult.hpp:40
ContentStatisticsResult()
Definition: contentStatisticsResult.hpp:23
int nofDocuments() const
Get the number of sample documents.
Definition: contentStatisticsResult.hpp:38