#include <rfc822.h>
Public Member Functions | |
| virtual | ~rfc822 () |
| rfc822 () | |
| rfc822 (const rfc822 &arg) | |
| rfc822 & | operator= (const rfc822 &arg) |
| void | set (const rcstring &name, const rcstring &value) |
| void | set_long (const char *name, long value) |
| void | set (const char *name, const char *value) |
| void | set_minimalist (const rcstring &name, const rcstring &value) |
| void | set (const rcstring &name, long value) |
| void | set (const rcstring &name, unsigned long value) |
| void | set (const rcstring &name, bool value) |
| bool | is_set (const rcstring &name) const |
| const rcstring & | get (const rcstring &name) |
| rcstring | get (const rcstring &name) const |
| rcstring | get_or_die (const rcstring &name) const |
| double | get_real (const rcstring &name, double dflt=0) const |
| long | get_long (const rcstring &name, long dflt=0) const |
| unsigned long | get_ulong (const rcstring &name) |
| void | load (const input::pointer &src) |
| void | load_from_file (const rcstring &filename) |
| void | optional_load_from_file (const rcstring &filename) |
| void | store (const output::pointer &dst) |
| void | store_to_file (const rcstring &filename) |
| bool | empty () const |
| void | keys (rcstring_list &result) const |
| void | clear () |
| void | operator+= (const rfc822 &rhs) |
| rfc822 | operator+ (const rfc822 &rhs) const |
| void | unset (const rcstring &name) |
| void | fatal_error (const char *fmt,...) const |
Static Public Member Functions | |
| static rcstring | date () |
Static Private Member Functions | |
| static rcstring | sanitize_name (const rcstring &name) |
Private Attributes | |
| symtab< rcstring > | database |
Definition at line 32 of file rfc822.h.
| virtual rfc822::~rfc822 | ( | ) | [virtual] |
The destructor.
| rfc822::rfc822 | ( | ) |
The default constructor.
| rfc822::rfc822 | ( | const rfc822 & | arg | ) |
The copy constructor.
| void rfc822::set_long | ( | const char * | name, | |
| long | value | |||
| ) |
| void rfc822::set | ( | const char * | name, | |
| const char * | value | |||
| ) |
| void rfc822::set | ( | const rcstring & | name, | |
| long | value | |||
| ) |
| void rfc822::set | ( | const rcstring & | name, | |
| unsigned long | value | |||
| ) |
| void rfc822::set | ( | const rcstring & | name, | |
| bool | value | |||
| ) |
| bool rfc822::is_set | ( | const rcstring & | name | ) | const |
The is_set method is used to determine if a given header record has been set. (Note that even if the value is the empty string, it is still considered to have been set.)
| name | The name of the header record to test for. |
| double rfc822::get_real | ( | const rcstring & | name, | |
| double | dflt = 0 | |||
| ) | const |
| long rfc822::get_long | ( | const rcstring & | name, | |
| long | dflt = 0 | |||
| ) | const |
| unsigned long rfc822::get_ulong | ( | const rcstring & | name | ) |
| void rfc822::load | ( | const input::pointer & | src | ) |
| void rfc822::load_from_file | ( | const rcstring & | filename | ) |
The load_from_file method is used to load the database contents by reading from a file. Blank lines and # comments are ignored.
| filename | The input to read the data from. |
| void rfc822::optional_load_from_file | ( | const rcstring & | filename | ) |
The optional_load_from_file method is used to load the database contents by reading from a file. Blank lines and # comments are ignored. If the file does not exist, it is silently ignored.
| filename | The input to read the data from. |
| void rfc822::store | ( | const output::pointer & | dst | ) |
The store method is used to dump the database out as an RFC 822 compliant header, followed by a single blank line.
| dst | The output stream on which to write the data. |
| void rfc822::store_to_file | ( | const rcstring & | filename | ) |
The store_to_file method is used to dump the database to a file. It calls the strore method to do all the work.
| filename | The filename into which to write the data. |
| bool rfc822::empty | ( | ) | const [inline] |
The empty method is used to determine whether or not the database currently had no data.
Definition at line 273 of file rfc822.h.
References database, and symtab< value_type_t >::empty().
| static rcstring rfc822::date | ( | ) | [static] |
The date class method is used to obtain the current date and time, conforming to RFC 822 format.
| void rfc822::keys | ( | rcstring_list & | result | ) | const [inline] |
The keys method is used to obtain the keys to the database.
Definition at line 284 of file rfc822.h.
References database, and symtab< value_type_t >::keys().
| void rfc822::clear | ( | ) |
The clear method is used to discard all settings from the database.
| void rfc822::operator+= | ( | const rfc822 & | rhs | ) |
The add-in-situ operator may be used to merge two sets of attributes. The right hand side wins in case of an overlap.
| rhs | The right hand side of the expression |
The addition operator may be used to merge two sets of attributes. The right hand side wins in case of an overlap.
| rhs | The right hand side of the expression |
| void rfc822::unset | ( | const rcstring & | name | ) |
The unset method may be used to discard a record from the meta data. It is not an error if it is alreday gone.
| name | The name of the record to remove |
| void rfc822::fatal_error | ( | const char * | fmt, | |
| ... | ||||
| ) | const |
The fatal_error method is used to report fatal errors agains this meta data.
| fmt | The format string, used to describe the rest of the arguments. See printf(3) for a description. |
The sanitize_name class method is used to normalize the name into lower case, with non-alpha-numberics turned into minus symbols. This is because RFC 822 header names are case-insensitive.
| name | The name to be sanitized. |
symtab<rcstring> rfc822::database [private] |
1.5.3