Image Component Library (ICL)
Public Member Functions | Public Attributes | Private Types | Private Member Functions | Friends | List of all members
icl::qt::DynamicGUI::Node Class Reference

internal xml-parsing node class More...

#include <DynamicGUI.h>

Public Member Functions

bool isContainer () const
 dedicated method to distinguish containers More...
 
bool hasHandle () const
 returns whether a handle was given (e.g. is part of args) More...
 
std::string getHandleName () const
 returns the handle (if there is one) More...
 

Public Attributes

std::string name
 component type (e.g. 'slider', or 'combo' or 'image') More...
 
NodePtr parent
 parent container component (or null for the top-level component) More...
 
int level
 hierarchy containment level of this component More...
 
qt::GUI parsedGUI
 corresponding parse (but not created) GUI instance More...
 
std::string directArgs
 direct, e.g. component specific arguments More...
 
std::vector< KeyValueargs
 general arguments, such as handle, label or minsize More...
 
std::vector< NodePtrchildren
 all child-components (for containers only) More...
 

Private Types

typedef utils::SmartPtr< NodeNodePtr
 SmartPtr typedef. More...
 
typedef std::pair< std::string, std::string > KeyValue
 KeyValue pair class. More...
 

Private Member Functions

 Node (const std::string &name="", NodePtr parent=NodePtr(), int level=0)
 
NodePtr appendChild (const std::string &name, NodePtr parent, int level)
 internally used appending of children More...
 
void grabArgs (const pugi::xml_node &n)
 internal utility methods More...
 

Friends

class DynamicGUI
 makes parent DynamicGUI class a friend of this one More...
 

Detailed Description

internal xml-parsing node class

The node class represents the hierarchical structure of the GUI definition and by exposing the interface, it can be used and re-parsed by other components Each GUI component (e.g. a Slider) is defined by its name (which is 'slider') and a set of arguments. Here, the class distinguishes between direct arguments, which are the component specific arguments, e.g. in case of a slider, the min, the max and the initial value, such as "0,255,128". In addition other arguments are stored in a key-value-pair fashion, such as "handle='the slider'".

Member Typedef Documentation

◆ KeyValue

typedef std::pair<std::string,std::string> icl::qt::DynamicGUI::Node::KeyValue
private

KeyValue pair class.

◆ NodePtr

SmartPtr typedef.

Constructor & Destructor Documentation

◆ Node()

icl::qt::DynamicGUI::Node::Node ( const std::string &  name = "",
NodePtr  parent = NodePtr(),
int  level = 0 
)
private

Member Function Documentation

◆ appendChild()

NodePtr icl::qt::DynamicGUI::Node::appendChild ( const std::string &  name,
NodePtr  parent,
int  level 
)
private

internally used appending of children

◆ getHandleName()

std::string icl::qt::DynamicGUI::Node::getHandleName ( ) const

returns the handle (if there is one)

◆ grabArgs()

void icl::qt::DynamicGUI::Node::grabArgs ( const pugi::xml_node &  n)
private

internal utility methods

◆ hasHandle()

bool icl::qt::DynamicGUI::Node::hasHandle ( ) const

returns whether a handle was given (e.g. is part of args)

◆ isContainer()

bool icl::qt::DynamicGUI::Node::isContainer ( ) const

dedicated method to distinguish containers

Friends And Related Function Documentation

◆ DynamicGUI

friend class DynamicGUI
friend

makes parent DynamicGUI class a friend of this one

Member Data Documentation

◆ args

std::vector<KeyValue> icl::qt::DynamicGUI::Node::args

general arguments, such as handle, label or minsize

◆ children

std::vector<NodePtr> icl::qt::DynamicGUI::Node::children

all child-components (for containers only)

◆ directArgs

std::string icl::qt::DynamicGUI::Node::directArgs

direct, e.g. component specific arguments

◆ level

int icl::qt::DynamicGUI::Node::level

hierarchy containment level of this component

◆ name

std::string icl::qt::DynamicGUI::Node::name

component type (e.g. 'slider', or 'combo' or 'image')

◆ parent

NodePtr icl::qt::DynamicGUI::Node::parent

parent container component (or null for the top-level component)

◆ parsedGUI

qt::GUI icl::qt::DynamicGUI::Node::parsedGUI

corresponding parse (but not created) GUI instance


The documentation for this class was generated from the following file: