13 #ifndef OGLPLUS_OPT_APPLICATION_1107121519_HPP 
   14 #define OGLPLUS_OPT_APPLICATION_1107121519_HPP 
   16 #include <oglplus/config/compiler.hpp> 
   17 #include <oglplus/utils/filesystem.hpp> 
   32     static std::string& _app_rel_path(
void)
 
   33     OGLPLUS_NOEXCEPT(
true)
 
   35         static std::string str;
 
   39     static std::string& _app_name(
void)
 
   40     OGLPLUS_NOEXCEPT(
true)
 
   42         static std::string str;
 
   46 #if !OGLPLUS_NO_DEFAULTED_FUNCTIONS 
   60     static void ParseCommandLineOptions(
int argc, 
const char** argv)
 
   62         OGLPLUS_FAKE_USE(argc);
 
   66         assert(*argv[0] != 0);
 
   68         const char* p = argv[0];
 
   72             if(aux::IsFilesysPathSep(p, 1)) s = p;
 
   79             _app_rel_path() = std::string(argv[0], s+1);
 
   80             _app_name() = std::string(s+1, p);
 
   82         else _app_name() = std::string(argv[0], p);
 
   85     static void ParseCommandLineOptions(
int argc, 
char** argv)
 
   87         ParseCommandLineOptions(argc, (
const char**)argv);
 
   96     OGLPLUS_NOEXCEPT(true)
 
   98         return _app_rel_path();
 
  102     static const std::string& 
Name(
void)
 
  103     OGLPLUS_NOEXCEPT(true)
 
  111 #endif // include guard 
A monostate class wrapping application and startup options-related things. 
Definition: application.hpp:29
 
static const std::string & RelativePath(void)
Returns the path relative to the applications executable from CWD. 
Definition: application.hpp:95
 
Application(void)=default
Default constructor. 
 
static const std::string & Name(void)
Returns the application executable base name. 
Definition: application.hpp:102