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 | Protected Attributes | Private Member Functions | Friends
bbcpp::BBNode Class Reference

#include <BBDocument.h>

+ Inheritance diagram for bbcpp::BBNode:

Public Types

enum class  NodeType { DOCUMENT , ELEMENT , TEXT , ATTRIBUTE }
 

Public Member Functions

 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
 

Protected Attributes

std::string _name
 
NodeType _nodeType
 
BBNodeWeakPtr _parent
 
BBNodeList _children
 

Private Member Functions

template<typename NewTypePtrT >
NewTypePtrT cast (BBNodePtr node, bool bThrowOnFail)
 
template<typename NewTypePtrT >
NewTypePtrT cast (BBNodePtr node, bool bThrowOnFail) const
 

Friends

class BBText
 
class BBDocument
 
class BBElement
 

Detailed Description

Definition at line 69 of file BBDocument.h.

Member Enumeration Documentation

◆ NodeType

enum class bbcpp::BBNode::NodeType
strong
Enumerator
DOCUMENT 
ELEMENT 
TEXT 
ATTRIBUTE 

Definition at line 116 of file BBDocument.h.

Constructor & Destructor Documentation

◆ BBNode()

bbcpp::BBNode::BBNode ( NodeType  nodeType,
const std::string &  name 
)

Definition at line 14 of file BBDocument.cpp.

◆ ~BBNode()

virtual bbcpp::BBNode::~BBNode ( )
virtualdefault

Member Function Documentation

◆ appendChild()

virtual void bbcpp::BBNode::appendChild ( BBNodePtr  node)
inlinevirtual

Definition at line 133 of file BBDocument.h.

◆ cast() [1/2]

template<typename NewTypePtrT >
NewTypePtrT bbcpp::BBNode::cast ( BBNodePtr  node,
bool  bThrowOnFail 
)
inlineprivate

Definition at line 72 of file BBDocument.h.

◆ cast() [2/2]

template<typename NewTypePtrT >
NewTypePtrT bbcpp::BBNode::cast ( BBNodePtr  node,
bool  bThrowOnFail 
) const
inlineprivate

Definition at line 94 of file BBDocument.h.

◆ downCast() [1/2]

template<typename NewTypePtrT >
NewTypePtrT bbcpp::BBNode::downCast ( bool  bThrowOnFail = true)
inline

Definition at line 140 of file BBDocument.h.

◆ downCast() [2/2]

template<typename NewTypePtrT >
NewTypePtrT bbcpp::BBNode::downCast ( bool  bThrowOnFail = true) const
inline

Definition at line 146 of file BBDocument.h.

◆ getChildren()

const BBNodeList & bbcpp::BBNode::getChildren ( ) const
inline

Definition at line 131 of file BBDocument.h.

◆ getNodeName()

const std::string & bbcpp::BBNode::getNodeName ( ) const
inline

Definition at line 127 of file BBDocument.h.

◆ getNodeType()

NodeType bbcpp::BBNode::getNodeType ( ) const
inline

Definition at line 128 of file BBDocument.h.

◆ getParent()

BBNodePtr bbcpp::BBNode::getParent ( ) const
inline

Definition at line 129 of file BBDocument.h.

Friends And Related Symbol Documentation

◆ BBDocument

friend class BBDocument
friend

Definition at line 158 of file BBDocument.h.

◆ BBElement

friend class BBElement
friend

Definition at line 159 of file BBDocument.h.

◆ BBText

friend class BBText
friend

Definition at line 157 of file BBDocument.h.

Field Documentation

◆ _children

BBNodeList bbcpp::BBNode::_children
protected

Definition at line 155 of file BBDocument.h.

◆ _name

std::string bbcpp::BBNode::_name
protected

Definition at line 152 of file BBDocument.h.

◆ _nodeType

NodeType bbcpp::BBNode::_nodeType
protected

Definition at line 153 of file BBDocument.h.

◆ _parent

BBNodeWeakPtr bbcpp::BBNode::_parent
protected

Definition at line 154 of file BBDocument.h.


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