5 #ifndef BPP_APP_BPPAPPLICATION_H 6 #define BPP_APP_BPPAPPLICATION_H 9 #include "../Exceptions.h" 21 mutable std::map<std::string, std::string>
params_;
27 BppApplication(
int argc,
char* argv[],
const std::string& name,
bool verbose =
true,
int warningLevel = 1);
34 virtual const std::map<std::string, std::string>&
getParams()
const {
return params_; }
37 virtual const std::string&
getParam(
const std::string& name)
const 39 if (params_.find(name) == params_.end())
throw Exception(
"BppApplication::getParam(). Parameter '" + name +
"' not found.");
43 virtual std::string&
getParam(
const std::string& name) {
return params_[name]; }
49 virtual void help(
const std::string& program)
const;
52 #endif // BPP_APP_BPPAPPLICATION_H virtual const std::map< std::string, std::string > & getParams() const
virtual ~BppApplication()
virtual bool isVerbose() const
virtual std::map< std::string, std::string > & getParams()
virtual const std::string & getParam(const std::string &name) const
BppApplication(int argc, char *argv[], const std::string &name, bool verbose=true, int warningLevel=1)
std::map< std::string, std::string > params_
virtual void help(const std::string &program) const
virtual std::string & getParam(const std::string &name)
virtual int getWarningLevel() const
virtual void startTimer()
Exception base class. Overload exception constructor (to control the exceptions mechanism). Destructor is already virtual (from std::exception)