23 #ifndef __ccxx_Application_hxx 24 #define __ccxx_Application_hxx 58 CommandOption(
char opt,
const String& longOpt,
const String& argName,
61 inline bool hasOpt()
const 62 {
return(_opt !=
NUL); }
64 inline bool hasLongOpt()
const 65 {
return(! _longOpt.
isNull()); }
67 inline char getOpt()
const 70 inline String getLongOpt()
const 73 inline bool hasArg()
const {
return(_hasArg); }
75 inline const String& getArgDesc()
const {
return(_argDesc); }
76 inline const String& getArgName()
const {
return(_argName); }
79 class CommandOptionList;
96 const String& compileDate =
"",
97 const String& compileTime =
"");
115 virtual void shutdown();
143 bool registerOption(
char opt,
const String& longOpt,
159 bool parseOptions(
int argc,
char** argv,
int& index);
181 virtual bool processOption(
char opt,
const String& longOpt,
185 virtual void printUsage();
191 void printError(
const char* message, ...);
197 CommandOptionList* _options;
203 void buildUsageText();
213 static void _sighandler(
int sig);
218 #endif // __ccxx_Application_hxx
bool isNull() const
Test if the string is null.
Definition: String.c++:375
#define COMMONCPP_API
Definition: Common.h++:126
A flexible, reference counted, copy-on-write, thread-safe, nullable string.
Definition: String.h++:50
Base functionality for an application, including command-line argument parsing and a shutdown handler...
Definition: Application.h++:42
#define NUL
The NUL character (ASCII value 0).
Definition: Common.h++:240
static const String null
The null string.
Definition: String.h++:1128
Definition: AllocationMap.c++:25