clingo
|
#include <typed_value.h>
Public Types | |
typedef detail::Parser< T >::type | parser_type |
typedef detail::Notifier < const T * > | notifier_type |
Public Types inherited from ProgramOptions::Value | |
enum | State { value_unassigned = 0, value_defaulted = 1, value_fixed = 2 } |
Possible (tentative) states of an option value. More... | |
enum | DescType { desc_name = 1, desc_default = 2, desc_implicit = 4 } |
Possible value descriptions. More... | |
Public Member Functions | |
NotifiedValue (T *(*cf)(), const notifier_type &n, parser_type p) | |
NotifiedValue< T > * | storeTo (T &obj) |
bool | doParse (const std::string &name, const std::string &value) |
Public Member Functions inherited from ProgramOptions::Value | |
virtual | ~Value () |
State | state () const |
Returns the current state of this value. More... | |
Value * | state (Value::State s) |
const char * | arg () const |
Returns the name of this value. More... | |
Value * | arg (const char *n) |
Value * | alias (char c) |
Sets an alias name for the corresponding option. More... | |
char | alias () const |
Value * | level (DescriptionLevel lev) |
Sets a description level for the corresponding option. More... | |
DescriptionLevel | level () const |
Returns the description level of the corresponding option. More... | |
bool | isNegatable () const |
Returns true if this is the value of an negatable option. More... | |
Value * | negatable () |
bool | isImplicit () const |
Returns true if value can be implicitly created from an empty string. More... | |
bool | isFlag () const |
Returns true if this is the value of an option flag. More... | |
Value * | flag () |
bool | isComposing () const |
Returns true if the value of this option can be composed from multiple source. More... | |
Value * | composing () |
Value * | defaultsTo (const char *v) |
const char * | defaultsTo () const |
Returns the default value of this or 0 none exists. More... | |
Value * | implicit (const char *str) |
const char * | implicit () const |
Returns the implicit value of this or 0 if isImplicit() == false. More... | |
bool | parse (const std::string &name, const std::string &value, State st=value_fixed) |
Parses the given string and updates the value's state. More... | |
Protected Attributes | |
union { | |
T * address | |
T *(* create )() | |
} | value_ |
parser_type | parser_ |
notifier_type | notify_ |
Additional Inherited Members | |
Protected Types inherited from ProgramOptions::Value | |
enum | Property { property_implicit = 1, property_flag = 3, property_composing = 4, property_negatable = 8, property_location =16, not_a_property =32 } |
typedef unsigned char | byte_t |
Protected Member Functions inherited from ProgramOptions::Value | |
Value (byte_t flagSet, State initial=value_unassigned) | |
void | setProperty (Property f) |
void | clearProperty (Property f) |
bool | hasProperty (Property f) const |
bool | state (bool b, State s) |
const char * | desc (DescType t) const |
Value * | desc (DescType t, const char *d) |
typedef detail::Notifier<const T*> ProgramOptions::NotifiedValue< T >::notifier_type |
typedef detail::Parser<T>::type ProgramOptions::NotifiedValue< T >::parser_type |
|
inline |
|
inlinevirtual |
|
inline |
T* ProgramOptions::NotifiedValue< T >::address |
T*(* ProgramOptions::NotifiedValue< T >::create)() |
|
protected |
|
protected |
union { ... } ProgramOptions::NotifiedValue< T >::value_ |