/** * \file main.cpp * \brief This program show a basic use of the claw::application class. * \author Julien Jorgex */ #include #include #include /** * \brief This class represents the application. */ class my_app : public claw::application { public: my_app( int& argc, char** &argv ); int run(); }; // class my_app /*----------------------------------------------------------------------------*/ /** * \brief Constructor. Parse the command line and initialize the application. */ my_app::my_app( int& argc, char** &argv ) : claw::application(argc, argv) { m_arguments.add_short("-b", "Sample boolean argument.", true); m_arguments.add_long("--string", "Print a string.", true, "any_string"); m_arguments.add("-h", "--help", "Print this help screen.", true); m_arguments.parse(argc, argv); if ( m_arguments.get_bool("-h") ) m_arguments.help( "more_string..." ); std::cout << "Testing error_level:" << std::endl; claw::logger << claw::log_error << "error_level:program_name == " << m_arguments.get_program_name() << claw::lendl; std::cout << "Testing warning_level:" << std::endl; for (int i=0; i