Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes
bbcpp::BBElement Class Reference

#include <BBDocument.h>

+ Inheritance diagram for bbcpp::BBElement:

Public Types

enum  ElementType { SIMPLE , VALUE , PARAMETER , CLOSING }
 
- Public Types inherited from bbcpp::BBNode
enum class  NodeType { DOCUMENT , ELEMENT , TEXT , ATTRIBUTE }
 

Public Member Functions

 BBElement (const std::string &name, ElementType et=BBElement::SIMPLE)
 
virtual ~BBElement ()=default
 
const ElementType getElementType () const
 
void setOrAddParameter (const std::string &key, const std::string &value, bool addIfNotExists=true)
 
std::string findParameter (const std::string &key)
 
const ParameterMapgetParameters () const
 
- Public Member Functions inherited from bbcpp::BBNode
 BBNode (NodeType nodeType, const std::string &name)
 
virtual ~BBNode ()=default
 
const std::string & getNodeName () const
 
NodeType getNodeType () const
 
BBNodePtr getParent () const
 
const BBNodeListgetChildren () const
 
virtual void appendChild (BBNodePtr node)
 
template<typename NewTypePtrT >
NewTypePtrT downCast (bool bThrowOnFail=true)
 
template<typename NewTypePtrT >
NewTypePtrT downCast (bool bThrowOnFail=true) const
 

Private Attributes

ElementType _elementType = BBElement::SIMPLE
 
ParameterMap _parameters
 

Additional Inherited Members

- Protected Attributes inherited from bbcpp::BBNode
std::string _name
 
NodeType _nodeType
 
BBNodeWeakPtr _parent
 
BBNodeList _children
 

Detailed Description

Definition at line 181 of file BBDocument.h.

Member Enumeration Documentation

◆ ElementType

Enumerator
SIMPLE 
VALUE 
PARAMETER 
CLOSING 

Definition at line 184 of file BBDocument.h.

Constructor & Destructor Documentation

◆ BBElement()

bbcpp::BBElement::BBElement ( const std::string &  name,
ElementType  et = BBElement::SIMPLE 
)
inline

Definition at line 192 of file BBDocument.h.

◆ ~BBElement()

virtual bbcpp::BBElement::~BBElement ( )
virtualdefault

Member Function Documentation

◆ findParameter()

std::string bbcpp::BBElement::findParameter ( const std::string &  key)
inline

Definition at line 208 of file BBDocument.h.

◆ getElementType()

const ElementType bbcpp::BBElement::getElementType ( ) const
inline

Definition at line 201 of file BBDocument.h.

◆ getParameters()

const ParameterMap & bbcpp::BBElement::getParameters ( ) const
inline

Definition at line 218 of file BBDocument.h.

◆ setOrAddParameter()

void bbcpp::BBElement::setOrAddParameter ( const std::string &  key,
const std::string &  value,
bool  addIfNotExists = true 
)
inline

Definition at line 203 of file BBDocument.h.

Field Documentation

◆ _elementType

ElementType bbcpp::BBElement::_elementType = BBElement::SIMPLE
private

Definition at line 221 of file BBDocument.h.

◆ _parameters

ParameterMap bbcpp::BBElement::_parameters
private

Definition at line 222 of file BBDocument.h.


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