#include <cassert>
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
#include <string>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/program_options.hpp>
#include <opentrep/OPENTREP_Service.hpp>
#include <opentrep/Location.hpp>
#include <opentrep/CityDetails.hpp>
#include <opentrep/DBType.hpp>
#include <opentrep/basic/BasConst_OPENTREP_Service.hpp>
#include <opentrep/basic/Utilities.hpp>
#include <opentrep/config/opentrep-paths.hpp>
Go to the source code of this file.
Typedefs | |
typedef std::vector< std::string > | WordList_T |
Functions | |
const std::string | K_OPENTREP_DEFAULT_LOG_FILENAME ("opentrep-indexer.log") |
int | readConfiguration (int argc, char *argv[], std::string &ioPORFilepath, std::string &ioXapianDBFilepath, std::string &ioSQLDBTypeString, std::string &ioSQLDBConnectionString, unsigned short &ioDeploymentNumber, bool &ioIncludeNonIATAPOR, bool &ioIndexPORInXapian, bool &ioAddPORInDB, std::string &ioLogFilename, std::ostringstream &oStr) |
int | main (int argc, char *argv[]) |
Variables | |
const bool | K_OPENTREP_DEFAULT_POR_INCLUDING = false |
const int | K_OPENTREP_EARLY_RETURN_STATUS = 99 |
typedef std::vector<std::string> WordList_T |
Definition at line 23 of file opentrep-indexer.cpp.
const std::string K_OPENTREP_DEFAULT_LOG_FILENAME | ( | "opentrep-indexer.log" | ) |
Default name and location for the log file.
Referenced by readConfiguration(), readConfiguration(), and readConfiguration().
int readConfiguration | ( | int | argc, |
char * | argv[], | ||
std::string & | ioPORFilepath, | ||
std::string & | ioXapianDBFilepath, | ||
std::string & | ioSQLDBTypeString, | ||
std::string & | ioSQLDBConnectionString, | ||
unsigned short & | ioDeploymentNumber, | ||
bool & | ioIncludeNonIATAPOR, | ||
bool & | ioIndexPORInXapian, | ||
bool & | ioAddPORInDB, | ||
std::string & | ioLogFilename, | ||
std::ostringstream & | oStr ) |
Read and parse the command line options.
Definition at line 52 of file opentrep-indexer.cpp.
References OPENTREP::DEFAULT_OPENTREP_ADD_IN_DB, OPENTREP::DEFAULT_OPENTREP_DEPLOYMENT_NUMBER, OPENTREP::DEFAULT_OPENTREP_INDEX_IN_XAPIAN, OPENTREP::DEFAULT_OPENTREP_MYSQL_CONN_STRING, OPENTREP::DEFAULT_OPENTREP_POR_FILEPATH, OPENTREP::DEFAULT_OPENTREP_SQL_DB_TYPE, OPENTREP::DEFAULT_OPENTREP_SQLITE_DB_FILEPATH, OPENTREP::DEFAULT_OPENTREP_XAPIAN_DB_FILEPATH, K_OPENTREP_DEFAULT_LOG_FILENAME(), K_OPENTREP_DEFAULT_POR_INCLUDING, K_OPENTREP_EARLY_RETURN_STATUS, OPENTREP::DBType::MYSQL, OPENTREP::DBType::NODB, OPENTREP::parseAndDisplayConnectionString(), and OPENTREP::DBType::SQLITE3.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] ) |
Definition at line 231 of file opentrep-indexer.cpp.
References OPENTREP::OPENTREP_Service::insertIntoDBAndXapian(), K_OPENTREP_EARLY_RETURN_STATUS, and readConfiguration().
const bool K_OPENTREP_DEFAULT_POR_INCLUDING = false |
Default flag for the including (or not) of the non-IATA-referenced POR. By default, only POR which are referenced by IATA are included. If the flag is set up at 1, then also the POR referenced by other international organizations (such ICAO or UN/LOCODE) are included.
Definition at line 44 of file opentrep-indexer.cpp.
Referenced by readConfiguration().
const int K_OPENTREP_EARLY_RETURN_STATUS = 99 |
Early return status (so that it can be differentiated from an error).
Definition at line 49 of file opentrep-indexer.cpp.
Referenced by main(), readConfiguration(), readConfiguration(), and readConfiguration().