hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
main.cpp
Go to the documentation of this file.
1 #include <Refine.hpp>
2 #include <CWords.hpp>
3 #include <OutDataRefine.hpp>
4 #include <string>
5 #include <vector>
6 #include <iostream>
7 #include <streambuf>
8 #include <Poco/String.h>
9 #include <Poco/StringTokenizer.h>
10 
11 
12 int main()
13 {
14  std::string content(std::istreambuf_iterator<char>(std::cin), std::istreambuf_iterator<char>());
16  Poco::SharedPtr<HCE::DataBase> inData(new HCE::InDataRefine(HCE::CT_REFINE, 0, 0, content));
17  Poco::SharedPtr<HCE::DataBase> outData = refine.process(inData);
18  std::vector<HCE::CWords> cWords = outData.cast<HCE::OutDataRefine>()->getCWords();
19  std::vector<HCE::RWords> rWords = outData.cast<HCE::OutDataRefine>()->getRWords();
20  std::cout << "Content length: " << content.length() << " byte(s)" << std::endl;
21  return 0;
22 }