Rumba C++ SDK
maquina::NodeDelegate::AttributeDelegate Class Referenceabstract

A node attribute delegate. More...

#include <NodeDelegate.h>

Public Member Functions

virtual ~AttributeDelegate ()
 
virtual std::shared_ptr< NodeDelegateowner ()=0
 Returns the owner node. More...
 
virtual std::string name () const =0
 Return the attribute name. More...
 
virtual bool is_mutable () const
 Return true is the attribute can be modified. More...
 
virtual bool is_visible () const
 Return true is the attribute is visible. More...
 
virtual bool is_animable () const
 Return true is the attribute is animable. More...
 
virtual bool accepts_overrides () const
 Return true is the attribute accepts overrides. More...
 
virtual bool is_overridden () const
 Return true is the attribute is overridden. More...
 
virtual void add_override ()
 Add add override. More...
 
virtual void remove_override ()
 Remove the override. More...
 
virtual Value value () const =0
 Return the attribute value. More...
 
virtual StringView type_name () const =0
 Get the attribute type name, without evaluating the attribute. More...
 
virtual bool is_plug () const
 Return true if this attribute is a Rumba Plug. More...
 
virtual Plug plug () const
 Return the plug behind this attribute. More...
 
virtual std::string description () const
 Return the description for this attribute (see Plug description). More...
 
virtual bool has_node_delegate () const
 Return true if this attribute has a dedicated node delegate to traverse its structure. More...
 
virtual std::shared_ptr< NodeDelegatenode_delegate ()
 Return the dedicated node delegate. More...
 
virtual void set_value (const Value &value, const ModificationContext &mc=ModificationContext::undoable)
 Set the attribute value. More...
 
virtual std::shared_ptr< Observercreate_observer (const std::function< void()> &func, bool in_interactive=true)
 Return an observer which will call the func function when the attribute is possibly modified. More...
 

Detailed Description

A node attribute delegate.

Constructor & Destructor Documentation

◆ ~AttributeDelegate()

virtual maquina::NodeDelegate::AttributeDelegate::~AttributeDelegate ( )
inlinevirtual

Member Function Documentation

◆ accepts_overrides()

virtual bool maquina::NodeDelegate::AttributeDelegate::accepts_overrides ( ) const
virtual

Return true is the attribute accepts overrides.

The default implementation returns false.

◆ add_override()

virtual void maquina::NodeDelegate::AttributeDelegate::add_override ( )
virtual

Add add override.

The default implementation does nothing.

◆ create_observer()

virtual std::shared_ptr<Observer> maquina::NodeDelegate::AttributeDelegate::create_observer ( const std::function< void()> &  func,
bool  in_interactive = true 
)
virtual

Return an observer which will call the func function when the attribute is possibly modified.

The observer is called when the attribute is modified. It may be called more than necessary in some implementation, like with the Values's attributes.

To stop the function to be called, un-reference the Observer shared pointer.

If no observer can be created, returns nullptr.

◆ description()

virtual std::string maquina::NodeDelegate::AttributeDelegate::description ( ) const
virtual

Return the description for this attribute (see Plug description).

◆ has_node_delegate()

virtual bool maquina::NodeDelegate::AttributeDelegate::has_node_delegate ( ) const
virtual

Return true if this attribute has a dedicated node delegate to traverse its structure.

The default implementation returns false

◆ is_animable()

virtual bool maquina::NodeDelegate::AttributeDelegate::is_animable ( ) const
virtual

Return true is the attribute is animable.

The default implementation returns false.

◆ is_mutable()

virtual bool maquina::NodeDelegate::AttributeDelegate::is_mutable ( ) const
virtual

Return true is the attribute can be modified.

The default implementation returns false.

◆ is_overridden()

virtual bool maquina::NodeDelegate::AttributeDelegate::is_overridden ( ) const
virtual

Return true is the attribute is overridden.

The default implementation returns false.

◆ is_plug()

virtual bool maquina::NodeDelegate::AttributeDelegate::is_plug ( ) const
virtual

Return true if this attribute is a Rumba Plug.

◆ is_visible()

virtual bool maquina::NodeDelegate::AttributeDelegate::is_visible ( ) const
virtual

Return true is the attribute is visible.

The default implementation returns true.

◆ name()

virtual std::string maquina::NodeDelegate::AttributeDelegate::name ( ) const
pure virtual

Return the attribute name.

◆ node_delegate()

virtual std::shared_ptr<NodeDelegate> maquina::NodeDelegate::AttributeDelegate::node_delegate ( )
virtual

Return the dedicated node delegate.

Implemented by the plug-in.

◆ owner()

virtual std::shared_ptr<NodeDelegate> maquina::NodeDelegate::AttributeDelegate::owner ( )
pure virtual

Returns the owner node.

Implemented by the plug-in.

◆ plug()

virtual Plug maquina::NodeDelegate::AttributeDelegate::plug ( ) const
virtual

Return the plug behind this attribute.

Exceptions
std::runtime_errorif the attribute is not mapped to a Plug

◆ remove_override()

virtual void maquina::NodeDelegate::AttributeDelegate::remove_override ( )
virtual

Remove the override.

The default implementation does nothing.

◆ set_value()

virtual void maquina::NodeDelegate::AttributeDelegate::set_value ( const Value value,
const ModificationContext mc = ModificationContext::undoable 
)
virtual

Set the attribute value.

◆ type_name()

virtual StringView maquina::NodeDelegate::AttributeDelegate::type_name ( ) const
pure virtual

Get the attribute type name, without evaluating the attribute.

◆ value()

virtual Value maquina::NodeDelegate::AttributeDelegate::value ( ) const
pure virtual

Return the attribute value.


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