Rumba C++ SDK
maquina::NodeDelegateMaquinaAttributeDelegate Class Reference

Implementation of the attribute for the Rumba nodes. More...

#include <NodeDelegateMaquinaAttributeDelegate.h>

Inheritance diagram for maquina::NodeDelegateMaquinaAttributeDelegate:
maquina::NodeDelegate::AttributeDelegate

Public Member Functions

 NodeDelegateMaquinaAttributeDelegate (void *plug)
 
std::shared_ptr< maquina::NodeDelegateowner () override
 Returns the owner node. More...
 
std::string name () const override
 Return the attribute name. More...
 
bool is_mutable () const override
 Return true is the attribute can be modified. More...
 
bool is_visible () const override
 Return true is the attribute is visible. More...
 
bool is_animable () const override
 Return true is the attribute is animable. More...
 
maquina::Value value (const QueryContext &qc=QueryContext::at_current_frame) const override
 Return the attribute value. More...
 
maquina::StringView type_name () const override
 Get the attribute type name, without evaluating the attribute. More...
 
void set_value (const maquina::Value &value, const maquina::ModificationContext &mc) override
 Set the attribute value. More...
 
std::shared_ptr< maquina::NodeDelegate::Observercreate_observer (const std::function< void()> &func, bool in_interactive) override
 Return an observer which will call the func function when the attribute is possibly modified. More...
 
bool is_plug () const override
 Return true if this attribute is a Rumba Plug. More...
 
maquina::Plug plug () const override
 Return the plug behind this attribute. More...
 
bool has_node_delegate () const override
 Return true if this attribute has a dedicated node delegate to traverse its structure. More...
 
std::shared_ptr< maquina::NodeDelegatenode_delegate () override
 Return the dedicated node delegate. More...
 
- Public Member Functions inherited from maquina::NodeDelegate::AttributeDelegate
virtual ~AttributeDelegate ()
 
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 std::shared_ptr< AttributeDescriptordescription () const
 Return the description for this attribute (see Plug description). More...
 
virtual std::shared_ptr< Channelchannel ()
 If this attribute has a single channel, return it, return nullptr otherwise. More...
 
virtual std::shared_ptr< Channelchannel (const ChannelType sc)
 Return the specified channel if available, return nullptr otherwise. More...
 
virtual std::vector< Channelchannels ()
 Return all the attribute's channels. More...
 

Detailed Description

Implementation of the attribute for the Rumba nodes.

Constructor & Destructor Documentation

◆ NodeDelegateMaquinaAttributeDelegate()

maquina::NodeDelegateMaquinaAttributeDelegate::NodeDelegateMaquinaAttributeDelegate ( void *  plug)

Member Function Documentation

◆ create_observer()

std::shared_ptr<maquina::NodeDelegate::Observer> maquina::NodeDelegateMaquinaAttributeDelegate::create_observer ( const std::function< void()> &  func,
bool  in_interactive 
)
overridevirtual

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.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ has_node_delegate()

bool maquina::NodeDelegateMaquinaAttributeDelegate::has_node_delegate ( ) const
overridevirtual

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

The default implementation returns false

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ is_animable()

bool maquina::NodeDelegateMaquinaAttributeDelegate::is_animable ( ) const
overridevirtual

Return true is the attribute is animable.

The default implementation returns false.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ is_mutable()

bool maquina::NodeDelegateMaquinaAttributeDelegate::is_mutable ( ) const
overridevirtual

Return true is the attribute can be modified.

The default implementation returns false.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ is_plug()

bool maquina::NodeDelegateMaquinaAttributeDelegate::is_plug ( ) const
overridevirtual

Return true if this attribute is a Rumba Plug.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ is_visible()

bool maquina::NodeDelegateMaquinaAttributeDelegate::is_visible ( ) const
overridevirtual

Return true is the attribute is visible.

The default implementation returns true.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ name()

std::string maquina::NodeDelegateMaquinaAttributeDelegate::name ( ) const
overridevirtual

Return the attribute name.

Implements maquina::NodeDelegate::AttributeDelegate.

◆ node_delegate()

std::shared_ptr<maquina::NodeDelegate> maquina::NodeDelegateMaquinaAttributeDelegate::node_delegate ( )
overridevirtual

Return the dedicated node delegate.

Implemented by the plug-in.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ owner()

std::shared_ptr<maquina::NodeDelegate> maquina::NodeDelegateMaquinaAttributeDelegate::owner ( )
overridevirtual

Returns the owner node.

Implemented by the plug-in.

Implements maquina::NodeDelegate::AttributeDelegate.

◆ plug()

maquina::Plug maquina::NodeDelegateMaquinaAttributeDelegate::plug ( ) const
overridevirtual

Return the plug behind this attribute.

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

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ set_value()

void maquina::NodeDelegateMaquinaAttributeDelegate::set_value ( const maquina::Value value,
const maquina::ModificationContext mc 
)
overridevirtual

Set the attribute value.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ type_name()

maquina::StringView maquina::NodeDelegateMaquinaAttributeDelegate::type_name ( ) const
overridevirtual

Get the attribute type name, without evaluating the attribute.

Implements maquina::NodeDelegate::AttributeDelegate.

◆ value()

maquina::Value maquina::NodeDelegateMaquinaAttributeDelegate::value ( const QueryContext qc = QueryContext::at_current_frame) const
overridevirtual

Return the attribute value.

Implements maquina::NodeDelegate::AttributeDelegate.


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