|  | advgetopt 2.0.49
    Parse complex command line arguments and configuration files in C++. | 
#include <option_info.h>
| Public Member Functions | |
| option_info_ref (option_info::pointer_t opt) | |
| Initialize a reference to an option_info object. | |
| bool | empty () const | 
| Retrieve the length of the option's value. | |
| double | get_double () const | 
| Retrieve the referenced option as a double. | |
| long | get_long () const | 
| Retrieve the referenced option as a long. | |
| size_t | length () const | 
| Return the length of the option's value. | |
| operator bool () const | |
| Check whether the value is an empty string or not. | |
| operator std::string () const | |
| Convert the reference to a string (a.k.a. read the value) | |
| bool | operator! () const | 
| Check whether the value is an empty string or not. | |
| bool | operator!= (char const *value) const | 
| Compare this option's value with the specified string. | |
| bool | operator!= (option_info_ref const &value) const | 
| Compare this option's value with the value of option value. | |
| bool | operator!= (std::string const &value) const | 
| Compare this option's value with the specified string. | |
| std::string | operator+ (char const *value) const | 
| Append valueto this option's value. | |
| std::string | operator+ (char value) const | 
| Append the character valueto this option's value. | |
| std::string | operator+ (char32_t value) const | 
| Append the character valueto this option's value. | |
| std::string | operator+ (option_info_ref const &value) const | 
| Append the value of this valueoption to this option_info's value. | |
| std::string | operator+ (std::string const &value) const | 
| Append valueto this option's value. | |
| option_info_ref & | operator+= (char const *value) | 
| Append valueto this option's value. | |
| option_info_ref & | operator+= (char value) | 
| Append the character valueto this option's value. | |
| option_info_ref & | operator+= (char32_t value) | 
| Append the character valueto this option's value. | |
| option_info_ref & | operator+= (option_info_ref const &value) | 
| Append the value of this valueoption to this option_info's value. | |
| option_info_ref & | operator+= (std::string const &value) | 
| Append valueto this option's value. | |
| bool | operator< (char const *value) const | 
| Compare this option's value with the specified string. | |
| bool | operator< (option_info_ref const &value) const | 
| Compare this option's value with the value of option value. | |
| bool | operator< (std::string const &value) const | 
| Compare this option's value with the specified string. | |
| bool | operator<= (char const *value) const | 
| Compare this option's value with the specified string. | |
| bool | operator<= (option_info_ref const &value) const | 
| Compare this option's value with the value of option value. | |
| bool | operator<= (std::string const &value) const | 
| Compare this option's value with the specified string. | |
| option_info_ref & | operator= (char const *value) | 
| Set the option value to value. | |
| option_info_ref & | operator= (char value) | 
| Set the option value to value. | |
| option_info_ref & | operator= (char32_t value) | 
| Set the option value to value. | |
| option_info_ref & | operator= (option_info_ref const &value) | 
| Set the value of this option to the value of another option. | |
| option_info_ref & | operator= (std::string const &value) | 
| Set the option value to value. | |
| bool | operator== (char const *value) const | 
| Compare this option's value with the specified string. | |
| bool | operator== (option_info_ref const &value) const | 
| Compare this option's value with the value of option value. | |
| bool | operator== (std::string const &value) const | 
| Compare this option's value with the specified string. | |
| bool | operator> (char const *value) const | 
| Compare this option's value with the specified string. | |
| bool | operator> (option_info_ref const &value) const | 
| Compare this option's value with the value of option value. | |
| bool | operator> (std::string const &value) const | 
| Compare this option's value with the specified string. | |
| bool | operator>= (char const *value) const | 
| Compare this option's value with the specified string. | |
| bool | operator>= (option_info_ref const &value) const | 
| Compare this option's value with the value of option value. | |
| bool | operator>= (std::string const &value) const | 
| Compare this option's value with the specified string. | |
| size_t | size () const | 
| Return the length of the option's value. | |
| Private Attributes | |
| option_info::pointer_t | f_opt = option_info::pointer_t() | 
| Friends | |
| bool | operator!= (char const *value, option_info_ref const &rhs) | 
| Compare valuewith the value of the right hand-side option. | |
| bool | operator!= (std::string const &value, option_info_ref const &rhs) | 
| Compare valuewith the value of the right hand-side option. | |
| std::string | operator+ (char const *value, option_info_ref const &rhs) | 
| Concatenate a string and an option reference value. | |
| std::string | operator+ (char value, option_info_ref const &rhs) | 
| Concatenate a character and an option reference value. | |
| std::string | operator+ (char32_t value, option_info_ref const &rhs) | 
| Concatenate a character and an option reference value. | |
| std::string | operator+ (std::string const &value, option_info_ref const &rhs) | 
| Concatenate a string and an option reference value. | |
| bool | operator< (char const *value, option_info_ref const &rhs) | 
| Compare valuewith the value of the right hand-side option. | |
| bool | operator< (std::string const &value, option_info_ref const &rhs) | 
| Compare valuewith the value of the right hand-side option. | |
| bool | operator<= (char const *value, option_info_ref const &rhs) | 
| Compare valuewith the value of the right hand-side option. | |
| bool | operator<= (std::string const &value, option_info_ref const &rhs) | 
| Compare valuewith the value of the right hand-side option. | |
| bool | operator== (char const *value, option_info_ref const &rhs) | 
| Compare valuewith the value of the right hand-side option. | |
| bool | operator== (std::string const &value, option_info_ref const &rhs) | 
| Compare valuewith the value of the right hand-side option. | |
| bool | operator> (char const *value, option_info_ref const &rhs) | 
| Compare valuewith the value of the right hand-side option. | |
| bool | operator> (std::string const &value, option_info_ref const &rhs) | 
| Compare valuewith the value of the right hand-side option. | |
| bool | operator>= (char const *value, option_info_ref const &rhs) | 
| Compare valuewith the value of the right hand-side option. | |
| bool | operator>= (std::string const &value, option_info_ref const &rhs) | 
| Compare valuewith the value of the right hand-side option. | |
Definition at line 200 of file option_info.h.
| advgetopt::option_info_ref::option_info_ref | ( | option_info::pointer_t | opt | ) | 
This constructor creates a reference to the specified opt option_info object.
This gives you read and write access to the very first value held by the opt object.
| [in] | opt | The option to create the reference of. | 
Definition at line 72 of file option_info_ref.cpp.
| bool advgetopt::option_info_ref::empty | ( | ) | const | 
This function checks the option's value and returns true if it is empty.
Definition at line 88 of file option_info_ref.cpp.
References f_opt.
Referenced by operator!(), operator!=(), operator<=(), operator==(), and operator>().
| double advgetopt::option_info_ref::get_double | ( | ) | const | 
This function attempts to retrieve the option value as a double floating point.
If the value is not yet defined, the function attempts to return the default value converted to a double. If that fails, the function returns -1 after it emitted an error in the log.
When the value is not defined and there is no default, the function returns 0 (as if an empty string represented 0.)
Definition at line 190 of file option_info_ref.cpp.
References advgetopt::validator_double::convert_string(), f_opt, and advgetopt::option_flags_merge().
| long advgetopt::option_info_ref::get_long | ( | ) | const | 
This function attempts to retrieve the option value as a long integer.
If the value is not yet defined, the function attempts to return the default value converted to an integer. If that fails, the function returns -1 after it emitted an error in the log.
When the value is not defined and there is no default, the function returns 0 (as if an empty string represented 0.)
Definition at line 147 of file option_info_ref.cpp.
References advgetopt::validator_integer::convert_string(), f_opt, and advgetopt::option_flags_merge().
| size_t advgetopt::option_info_ref::length | ( | ) | const | 
This function returns the length of the option's value. This is the number of bytes in the string.
Definition at line 110 of file option_info_ref.cpp.
References f_opt.
Referenced by size().
| advgetopt::option_info_ref::operator bool | ( | ) | const | 
This function calls the empty function and returns the opposite result.
Definition at line 597 of file option_info_ref.cpp.
| advgetopt::option_info_ref::operator std::string | ( | ) | const | 
This cast operator transforms the reference in a string which has the contents of the option value.
Definition at line 226 of file option_info_ref.cpp.
| bool advgetopt::option_info_ref::operator! | ( | ) | const | 
This function calls the empty function and returns the result.
Definition at line 609 of file option_info_ref.cpp.
References empty().
| bool advgetopt::option_info_ref::operator!= | ( | char const * | value | ) | const | 
This operator compares this option's value with the specified string.
| [in] | value | A string to compare this option's value with. | 
Definition at line 670 of file option_info_ref.cpp.
References empty().
| bool advgetopt::option_info_ref::operator!= | ( | option_info_ref const & | value | ) | const | 
This operator compares this option's value with the value of the option specified in value.
| [in] | value | A string to compare this option's value with. | 
Definition at line 703 of file option_info_ref.cpp.
| bool advgetopt::option_info_ref::operator!= | ( | std::string const & | value | ) | const | 
This operator compares this option's value with the specified string.
| [in] | value | A string to compare this option's value with. | 
Definition at line 688 of file option_info_ref.cpp.
This operator is used to append a string to the value of the option and return the result as a string.
| [in] | value | The string to append to the option_info's value. | 
Definition at line 482 of file option_info_ref.cpp.
| std::string advgetopt::option_info_ref::operator+ | ( | char | value | ) | const | 
This operator is used to append a character to the value of the option and returns the result as a string.
| [in] | value | The character to append to the option_info's value. | 
Definition at line 452 of file option_info_ref.cpp.
| std::string advgetopt::option_info_ref::operator+ | ( | char32_t | value | ) | const | 
This operator is used to append a Unicode character to the value of the option and returns the result as a string.
| [in] | value | The character to append to the option_info's value. | 
Definition at line 467 of file option_info_ref.cpp.
| std::string advgetopt::option_info_ref::operator+ | ( | option_info_ref const & | value | ) | const | 
This operator is used to append two option references to each others and return the concatenated string as the result.
| [in] | value | The other option to read the value from. | 
Definition at line 516 of file option_info_ref.cpp.
| std::string advgetopt::option_info_ref::operator+ | ( | std::string const & | value | ) | const | 
This operator is used to append a string to the value of the option and return the result as a string.
| [in] | value | The value to append to the option_info's value. | 
Definition at line 501 of file option_info_ref.cpp.
| option_info_ref & advgetopt::option_info_ref::operator+= | ( | char const * | value | ) | 
This assignment operator can be used to append a string to the existing value of the option.
| [in] | value | The value to append to the option_info's value. | 
Definition at line 393 of file option_info_ref.cpp.
References f_opt, and advgetopt::option_flags_merge().
| option_info_ref & advgetopt::option_info_ref::operator+= | ( | char | value | ) | 
This assignment operator can be used to append a character to the existing value of the option.
| [in] | value | The character to append to the option_info's value. | 
Definition at line 351 of file option_info_ref.cpp.
References f_opt, and advgetopt::option_flags_merge().
| option_info_ref & advgetopt::option_info_ref::operator+= | ( | char32_t | value | ) | 
This assignment operator can be used to append a character to the existing value of the option.
| [in] | value | The character to append to the option_info's value. | 
Definition at line 372 of file option_info_ref.cpp.
References f_opt, and advgetopt::option_flags_merge().
| option_info_ref & advgetopt::option_info_ref::operator+= | ( | option_info_ref const & | value | ) | 
This assignment operator is used to append a string to the existing value of this option.
| [in] | value | The other option to read the value from. | 
Definition at line 430 of file option_info_ref.cpp.
References f_opt.
| option_info_ref & advgetopt::option_info_ref::operator+= | ( | std::string const & | value | ) | 
This assignment operator is used to append a string to the existing value of the option.
| [in] | value | The value to append to the option_info's value. | 
Definition at line 414 of file option_info_ref.cpp.
References f_opt.
This operator compares this option's value with the specified string.
| [in] | value | A string to compare this option's value with. | 
Definition at line 717 of file option_info_ref.cpp.
| bool advgetopt::option_info_ref::operator< | ( | option_info_ref const & | value | ) | const | 
This operator compares this option's value with the value of the option specified in value.
| [in] | value | A string to compare this option's value with. | 
Definition at line 750 of file option_info_ref.cpp.
This operator compares this option's value with the specified string.
| [in] | value | A string to compare this option's value with. | 
Definition at line 735 of file option_info_ref.cpp.
This operator compares this option's value with the specified string.
| [in] | value | A string to compare this option's value with. | 
Definition at line 764 of file option_info_ref.cpp.
References empty().
| bool advgetopt::option_info_ref::operator<= | ( | option_info_ref const & | value | ) | const | 
This operator compares this option's value with the value of the option specified in value.
| [in] | value | A string to compare this option's value with. | 
Definition at line 797 of file option_info_ref.cpp.
This operator compares this option's value with the specified string.
| [in] | value | A string to compare this option's value with. | 
Definition at line 782 of file option_info_ref.cpp.
| option_info_ref & advgetopt::option_info_ref::operator= | ( | char const * | value | ) | 
This assignment operator can be used to change the value of the option.
| [in] | value | The new value to save in the option_info object. | 
Definition at line 292 of file option_info_ref.cpp.
References f_opt.
| option_info_ref & advgetopt::option_info_ref::operator= | ( | char | value | ) | 
This assignment operator is used to change the value of the option.
The input character is transform in a string and saved as such in the option. If the character is '\0', then the value is cleared instead.
| [in] | value | The ISO-8859-1 character to save in the option_info object. | 
Definition at line 248 of file option_info_ref.cpp.
References f_opt, and advgetopt::option_flags_merge().
| option_info_ref & advgetopt::option_info_ref::operator= | ( | char32_t | value | ) | 
This assignment operator is used to change the value of the option.
The input character is transform in a string and saved as such in the option. If the character is '\0', then the value is cleared instead.
| [in] | value | The unicode character to save in the option_info object. | 
Definition at line 271 of file option_info_ref.cpp.
References f_opt, and advgetopt::option_flags_merge().
| option_info_ref & advgetopt::option_info_ref::operator= | ( | option_info_ref const & | value | ) | 
This assignment operator allows you to copy the value from reference value to another.
| [in] | value | The other option to read the value from. | 
Definition at line 331 of file option_info_ref.cpp.
References f_opt.
| option_info_ref & advgetopt::option_info_ref::operator= | ( | std::string const & | value | ) | 
This assignment operator can be used to change the value of the option.
| [in] | value | The new value to save in the option_info object. | 
Definition at line 315 of file option_info_ref.cpp.
References f_opt.
This operator compares this option's value with the specified string.
| [in] | value | A string to compare this option's value with. | 
Definition at line 623 of file option_info_ref.cpp.
References empty().
| bool advgetopt::option_info_ref::operator== | ( | option_info_ref const & | value | ) | const | 
This operator compares this option's value with the value of the option specified in value.
| [in] | value | A string to compare this option's value with. | 
Definition at line 656 of file option_info_ref.cpp.
This operator compares this option's value with the specified string.
| [in] | value | A string to compare this option's value with. | 
Definition at line 641 of file option_info_ref.cpp.
This operator compares this option's value with the specified string.
| [in] | value | A string to compare this option's value with. | 
Definition at line 811 of file option_info_ref.cpp.
References empty().
| bool advgetopt::option_info_ref::operator> | ( | option_info_ref const & | value | ) | const | 
This operator compares this option's value with the value of the option specified in value.
| [in] | value | A string to compare this option's value with. | 
Definition at line 844 of file option_info_ref.cpp.
This operator compares this option's value with the specified string.
| [in] | value | A string to compare this option's value with. | 
Definition at line 829 of file option_info_ref.cpp.
This operator compares this option's value with the specified string.
| [in] | value | A string to compare this option's value with. | 
Definition at line 858 of file option_info_ref.cpp.
| bool advgetopt::option_info_ref::operator>= | ( | option_info_ref const & | value | ) | const | 
This operator compares this option's value with the value of the option specified in value.
| [in] | value | A string to compare this option's value with. | 
Definition at line 891 of file option_info_ref.cpp.
This operator compares this option's value with the specified string.
| [in] | value | A string to compare this option's value with. | 
Definition at line 876 of file option_info_ref.cpp.
| size_t advgetopt::option_info_ref::size | ( | ) | const | 
This function returns the length of the option's value. This is the number of bytes in the string.
Definition at line 128 of file option_info_ref.cpp.
References length().
This operator compares the specified value with the value of the option specified as the rhs (right hand-side.)
| [in] | value | A string to compare an option's value with. | 
| [in] | rhs | The option to compare against value. | 
Definition at line 944 of file option_info_ref.cpp.
| 
 | friend | 
