Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

MenuSystem Class Reference

class handling a whole menu structure. More...

#include <menusystem.h>

List of all members.

Public Types

typedef std::list< Tagtag_list
typedef tag_list::iterator tag_list_it
enum  What { ITEM, MENU, MENUCLOSE, UNDEFINED }

Public Methods

 MenuSystem (tag_list tlist, Options options)
 ~MenuSystem ()
bool operator! () const
std::string get_html_menu ()
 returns the html menu. More...

std::string get_sitemap ()
 return s the sitemap. More...

std::string get_link (std::string path, Options o)
 returns a lonly link. More...


Private Types

typedef std::list< Node *> node_list
typedef std::list< Node
*>::iterator 
node_list_it

Private Methods

bool create_tree ()
 creates the menu tree. More...

std::string get_childs (Node *parent)
 returns a html tree started with the given node. More...

bool is_in_position (std::string path)
 returns true if the node is within the path. More...

bool is_position (std::string path)
 returns true if the path == position. More...

int count_directories (std::string text)
 count the directories within the path. More...

std::string create_item (Node *node, std::string highlight_type, std::string highlight_active_type, int indent_num, std::string indent_type)
 creates an link from an node. More...

std::string get_local_childs (std::string path)
 returns ahtml tree started with the given path. More...

std::string get_root_dir (Node *node)
 returns a path to the root dir. eg: "../../../". More...

std::string get_pre (Node *node)
 returns the pre option of a node. More...

std::string get_pre_forwards (Node *node)
 returns the pre_forwards option of a root node. More...

std::string get_pre_backwards (Node *node)
 returns the pre_backwards option of a root node. More...

std::string get_post (Node *node)
 returns the post option of a node. More...

std::string get_post_forwards (Node *node)
 returns the post_forwards option of a root node. More...

std::string get_post_backwards (Node *node)
 returns the post_backwards option of a root node. More...

std::string get_href (Node *node)
 returns the href option of a node (root path stabeliced). More...

bool is_extern_link (std::string href)
 checks if the link is an external link. More...

bool is_local_link (std::string href)
 checks if the link is an link at the current side. More...

std::string get_highlight_type (Node *node)
std::string get_highlight_active_type (Node *node)
std::string get_highlight_menu_type (Node *node)
std::string get_highlight_active_menu_type (Node *node)
int get_indent_num (Node *node)
std::string get_indent_type (Node *node)
std::string get_blockquote_principe (Node *node)
std::string get_title_type (Node *node)
std::string get_title_menu_type (Node *node)
std::string get_title_highlight_type (Node *node)
std::string get_title_highlight_menu_type (Node *node)
std::string get_target (Node *node)

Private Attributes

std::string current_path
std::string current_subdir
bool is_valid
bool is_sitemap
tag_list tlist
Noderoot
 the current root node. More...

Noderoot_bak
 the real root node. More...

node_list nodes
 list of all nodes. More...

Options options


Detailed Description

class handling a whole menu structure.

this class handles one menu system


Member Typedef Documentation

typedef std::list<Node*> MenuSystem::node_list [private]
 

typedef std::list<Node*>::iterator MenuSystem::node_list_it [private]
 

typedef std::list<Tag> MenuSystem::tag_list
 

typedef tag_list::iterator MenuSystem::tag_list_it
 


Member Enumeration Documentation

enum MenuSystem::What
 

Enumeration values:
ITEM 
MENU 
MENUCLOSE 
UNDEFINED  the tag is uninitialiced.


Constructor & Destructor Documentation

MenuSystem::MenuSystem tag_list    tlist,
Options    options
 

MenuSystem::~MenuSystem  
 


Member Function Documentation

int MenuSystem::count_directories std::string    text [private]
 

count the directories within the path.

std::string MenuSystem::create_item Node   node,
std::string    highlight_type,
std::string    highlight_active_type,
int    indent_num,
std::string    indent_type
[private]
 

creates an link from an node.

bool MenuSystem::create_tree   [private]
 

creates the menu tree.

std::string MenuSystem::get_blockquote_principe Node   node [private]
 

std::string MenuSystem::get_childs Node   parent [private]
 

returns a html tree started with the given node.

std::string MenuSystem::get_highlight_active_menu_type Node   node [private]
 

std::string MenuSystem::get_highlight_active_type Node   node [private]
 

std::string MenuSystem::get_highlight_menu_type Node   node [private]
 

std::string MenuSystem::get_highlight_type Node   node [private]
 

std::string MenuSystem::get_href Node   node [private]
 

returns the href option of a node (root path stabeliced).

std::string MenuSystem::get_html_menu  
 

returns the html menu.

int MenuSystem::get_indent_num Node   node [private]
 

std::string MenuSystem::get_indent_type Node   node [private]
 

std::string MenuSystem::get_link std::string    path,
Options    o
 

returns a lonly link.

std::string MenuSystem::get_local_childs std::string    path [private]
 

returns ahtml tree started with the given path.

std::string MenuSystem::get_post Node   node [private]
 

returns the post option of a node.

std::string MenuSystem::get_post_backwards Node   node [private]
 

returns the post_backwards option of a root node.

std::string MenuSystem::get_post_forwards Node   node [private]
 

returns the post_forwards option of a root node.

std::string MenuSystem::get_pre Node   node [private]
 

returns the pre option of a node.

std::string MenuSystem::get_pre_backwards Node   node [private]
 

returns the pre_backwards option of a root node.

std::string MenuSystem::get_pre_forwards Node   node [private]
 

returns the pre_forwards option of a root node.

std::string MenuSystem::get_root_dir Node   node [private]
 

returns a path to the root dir. eg: "../../../".

std::string MenuSystem::get_sitemap  
 

return s the sitemap.

std::string MenuSystem::get_target Node   node [private]
 

std::string MenuSystem::get_title_highlight_menu_type Node   node [private]
 

std::string MenuSystem::get_title_highlight_type Node   node [private]
 

std::string MenuSystem::get_title_menu_type Node   node [private]
 

std::string MenuSystem::get_title_type Node   node [private]
 

bool MenuSystem::is_extern_link std::string    href [private]
 

checks if the link is an external link.

returns true if the link starts with http: file: gopher: news: https:

it simply checks if the string contains an ':'

At the moment this function is very simple, maybe we have to improve it later.

bool MenuSystem::is_in_position std::string    path [private]
 

returns true if the node is within the path.

bool MenuSystem::is_local_link std::string    href [private]
 

checks if the link is an link at the current side.

bool MenuSystem::is_position std::string    path [private]
 

returns true if the path == position.

bool MenuSystem::operator!   const [inline]
 


Member Data Documentation

std::string MenuSystem::current_path [private]
 

std::string MenuSystem::current_subdir [private]
 

bool MenuSystem::is_sitemap [private]
 

bool MenuSystem::is_valid [private]
 

node_list MenuSystem::nodes [private]
 

list of all nodes.

Options MenuSystem::options [private]
 

Node* MenuSystem::root [private]
 

the current root node.

Node* MenuSystem::root_bak [private]
 

the real root node.

tag_list MenuSystem::tlist [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Nov 20 02:19:54 2001 for Leo<HTML> by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001