![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <ComponentNodeData.h>
Collaboration diagram for Olympe::ComponentNode:Public Member Functions | |
| ComponentNode () | |
| ComponentNode (const std::string &type) | |
| bool | operator== (const ComponentNode &other) const |
| bool | operator!= (const ComponentNode &other) const |
| std::string | ToDisplayString () const |
| json | ToJson () const |
| void | SetProperty (const std::string &key, const std::string &value) |
| std::string | GetProperty (const std::string &key) const |
| bool | HasProperty (const std::string &key) const |
| Vector | GetCurrentColor () const |
| void | InitializePorts (uint32_t numInputPorts=1, uint32_t numOutputPorts=1) |
| const std::vector< NodePort > & | GetPorts () const |
| std::vector< NodePort > & | GetPorts () |
| NodePort * | FindPort (PortId portId) |
| const NodePort * | FindPort (PortId portId) const |
Static Public Member Functions | |
| static ComponentNode | FromJson (const json &data) |
Public Attributes | |
| NodeId | nodeId = InvalidNodeId |
| std::string | componentType |
| std::string | componentName |
| Vector | position |
| Vector | size = Vector(150.0f, 80.0f, 0.0f) |
| bool | selected = false |
| bool | hovered = false |
| bool | enabled = true |
| std::map< std::string, std::string > | properties |
| ComponentNodeStyle | style |
| std::vector< NodePort > | ports |
Definition at line 84 of file ComponentNodeData.h.
| Olympe::ComponentNode::ComponentNode | ( | ) |
Definition at line 10 of file ComponentNodeData.cpp.
References position, size, and Olympe::Vector.
|
explicit |
Definition at line 17 of file ComponentNodeData.cpp.
References position, size, and Olympe::Vector.
Definition at line 192 of file ComponentNodeData.cpp.
References GetComponentTypeID_Static(), and ports.
Here is the call graph for this function:Definition at line 204 of file ComponentNodeData.cpp.
References GetComponentTypeID_Static(), and ports.
Here is the call graph for this function:
|
static |
Definition at line 76 of file ComponentNodeData.cpp.
References Olympe::NodePort::FromJson(), GetComponentTypeID_Static(), and nodeId.
Here is the call graph for this function:| Vector Olympe::ComponentNode::GetCurrentColor | ( | ) | const |
Definition at line 148 of file ComponentNodeData.cpp.
References Olympe::ComponentNodeStyle::disabledColor, enabled, Olympe::ComponentNodeStyle::hoverColor, hovered, Olympe::ComponentNodeStyle::normalColor, selected, Olympe::ComponentNodeStyle::selectedColor, and style.
| std::vector< NodePort > & Olympe::ComponentNode::GetPorts | ( | ) |
Definition at line 187 of file ComponentNodeData.cpp.
References ports.
Definition at line 182 of file ComponentNodeData.cpp.
References ports.
| std::string Olympe::ComponentNode::GetProperty | ( | const std::string & | key | ) | const |
Definition at line 133 of file ComponentNodeData.cpp.
References GetComponentTypeID_Static(), and properties.
Here is the call graph for this function:Definition at line 143 of file ComponentNodeData.cpp.
References GetComponentTypeID_Static(), and properties.
Here is the call graph for this function:| void Olympe::ComponentNode::InitializePorts | ( | uint32_t | numInputPorts = 1, |
| uint32_t | numOutputPorts = 1 |
||
| ) |
Definition at line 165 of file ComponentNodeData.cpp.
References GetComponentTypeID_Static(), nodeId, and ports.
Here is the call graph for this function:| bool Olympe::ComponentNode::operator!= | ( | const ComponentNode & | other | ) | const |
Definition at line 29 of file ComponentNodeData.cpp.
References GetComponentTypeID_Static().
Here is the call graph for this function:| bool Olympe::ComponentNode::operator== | ( | const ComponentNode & | other | ) | const |
Definition at line 24 of file ComponentNodeData.cpp.
References componentType, GetComponentTypeID_Static(), and nodeId.
Here is the call graph for this function:Definition at line 128 of file ComponentNodeData.cpp.
References GetComponentTypeID_Static(), and properties.
Here is the call graph for this function:| std::string Olympe::ComponentNode::ToDisplayString | ( | ) | const |
Definition at line 34 of file ComponentNodeData.cpp.
References componentName, componentType, and enabled.
| nlohmann::json Olympe::ComponentNode::ToJson | ( | ) | const |
Definition at line 48 of file ComponentNodeData.cpp.
References componentName, componentType, enabled, GetComponentTypeID_Static(), nodeId, ports, position, properties, selected, size, Vector::x, and Vector::y.
Here is the call graph for this function:| std::string Olympe::ComponentNode::componentName |
Definition at line 88 of file ComponentNodeData.h.
Referenced by ToDisplayString(), and ToJson().
| std::string Olympe::ComponentNode::componentType |
Definition at line 87 of file ComponentNodeData.h.
Referenced by operator==(), ToDisplayString(), and ToJson().
Definition at line 93 of file ComponentNodeData.h.
Referenced by GetCurrentColor(), ToDisplayString(), and ToJson().
Definition at line 92 of file ComponentNodeData.h.
Referenced by GetCurrentColor().
| NodeId Olympe::ComponentNode::nodeId = InvalidNodeId |
Definition at line 86 of file ComponentNodeData.h.
Referenced by FromJson(), InitializePorts(), operator==(), and ToJson().
| std::vector<NodePort> Olympe::ComponentNode::ports |
Definition at line 96 of file ComponentNodeData.h.
Referenced by FindPort(), FindPort(), GetPorts(), GetPorts(), InitializePorts(), and ToJson().
| Vector Olympe::ComponentNode::position |
Definition at line 89 of file ComponentNodeData.h.
Referenced by Olympe::PrefabCanvas::AcceptComponentDropAtScreenPos(), Olympe::PrefabCanvas::AddComponentNode(), Olympe::ComponentPalettePanel::AddComponentToGraph(), ComponentNode(), ComponentNode(), Olympe::PrefabCanvas::SelectNodesInRectangle(), and ToJson().
| std::map<std::string, std::string> Olympe::ComponentNode::properties |
Definition at line 94 of file ComponentNodeData.h.
Referenced by GetProperty(), HasProperty(), SetProperty(), and ToJson().
Definition at line 91 of file ComponentNodeData.h.
Referenced by GetCurrentColor(), and ToJson().
Definition at line 90 of file ComponentNodeData.h.
Referenced by ComponentNode(), ComponentNode(), and ToJson().
| ComponentNodeStyle Olympe::ComponentNode::style |
Definition at line 95 of file ComponentNodeData.h.
Referenced by GetCurrentColor().