1 #ifndef WIBBLE_COMMANDLINE_CORE_H
2 #define WIBBLE_COMMANDLINE_CORE_H
17 BadOption(
const std::string& error,
const std::string&
context = std::string(
"parsing commandline options")) throw ()
21 virtual const char*
type()
const throw () {
return "BadOption"; }
22 virtual std::string
desc()
const throw () {
return m_error; }
27 namespace commandline {
29 class ArgList :
public std::list<std::string>
45 static bool isSwitch(
const char* str);
46 static bool isSwitch(
const std::string& str);
47 static bool isSwitch(
const const_iterator& iter);
64 std::set<Managed*> components;
66 Managed* addManaged(
Managed* o) { components.insert(o);
return o; }
70 for (std::set<Managed*>::const_iterator i = components.begin();
71 i != components.end(); ++i)
76 T*
add(T* item) { addManaged(item);
return item; }