nis-util
1.0.D108
|
#include <integer.h>
Public Member Functions | |
virtual | ~configuration_item_integer () |
Static Public Member Functions | |
static bool | candidate (const rcstring &text, long &value) |
static pointer | create_if_candidate (const source_location &locn, level_t level, const rcstring &name, const rcstring &potential_value) |
static pointer | create (const source_location &locn, level_t level, const rcstring &name, long value) |
Protected Member Functions | |
rcstring | get_string_value (void) const |
bool | get_bool_value (void) const |
long | get_long_value (void) const |
Private Member Functions | |
configuration_item_integer (const source_location &locn, level_t level, const rcstring &name, long value) | |
configuration_item_integer () | |
configuration_item_integer (const configuration_item_integer &rhs) | |
configuration_item_integer & | operator= (const configuration_item_integer &rhs) |
Private Attributes | |
long | value |
The configuration_item_integer class is used to represent an integer valued configuration item.
configuration_item_integer::~configuration_item_integer | ( | ) | [virtual] |
The destructor.
Definition at line 24 of file integer.cc.
configuration_item_integer::configuration_item_integer | ( | const source_location & | locn, |
level_t | level, | ||
const rcstring & | name, | ||
long | value | ||
) | [private] |
The constructor. It is private on purpose, use the create class method instead.
locn | The source file location of this configuration item. |
level | The precedence level of this configuration item. |
name | The name of this configuration item. |
value | The integer value of this configuration item. |
Definition at line 29 of file integer.cc.
configuration_item_integer::configuration_item_integer | ( | ) | [private] |
The default constructor. Do not use.
configuration_item_integer::configuration_item_integer | ( | const configuration_item_integer & | rhs | ) | [private] |
The copy constructor. Do not use.
rhs | The right hand side of the initialization. |
bool configuration_item_integer::candidate | ( | const rcstring & | text, |
long & | value | ||
) | [static] |
The candidate class method is used to determine whether or not the given text could be an integer value, and thus, the text could be used to build an integer configuration item.
text | The text that may, or may not, be a representation of an integer. |
value | If it is an integer, the value is returned here. |
Definition at line 54 of file integer.cc.
configuration_item_integer::pointer configuration_item_integer::create | ( | const source_location & | locn, |
level_t | level, | ||
const rcstring & | name, | ||
long | value | ||
) | [static] |
The create class method is used to create new dynamically allocated instances of this class.
locn | The source file location of this configuration item. |
level | The precedence level of this configuration item. |
name | The name of this configuration item. |
value | The integer value of this configuration item. |
Definition at line 42 of file integer.cc.
configuration_item_integer::pointer configuration_item_integer::create_if_candidate | ( | const source_location & | locn, |
level_t | level, | ||
const rcstring & | name, | ||
const rcstring & | potential_value | ||
) | [static] |
The create_if_candidate class method is used to create new dynamically allocated instances of this class, if the string value presented looks like a boolean value.
locn | The source file location of this configuration item. |
level | The precedence level of this configuration item. |
name | The name of this configuration item. |
potential_value | The string value of this configuration item. |
Definition at line 64 of file integer.cc.
bool configuration_item_integer::get_bool_value | ( | void | ) | const [protected, virtual] |
The get_string_value method is used to obtain the value of this configuration item, as a boolean.
Implements configuration_item.
Definition at line 92 of file integer.cc.
long configuration_item_integer::get_long_value | ( | void | ) | const [protected, virtual] |
The get_string_value method is used to obtain the value of this configuration item, as an integer.
Implements configuration_item.
Definition at line 84 of file integer.cc.
rcstring configuration_item_integer::get_string_value | ( | void | ) | const [protected, virtual] |
The get_string_value method is used to obtain the value of this configuration item, as a string.
Implements configuration_item.
Definition at line 75 of file integer.cc.
configuration_item_integer& configuration_item_integer::operator= | ( | const configuration_item_integer & | rhs | ) | [private] |
The assignment operator. Do not use.
rhs | The right hand side of the assignment. |
long configuration_item_integer::value [private] |