This operator compares the specified value with the value of the option specified as the rhs (right hand-side.)
| [in] | value | A string to compare an option's value with. | 
| [in] | rhs | The option to compare against value. | 
Definition at line 964 of file option_info_ref.cpp.
| 
 | friend | 
This operator concatenates the value string to the front of the rhs reference.
| [in] | value | A character to add to the left of the referred value. | 
| [in] | rhs | The referred value. | 
Definition at line 565 of file option_info_ref.cpp.
| 
 | friend | 
This operator concatenates the value ISO-8859-1 character to the front of the rhs reference.
| [in] | value | A character to add to the left of the referred value. | 
| [in] | rhs | The referred value. | 
Definition at line 533 of file option_info_ref.cpp.
| 
 | friend | 
This operator concatenates the value Unicode character to the front of the rhs reference.
| [in] | value | A character to add to the left of the referred value. | 
| [in] | rhs | The referred value. | 
Definition at line 549 of file option_info_ref.cpp.
| 
 | friend | 
This operator concatenates the value string to the front of the rhs reference.
| [in] | value | A character to add to the left of the referred value. | 
| [in] | rhs | The referred value. | 
Definition at line 585 of file option_info_ref.cpp.
This operator compares the specified value with the value of the option specified as the rhs (right hand-side.)
| [in] | value | A string to compare an option's value with. | 
| [in] | rhs | The option to compare against value. | 
Definition at line 980 of file option_info_ref.cpp.
| 
 | friend | 
This operator compares the specified value with the value of the option specified as the rhs (right hand-side.)
| [in] | value | A string to compare an option's value with. | 
| [in] | rhs | The option to compare against value. | 
Definition at line 1000 of file option_info_ref.cpp.
This operator compares the specified value with the value of the option specified as the rhs (right hand-side.)
| [in] | value | A string to compare an option's value with. | 
| [in] | rhs | The option to compare against value. | 
Definition at line 1016 of file option_info_ref.cpp.
| 
 | friend | 
This operator compares the specified value with the value of the option specified as the rhs (right hand-side.)
| [in] | value | A string to compare an option's value with. | 
| [in] | rhs | The option to compare against value. | 
Definition at line 1036 of file option_info_ref.cpp.
This operator compares the specified value with the value of the option specified as the rhs (right hand-side.)
| [in] | value | A string to compare an option's value with. | 
| [in] | rhs | The option to compare against value. | 
Definition at line 908 of file option_info_ref.cpp.
| 
 | friend | 
This operator compares the specified value with the value of the option specified as the rhs (right hand-side.)
| [in] | value | A string to compare an option's value with. | 
| [in] | rhs | The option to compare against value. | 
Definition at line 928 of file option_info_ref.cpp.
This operator compares the specified value with the value of the option specified as the rhs (right hand-side.)
| [in] | value | A string to compare an option's value with. | 
| [in] | rhs | The option to compare against value. | 
Definition at line 1052 of file option_info_ref.cpp.
| 
 | friend | 
This operator compares the specified value with the value of the option specified as the rhs (right hand-side.)
| [in] | value | A string to compare an option's value with. | 
| [in] | rhs | The option to compare against value. | 
Definition at line 1072 of file option_info_ref.cpp.
This operator compares the specified value with the value of the option specified as the rhs (right hand-side.)
| [in] | value | A string to compare an option's value with. | 
| [in] | rhs | The option to compare against value. | 
Definition at line 1088 of file option_info_ref.cpp.
| 
 | friend | 
This operator compares the specified value with the value of the option specified as the rhs (right hand-side.)
| [in] | value | A string to compare an option's value with. | 
| [in] | rhs | The option to compare against value. | 
Definition at line 1108 of file option_info_ref.cpp.
| 
 | private | 
Definition at line 282 of file option_info.h.
Referenced by empty(), get_double(), get_long(), length(), operator+=(), operator+=(), operator+=(), operator+=(), operator+=(), operator=(), operator=(), operator=(), operator=(), and operator=().
This document is part of the Snap! Websites Project.
Copyright by Made to Order Software Corp.