Lluvia
ContainerNodeDescriptor.h
Go to the documentation of this file.
1 
8 #ifndef LLUVIA_CORE_NODE_CONTAINER_DESCRIPTOR_NODE_H_
9 #define LLUVIA_CORE_NODE_CONTAINER_DESCRIPTOR_NODE_H_
10 
11 #include "lluvia/core/node/Node.h"
13 #include "lluvia/core/types.h"
14 
15 #include <map>
16 #include <string>
17 
18 namespace ll {
19 
26 
27 public:
29  ContainerNodeDescriptor(const ContainerNodeDescriptor& descriptor) = default;
31 
33 
36 
45 
53  ContainerNodeDescriptor& addPorts(const std::initializer_list<ll::PortDescriptor>& ports);
54 
65  const ll::PortDescriptor& getPort(const std::string& name) const;
66 
75  ContainerNodeDescriptor& setParameter(const std::string& name, const ll::Parameter& value);
76 
87  const ll::Parameter& getParameter(const std::string& name) const;
88 
96  ContainerNodeDescriptor& setBuilderName(const std::string& name) noexcept;
97 
103  const std::string& getBuilderName() const noexcept;
104 
105 private:
106  std::string m_builderName;
107  std::map<std::string, ll::PortDescriptor> m_ports;
108  std::map<std::string, ll::Parameter> m_parameters;
109 };
110 
111 } // namespace ll
112 
113 #endif // LLUVIA_CORE_NODE_CONTAINER_DESCRIPTOR_NODE_H_
Node class and related enums.
Parameter class and related enums.
Class for describing a container node.
Definition: ContainerNodeDescriptor.h:25
const ll::Parameter & getParameter(const std::string &name) const
Gets a parameter.
ContainerNodeDescriptor & operator=(const ContainerNodeDescriptor &descriptor)=default
ContainerNodeDescriptor & operator=(ContainerNodeDescriptor &&descriptor)=default
ContainerNodeDescriptor(ContainerNodeDescriptor &&descriptor)=default
ContainerNodeDescriptor & setBuilderName(const std::string &name) noexcept
Sets the builder name this descriptor refers to within the Lua interpreter.
const ll::PortDescriptor & getPort(const std::string &name) const
Gets a port descriptor given its name.
ContainerNodeDescriptor & setParameter(const std::string &name, const ll::Parameter &value)
Adds a parameter.
ContainerNodeDescriptor(const ContainerNodeDescriptor &descriptor)=default
ContainerNodeDescriptor & addPort(const ll::PortDescriptor &port)
Adds a port to the descriptor.
ContainerNodeDescriptor & addPorts(const std::initializer_list< ll::PortDescriptor > &ports)
Adds a list of ports to the descriptor.
const std::string & getBuilderName() const noexcept
Gets the builder name within the Lua interpreter.
Definition: Parameter.h:23
Definition: PortDescriptor.h:27
Definition: Buffer.h:28
Common types.