HCE project C++ developers source code library
1.1.1
HCE project developer library
Main Page
Namespaces
Classes
Files
File List
File Members
HCE project C++ developers source code library
HCE project C++ developer source code library
Namespaces
Classes
Files
File List
sources
algorithms
applicationFramework
asmXMLParser
base64
coreDumpChecker
DRCE
exec
HCECSM
jsonObjExtractor
kvdb
messageStream
reduceAdditionCore
reduceCore
reduceDRCE
reduceHandler
reduceSphinx
refine
serializable
sphinx
src
SphinxAdminCommand.cpp
SphinxAdminCommand.hpp
SphinxConfigCreator.cpp
SphinxConfigCreator.hpp
SphinxConfigOptions.cpp
SphinxConfigOptions.hpp
SphinxDataFile.cpp
SphinxDataFile.hpp
SphinxDataSource.cpp
SphinxDataSource.hpp
SphinxDataSourceParameters.cpp
SphinxDataSourceParameters.hpp
SphinxError.hpp
SphinxFilters.cpp
SphinxFilters.hpp
SphinxFunctionalObject.cpp
SphinxFunctionalObject.hpp
SphinxIndexer.cpp
SphinxIndexer.hpp
SphinxInputJsonMessage.cpp
SphinxInputJsonMessage.hpp
SphinxInputJsonMessageIndex.cpp
SphinxInputJsonMessageIndex.hpp
SphinxInputJsonMessageManage.cpp
SphinxInputJsonMessageManage.hpp
SphinxInputJsonMessageSearch.cpp
SphinxInputJsonMessageSearch.hpp
SphinxMatchInfo.cpp
SphinxMatchInfo.hpp
SphinxMessageConst.hpp
SphinxNodeOptions.cpp
SphinxNodeOptions.hpp
SphinxOutputJsonMessage.cpp
SphinxOutputJsonMessage.hpp
SphinxRequestInfo.cpp
SphinxRequestInfo.hpp
SphinxResultData.cpp
SphinxResultData.hpp
SphinxResultDataItem.hpp
SphinxResultDataMemoryManager.cpp
SphinxResultDataMemoryManager.hpp
SphinxResultDataSerializator.cpp
SphinxResultDataSerializator.hpp
SphinxSchemaFile.cpp
SphinxSchemaFile.hpp
SphinxSearcher.cpp
SphinxSearcher.hpp
SphinxSearchInterface.cpp
SphinxSearchInterface.hpp
SphinxWeightCalculator.cpp
SphinxWeightCalculator.hpp
types
xmlCleaner
main.cpp
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
SphinxConfigCreator.hpp
Go to the documentation of this file.
1
/*
2
* @file SphinxConfigCreator.hpp
3
*
4
* Creates Sphinx config file from Poco properties
5
*
6
* @author Eduard <eduard.hce.cluster@gmail.com>
7
* @link http://hierarchical-cluster-engine.com/
8
* @copyright Copyright © 2013 IOIX Ukraine
9
* @license http://hierarchical-cluster-engine.com/license/
10
* @package HCE project node API
11
* @since 0.1
12
*/
13
14
#ifndef SPHINXCONFIGCREATOR_HPP
15
#define SPHINXCONFIGCREATOR_HPP
16
17
#include <Poco/AutoPtr.h>
18
#include <Poco/Util/PropertyFileConfiguration.h>
19
#include <Poco/FileStream.h>
20
#include <iostream>
21
#include <Poco/StringTokenizer.h>
22
#include <sstream>
23
#include <fstream>
24
#include <map>
25
#include <string>
26
27
namespace
HCE {
28
namespace
sphinx {
29
class
SphinxConfigCreator
:
public
Poco::Util::PropertyFileConfiguration {
30
private
:
31
typedef
std::string _section;
32
typedef
std::string _key;
33
typedef
std::string _value;
34
private
:
35
std::map<_section,std::vector<std::pair<_key,_value>>> data;
36
public
:
37
friend
std::ostream&
operator <<
(std::ostream& stream,
SphinxConfigCreator
& objSphinxConfig) {
38
stream << objSphinxConfig.
getSphinxFileConfiguration
();
39
return
stream;
40
}
41
public
:
42
SphinxConfigCreator
(
void
);
43
SphinxConfigCreator
(
const
std::string& path);
44
SphinxConfigCreator
(
const
Poco::Util::PropertyFileConfiguration&
object
);
45
~SphinxConfigCreator
(
void
) throw ();
46
public:
47
//inserts data from propertyFileConfiguration to the map `data`
48
void
parse
(
void
);
49
public:
50
void
setPropertyFileConfiguration
(const std::
string
& path);
51
std::
string
getSphinxFileConfiguration
(
void
);
52
public:
53
void
cloneSphinxConfigSection
(const std::
string
& oldName, const std::
string
& newName);
54
void
renameSphinxConfigSection
(const std::
string
& oldName, const std::
string
& newName);
55
void
deleteSphinxConfigSection
(const std::
string
&
sectionName
);
56
};
57
}
58
}
59
60
61
#endif
/* SPHINXCONFIGCREATOR_HPP */
sources
sphinx
src
SphinxConfigCreator.hpp
Generated on Mon Jan 13 2014 13:08:39 for HCE project C++ developers source code library by
1.8.1.2