Rumba C++ SDK
maquina::VirtualPlugAttributeDelegate Class Reference

An attribute delegate for a virtual attribute. More...

#include <NodeDelegateVirtualPlug.h>

Inheritance diagram for maquina::VirtualPlugAttributeDelegate:
maquina::NodeDelegate::AttributeDelegate

Public Member Functions

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

An attribute delegate for a virtual attribute.

Constructor & Destructor Documentation

◆ VirtualPlugAttributeDelegate()

maquina::VirtualPlugAttributeDelegate::VirtualPlugAttributeDelegate ( const std::shared_ptr< VirtualAttributeNodeDelegate parent,
const VirtualAttribute attrib 
)

Member Function Documentation

◆ accepts_overrides()

virtual bool maquina::VirtualPlugAttributeDelegate::accepts_overrides ( ) const
overridevirtual

Return true is the attribute accepts overrides.

The default implementation returns false.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ add_override()

virtual void maquina::VirtualPlugAttributeDelegate::add_override ( )
overridevirtual

Add add override.

The default implementation does nothing.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ create_observer()

std::shared_ptr<maquina::NodeDelegate::Observer> maquina::VirtualPlugAttributeDelegate::create_observer ( const std::function< void()> &  func,
bool  in_interactive = true 
)
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.

◆ description()

virtual std::shared_ptr<AttributeDescriptor> maquina::VirtualPlugAttributeDelegate::description ( ) const
overridevirtual

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

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ has_node_delegate()

virtual bool maquina::VirtualPlugAttributeDelegate::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()

virtual bool maquina::VirtualPlugAttributeDelegate::is_animable ( ) const
overridevirtual

Return true is the attribute is animable.

The default implementation returns false.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ is_mutable()

virtual bool maquina::VirtualPlugAttributeDelegate::is_mutable ( ) const
overridevirtual

Return true is the attribute can be modified.

The default implementation returns false.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ is_overridden()

virtual bool maquina::VirtualPlugAttributeDelegate::is_overridden ( ) const
overridevirtual

Return true is the attribute is overridden.

The default implementation returns false.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ is_plug()

virtual bool maquina::VirtualPlugAttributeDelegate::is_plug ( ) const
overridevirtual

Return true if this attribute is a Rumba Plug.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ is_visible()

virtual bool maquina::VirtualPlugAttributeDelegate::is_visible ( ) const
overridevirtual

Return true is the attribute is visible.

The default implementation returns true.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ name()

virtual std::string maquina::VirtualPlugAttributeDelegate::name ( ) const
overridevirtual

Return the attribute name.

Implements maquina::NodeDelegate::AttributeDelegate.

◆ node_delegate()

virtual std::shared_ptr<maquina::NodeDelegate> maquina::VirtualPlugAttributeDelegate::node_delegate ( )
overridevirtual

Return the dedicated node delegate.

Implemented by the plug-in.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ owner()

virtual std::shared_ptr<maquina::NodeDelegate> maquina::VirtualPlugAttributeDelegate::owner ( )
overridevirtual

Returns the owner node.

Implemented by the plug-in.

Implements maquina::NodeDelegate::AttributeDelegate.

◆ plug()

virtual maquina::Plug maquina::VirtualPlugAttributeDelegate::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.

◆ remove_override()

virtual void maquina::VirtualPlugAttributeDelegate::remove_override ( )
overridevirtual

Remove the override.

The default implementation does nothing.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ set_value()

virtual void maquina::VirtualPlugAttributeDelegate::set_value ( const maquina::Value value,
const maquina::ModificationContext mc = maquina::ModificationContext::undoable 
)
overridevirtual

Set the attribute value.

Reimplemented from maquina::NodeDelegate::AttributeDelegate.

◆ type_name()

virtual maquina::StringView maquina::VirtualPlugAttributeDelegate::type_name ( ) const
overridevirtual

Get the attribute type name, without evaluating the attribute.

Implements maquina::NodeDelegate::AttributeDelegate.

◆ value()

virtual maquina::Value maquina::VirtualPlugAttributeDelegate::value ( const maquina::QueryContext qc = maquina::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: