|
SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Configure one item in a view, which may contain children. More...
#include <Configuration.h>
Public Member Functions | |
| Component (const std::string &myName) | |
| const std::string & | name () const |
| const std::string & | contents () const |
| bool | contentsAsVector (std::vector< double > &vec) const |
| bool | contentsAsInt (int &val) const |
| Component & | setContents (const std::string &c) |
| Component & | setAttribute (const std::string &attname, const std::string &value) |
| Component & | unsetAttribute (const std::string &attname) |
| bool | attribute (const std::string &attname, std::string &value) const |
| Returns true if the component has an attribute called name and will set value to the attribute's values. More... | |
| bool | attribute (const std::string &attname) const |
| Simply tests to see if the attribute exists. | |
| bool | attributeAsBool (const std::string &attname, bool &value) const |
| Returns true if the component has an attribute called name and if it has the string value of true, t, false, or f (ignoring case). More... | |
| bool | attributeAsBool (const std::string &attname) const |
| Returns true if the component has an attribute called name and if its value is either t or true (ignoring case). More... | |
| std::string | attributeAsString (const std::string &attname) const |
| Returns the value of the attribute named attname as a string. More... | |
| bool | attributeAsInt (const std::string &attname, int &val) const |
| bool | attributeAsDouble (const std::string &attname, double &val) const |
| const std::map< std::string, std::string > & | attributes () const |
| Component & | addChild (const std::string &childName) |
| void | copyContents (const Component &comp) |
| const std::vector< Component > & | children () const |
| std::vector< Component > & | children () |
| std::size_t | numberOfChildren () const |
| Component & | child (std::size_t i) |
| const Component & | child (std::size_t i) const |
| int | findChild (const std::string &compName) const |
| bool | operator== (const Component &other) const |
Protected Attributes | |
| std::string | m_name |
| std::string | m_contents |
| std::map< std::string, std::string > | m_attributes |
| std::vector< Component > | m_children |
Configure one item in a view, which may contain children.
| bool smtk::view::Configuration::Component::attribute | ( | const std::string & | attname, |
| std::string & | value | ||
| ) | const |
Returns true if the component has an attribute called name and will set value to the attribute's values.
Else it returns false
| bool smtk::view::Configuration::Component::attributeAsBool | ( | const std::string & | attname | ) | const |
Returns true if the component has an attribute called name and if its value is either t or true (ignoring case).
Else it returns false.
| bool smtk::view::Configuration::Component::attributeAsBool | ( | const std::string & | attname, |
| bool & | value | ||
| ) | const |
Returns true if the component has an attribute called name and if it has the string value of true, t, false, or f (ignoring case).
Value will be true if the attribute is t or true, false if attribute is f or false and not set otherwise set value to the attribute's values. Else it returns false
| std::string smtk::view::Configuration::Component::attributeAsString | ( | const std::string & | attname | ) | const |
Returns the value of the attribute named attname as a string.
It will return an empty string if the attribute does not exists
1.8.17