|
nis-util
1.0.D108
|
#include <section.h>
Public Types | |
| typedef boost::shared_ptr < configuration_section > | pointer |
| typedef configuration_item::level_t | level_t |
Public Member Functions | |
| virtual | ~configuration_section () |
| rcstring | get_string_value (const rcstring &item_name) const |
| bool | get_bool_value (const rcstring &item_name) const |
| long | get_long_value (const rcstring &item_name) const |
| void | set (const configuration_item::pointer &item) |
| bool | is_set (const rcstring &item_name) const |
| void | print (void) const |
Static Public Member Functions | |
| static pointer | create (const rcstring &name) |
Private Types | |
| typedef std::map< rcstring, configuration_item::pointer > | items_t |
Private Member Functions | |
| configuration_section (const rcstring &name) | |
| configuration_section () | |
| configuration_section (const configuration_section &rhs) | |
| configuration_section & | operator= (const configuration_section &rhs) |
Private Attributes | |
| rcstring | name |
| items_t | items |
The configuration_section class is used to represent one section of a configuration file, filled with configuration_item instances.
typedef std::map<rcstring, configuration_item::pointer> configuration_section::items_t [private] |
| typedef boost::shared_ptr<configuration_section> configuration_section::pointer |
| configuration_section::~configuration_section | ( | ) | [virtual] |
The destructor.
Definition at line 22 of file section.cc.
| configuration_section::configuration_section | ( | const rcstring & | name | ) | [private] |
The constructor. It is private on purpose, use the create class method instead.
| name | The name of the section. |
Definition at line 27 of file section.cc.
| configuration_section::configuration_section | ( | ) | [private] |
The default constructor. Do not use.
| configuration_section::configuration_section | ( | const configuration_section & | rhs | ) | [private] |
The copy constructor. Do not use.
| rhs | The right hand side of the initialization. |
| configuration_section::pointer configuration_section::create | ( | const rcstring & | name | ) | [static] |
The create class method is used to create new dynamically allocated instances of this class.
| name | The name of the section. |
Definition at line 34 of file section.cc.
| bool configuration_section::get_bool_value | ( | const rcstring & | item_name | ) | const |
The get_bool_value method is used ot obtain the boolean value of the named configuration item.
| item_name | The name of the item of interest. |
Definition at line 61 of file section.cc.
| long configuration_section::get_long_value | ( | const rcstring & | item_name | ) | const |
The get_long_value method is used ot obtain the integer value of the named configuration item.
| item_name | The name of the item of interest. |
Definition at line 73 of file section.cc.
| rcstring configuration_section::get_string_value | ( | const rcstring & | item_name | ) | const |
The get_string_value method is used ot obtain the string value of the named configuration item.
| item_name | The name of the item of interest. |
Definition at line 49 of file section.cc.
| bool configuration_section::is_set | ( | const rcstring & | item_name | ) | const |
The is_set method may be used to determine whether or not a particular configuration item is available.
| item_name | The name of the item of interest. |
Definition at line 41 of file section.cc.
| configuration_section& configuration_section::operator= | ( | const configuration_section & | rhs | ) | [private] |
The assignment operator. Do not use.
| rhs | The right hand side of the assignment. |
| void configuration_section::print | ( | void | ) | const |
| void configuration_section::set | ( | const configuration_item::pointer & | item | ) |
The set method is used to set a configuration item. If we already have a value for that name, it will only be replaced if it has a higher priority.
Definition at line 85 of file section.cc.
items_t configuration_section::items [private] |
rcstring configuration_section::name [private] |
1.7.6.1