OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
OPENTREP::OpenTrepSearcher Struct Reference

API wrapper around the OpenTREP C++ API, so that Python scripts can use it seamlessly. More...

Public Member Functions

std::string getPaths ()
 
std::string index ()
 
std::string generate (const std::string &iOutputFormatString, const NbOfMatches_T &iNbOfDraws)
 
bp::object generateToPB (const NbOfMatches_T &iNbOfDraws)
 
std::string search (const std::string &iOutputFormatString, const std::string &iTravelQuery)
 
bp::object searchToPB (const std::string &iTravelQuery)
 
 OpenTrepSearcher ()
 
 OpenTrepSearcher (const OpenTrepSearcher &iOpenTrepSearcher)
 
 ~OpenTrepSearcher ()
 
bool init (const std::string &iPORFilePath, const std::string &iTravelDBFilePath, const std::string &iSQLDBTypeStr, const std::string &iSQLDBConnStr, const unsigned short &iDeploymentNumber, const bool iDontIndexIATAPOR, const bool iIndexPORInXapian, const bool iAddPORInDB, const std::string &iLogFilePath)
 
bool finalize ()
 

Detailed Description

API wrapper around the OpenTREP C++ API, so that Python scripts can use it seamlessly.

Definition at line 30 of file pyopentrep.cpp.

Constructor & Destructor Documentation

◆ OpenTrepSearcher() [1/2]

OPENTREP::OpenTrepSearcher::OpenTrepSearcher ( )
inline

Default constructor.

Definition at line 691 of file pyopentrep.cpp.

Referenced by OpenTrepSearcher().

◆ OpenTrepSearcher() [2/2]

OPENTREP::OpenTrepSearcher::OpenTrepSearcher ( const OpenTrepSearcher & iOpenTrepSearcher)
inline

Default copy constructor.

Definition at line 697 of file pyopentrep.cpp.

References OpenTrepSearcher().

◆ ~OpenTrepSearcher()

OPENTREP::OpenTrepSearcher::~OpenTrepSearcher ( )
inline

Default constructor.

Definition at line 705 of file pyopentrep.cpp.

Member Function Documentation

◆ getPaths()

std::string OPENTREP::OpenTrepSearcher::getPaths ( )
inline

Get the file-paths for the:

  • OPTD-maintained list of POR (points of reference)
  • Xapian-based travel database/index

Definition at line 40 of file pyopentrep.cpp.

Referenced by BOOST_PYTHON_MODULE().

◆ index()

std::string OPENTREP::OpenTrepSearcher::index ( )
inline

Public wrapper around the indexation use case.

Definition at line 47 of file pyopentrep.cpp.

Referenced by BOOST_PYTHON_MODULE().

◆ generate()

std::string OPENTREP::OpenTrepSearcher::generate ( const std::string & iOutputFormatString,
const NbOfMatches_T & iNbOfDraws )
inline

Public wrapper around the random generation use case for most of the formats.

Definition at line 55 of file pyopentrep.cpp.

References OPENTREP::OutputFormat::getFormat().

Referenced by BOOST_PYTHON_MODULE().

◆ generateToPB()

bp::object OPENTREP::OpenTrepSearcher::generateToPB ( const NbOfMatches_T & iNbOfDraws)
inline

Public wrapper around the random generation use case for Protobuf.

Definition at line 67 of file pyopentrep.cpp.

References OPENTREP::OutputFormat::PROTOBUF.

Referenced by BOOST_PYTHON_MODULE().

◆ search()

std::string OPENTREP::OpenTrepSearcher::search ( const std::string & iOutputFormatString,
const std::string & iTravelQuery )
inline

Public wrapper around the search use case for most of the formats.

Definition at line 87 of file pyopentrep.cpp.

References OPENTREP::OutputFormat::getFormat().

Referenced by BOOST_PYTHON_MODULE().

◆ searchToPB()

bp::object OPENTREP::OpenTrepSearcher::searchToPB ( const std::string & iTravelQuery)
inline

Public wrapper around the search use case for Protobuf.

Definition at line 98 of file pyopentrep.cpp.

References OPENTREP::OutputFormat::PROTOBUF.

Referenced by BOOST_PYTHON_MODULE().

◆ init()

bool OPENTREP::OpenTrepSearcher::init ( const std::string & iPORFilePath,
const std::string & iTravelDBFilePath,
const std::string & iSQLDBTypeStr,
const std::string & iSQLDBConnStr,
const unsigned short & iDeploymentNumber,
const bool iDontIndexIATAPOR,
const bool iIndexPORInXapian,
const bool iAddPORInDB,
const std::string & iLogFilePath )
inline

Wrapper around the OPENTREP_Service C++ API. As the POR file-path is also given as parameter, both index and search use cases are possible.

Definition at line 715 of file pyopentrep.cpp.

References OPENTREP::RootException::what().

Referenced by BOOST_PYTHON_MODULE().

◆ finalize()

bool OPENTREP::OpenTrepSearcher::finalize ( )
inline

Wrapper around the search use case.

Definition at line 802 of file pyopentrep.cpp.

Referenced by BOOST_PYTHON_MODULE().


The documentation for this struct was generated from the following file: