#include <tag.h>
Inheritance diagram for Tag::
Public Methods | |
Tag (std::string tag, bool no_warning_check=false) | |
something like "<menu name="main">". More... | |
Tag (Line &line, bool no_warning_check=false) | |
Tag () | |
bool | operator! () const |
class not a tag?;. More... | |
bool | get_option (const std::string which, std::string &result) |
returns the specific string to the option. More... | |
template<class T> bool | get_option (const std::string which, T &result) |
bool | get_option (const std::string which) |
checks for flag options. More... | |
template<class T> bool | set_option (const std::string o, const T f, bool ff=false) |
bool | set_option (const std::string option, const std::string flag="", bool fail_if_set=false) |
std::string | get_tag () const |
returns the whole tag. More... | |
std::string | get_tag_type () const |
returns something like "menu". More... | |
void | set_tag_type (std::string type) |
changes the tag type. More... | |
Line | get_line () const |
void | rebuild_tag () |
reconstructs the tag. More... | |
void | delete_option (const std::string option) |
deletes an option. More... | |
void | delete_default_options () |
std::string | get_options () |
returns a string with all options. More... | |
int | get_number_of_options () |
bool | get_option (int number, std::string &option, std::string &value) |
returns the n'th option. More... | |
bool | get_option (int number, std::string &value) |
returns the value of a specific option. More... | |
int | get_level (bool guess_it=false) |
Tag (std::string tag, bool no_warning_check=false) | |
something like "<menu name="main">". More... | |
Tag (Line &line, bool no_warning_check=false) | |
Tag () | |
bool | operator! () const |
class not a tag?;. More... | |
bool | get_option (const std::string which, std::string &result) |
returns the specific string to the option. More... | |
template<class T> bool | get_option (const std::string which, T &result) |
bool | get_option (const std::string which) |
checks for flag options. More... | |
template<class T> bool | set_option (const std::string o, const T f, bool ff=false) |
bool | set_option (const std::string option, const std::string flag="", bool fail_if_set=false) |
std::string | get_tag () const |
returns the whole tag. More... | |
std::string | get_tag_type () const |
returns something like "menu". More... | |
void | set_tag_type (std::string type) |
changes the tag type. More... | |
Line | get_line () const |
void | rebuild_tag () |
reconstructs the tag. More... | |
void | delete_option (const std::string option) |
deletes an option. More... | |
void | delete_default_options () |
std::string | get_options () |
returns a string with all options. More... | |
int | get_number_of_options () |
bool | get_option (int number, std::string &option, std::string &value) |
returns the n'th option. More... | |
bool | get_option (int number, std::string &value) |
returns the value of a specific option. More... | |
int | get_level (bool guess_it=false) |
Protected Types | |
typedef std::list< Option > | options_list |
typedef options_list::iterator | options_list_it |
typedef std::list< Option > | options_list |
typedef options_list::iterator | options_list_it |
Protected Attributes | |
options_list | options |
bool | is_valid_tag |
bool | options_extracted |
extract options on demand. More... | |
bool | no_warning_check |
checks if there is a "no_warning" option in the tag to suppress warnings. More... | |
bool | nowarning |
Private Methods | |
bool | is_tag () |
checks if it is an tag. More... | |
void | extract_options () |
extracts all options. More... | |
void | extract_type () |
extracts the tag_type. More... | |
void | split_option (std::string option, std::string &name, std::string &value) |
extracts the name and value of an option string. More... | |
bool | check_if_valid () |
bool | is_tag () |
checks if it is an tag. More... | |
void | extract_options () |
extracts all options. More... | |
void | extract_type () |
extracts the tag_type. More... | |
void | split_option (std::string option, std::string &name, std::string &value) |
extracts the name and value of an option string. More... | |
bool | check_if_valid () |
Private Attributes | |
std::string | tag_type |
Line | line |
bool | got_line |
bool | searched_level |
int | level |
Note: the name of the "</menu>" tag would be "/menu"
|
|
|
|
|
|
|
|
|
something like "<menu name="main">".
|
|
|
|
|
|
something like "<menu name="main">".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deletes an option.
|
|
deletes an option.
|
|
extracts all options.
|
|
extracts all options.
|
|
extracts the tag_type.
|
|
extracts the tag_type.
|
|
searches for the level option and returns it's value. If it can't be found it returns the default value 0. If guess_it is set to true, the function will find the correct level at this <delete 1> tag too. But be careful! |
|
searches for the level option and returns it's value. If it can't be found it returns the default value 0. If guess_it is set to true, the function will find the correct level at this <delete 1> tag too. But be careful! |
|
Reimplemented in DefineOpen, SimpleTag, and Locale. |
|
Reimplemented in DefineOpen, SimpleTag, and Locale. |
|
|
|
|
|
returns the value of a specific option.
|
|
returns the n'th option.
|
|
checks for flag options.
Reimplemented in FileLink. |
|
|
|
returns the specific string to the option. if the tag is <menu name="blah"> and you call get_option( "name" ) it returns "blah". If the option is not set the function returns false and if the option is set, but contains no string an empty string is returned Reimplemented in FileLink. |
|
returns the value of a specific option.
|
|
returns the n'th option.
|
|
checks for flag options.
Reimplemented in FileLink. |
|
|
|
returns the specific string to the option. if the tag is <menu name="blah"> and you call get_option( "name" ) it returns "blah". If the option is not set the function returns false and if the option is set, but contains no string an empty string is returned Reimplemented in FileLink. |
|
returns a string with all options.
Reimplemented in FileLink. |
|
returns a string with all options.
Reimplemented in FileLink. |
|
returns the whole tag.
Reimplemented in Macro. |
|
returns the whole tag.
Reimplemented in Macro. |
|
returns something like "menu".
|
|
returns something like "menu".
|
|
checks if it is an tag.
|
|
checks if it is an tag.
|
|
class not a tag?;.
Reimplemented in CharOpen, CharClose, DefineOpen, DefineClose, DeleteOpen, DeleteClose, FileLink, FileList, Image, Include, Init, Lang, Locale, LocaleClose, Macro, MenuBase, MenuClose, ScriptStart, ScriptEnd, Function, SitemapBase, and Link. |
|
class not a tag?;.
Reimplemented in CharOpen, CharClose, DefineOpen, DefineClose, DeleteOpen, DeleteClose, FileLink, FileList, Image, Include, Init, Lang, Locale, LocaleClose, Macro, MenuBase, MenuClose, ScriptStart, ScriptEnd, Function, SitemapBase, and Link. |
|
reconstructs the tag.
|
|
reconstructs the tag.
|
|
if fail_if_set is true the function returns false if there is already an option with the same name. |
|
|
|
if fail_if_set is true the function returns false if there is already an option with the same name. |
|
|
|
changes the tag type. do not forget to reconstruct the tag after calling this function |
|
changes the tag type. do not forget to reconstruct the tag after calling this function |
|
extracts the name and value of an option string.
|
|
extracts the name and value of an option string.
|
|
|
|
Reimplemented in Include, Locale, LocaleClose, Macro, MenuBase, MenuClose, SitemapBase, and Link. |
|
Reimplemented in DefineOpen, and LevelTag. |
|
|
|
checks if there is a "no_warning" option in the tag to suppress warnings. this is required by the image, file and filelist tag |
|
|
|
|
|
extract options on demand.
|
|
|
|
Reimplemented in MenuBase. |