#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/tokenizer.hpp>
#include <boost/program_options.hpp>
#include <stdair/stdair_basic_types.hpp>
#include <stdair/basic/BasConst_General.hpp>
#include <stdair/basic/BasDBParams.hpp>
#include <stdair/basic/BasLogParams.hpp>
#include <trademgen/TRADEMGEN_Service.hpp>
#include <trademgen/config/trademgen-paths.hpp>
Go to the source code of this file.
typedef std::vector<std::string> WordList_T |
Definition at line 24 of file trademgen_with_db.cpp.
void tokeniseStringIntoWordList | ( | const std::string & | iPhrase, |
WordList_T & | ioWordList | ||
) |
Definition at line 67 of file trademgen_with_db.cpp.
Referenced by readConfiguration().
std::string createStringFromWordList | ( | const WordList_T & | iWordList | ) |
Definition at line 89 of file trademgen_with_db.cpp.
Referenced by readConfiguration().
std::ostream& operator<< | ( | std::ostream & | os, |
const std::vector< T > & | v | ||
) |
Definition at line 108 of file trademgen_with_db.cpp.
int readConfiguration | ( | int | argc, |
char * | argv[], | ||
bool & | ioIsBuiltin, | ||
stdair::RandomSeed_T & | ioRandomSeed, | ||
std::string & | ioQueryString, | ||
stdair::Filename_T & | ioInputFilename, | ||
std::string & | ioLogFilename, | ||
std::string & | ioDBUser, | ||
std::string & | ioDBPasswd, | ||
std::string & | ioDBHost, | ||
std::string & | ioDBPort, | ||
std::string & | ioDBDBName | ||
) |
Read and parse the command line options.
Definition at line 118 of file trademgen_with_db.cpp.
References K_TRADEMGEN_DEFAULT_BUILT_IN_INPUT, K_TRADEMGEN_DEFAULT_QUERY_STRING, tokeniseStringIntoWordList(), K_TRADEMGEN_DEFAULT_RANDOM_SEED, K_TRADEMGEN_DEFAULT_INPUT_FILENAME, K_TRADEMGEN_DEFAULT_LOG_FILENAME, K_TRADEMGEN_DEFAULT_DB_USER, K_TRADEMGEN_DEFAULT_DB_PASSWD, K_TRADEMGEN_DEFAULT_DB_HOST, K_TRADEMGEN_DEFAULT_DB_PORT, K_TRADEMGEN_DEFAULT_DB_DBNAME, K_TRADEMGEN_EARLY_RETURN_STATUS, PACKAGE_NAME, PACKAGE_VERSION, PREFIXDIR, and createStringFromWordList().
int main | ( | int | argc, |
char * | argv[] | ||
) |
const std::string K_TRADEMGEN_DEFAULT_LOG_FILENAME("trademgen_with_db.log") |
Default name and location for the log file.
Referenced by readConfiguration().
const std::string K_TRADEMGEN_DEFAULT_INPUT_FILENAME(STDAIR_SAMPLE_DIR"/demand01.csv") |
Default name and location for the (CSV) input file.
Referenced by readConfiguration().
const bool K_TRADEMGEN_DEFAULT_BUILT_IN_INPUT = false |
Default for the input type. It can be either built-in or provided by an input file. That latter must then be given with the -i option.
Definition at line 43 of file trademgen_with_db.cpp.
const stdair::RandomSeed_T K_TRADEMGEN_DEFAULT_RANDOM_SEED |
stdair::DEFAULT_RANDOM_SEED
Default random generation seed (e.g., 120765987).
Definition at line 48 of file trademgen_with_db.cpp.
const std::string K_TRADEMGEN_DEFAULT_QUERY_STRING("my good old query") |
Default query string.
Referenced by readConfiguration().
const std::string K_TRADEMGEN_DEFAULT_DB_USER("dsim") |
Default parameters for the database connection.
Referenced by readConfiguration().
const std::string K_TRADEMGEN_DEFAULT_DB_PASSWD("dsim") |
Referenced by readConfiguration().
const std::string K_TRADEMGEN_DEFAULT_DB_DBNAME("sim_dsim") |
Referenced by readConfiguration().
const std::string K_TRADEMGEN_DEFAULT_DB_HOST("localhost") |
Referenced by readConfiguration().
const std::string K_TRADEMGEN_DEFAULT_DB_PORT("3306") |
Referenced by readConfiguration().
const int K_TRADEMGEN_EARLY_RETURN_STATUS = 99 |
Early return status (so that it can be differentiated from an error).
Definition at line 115 of file trademgen_with_db.cpp.