Rumba C++ SDK
maquina::Document Class Reference

The Document node plugin. More...

#include <Document.h>

Inheritance diagram for maquina::Document:
maquina::NodePlugin

Public Member Functions

 Document (Node *node)
 
bool is_active () const
 Is this document the active one ? More...
 
virtual bool set_active ()
 Set this document the active one. Only possible if the document is in the editable state. Returns true if the document has been set active. More...
 
std::string path () const
 Return the document path. More...
 
float frame () const
 Current document frame. More...
 
virtual bool save (const std::string_view &filename)
 Save the document. More...
 
virtual void set_path (std::string path) const
 Set the document path. More...
 
virtual void set_clean ()
 Mark the document as "unmodified". More...
 
void clear_undo_stack ()
 Clear the undo/redo stack. More...
 
virtual std::string filter () const
 Return the file filter name to use to save this document. Default is "Document". More...
 
void evaluate (const ProgressCallback &progress)
 Block until the background cache is up-to-date. More...
 
virtual int save_order () const
 Return the save order priority. The lower save order documents are saved first. More...
 
virtual std::vector< std::shared_ptr< maquina::NodeDelegate > > cameras () const
 Return the document's cameras. More...
 
- Public Member Functions inherited from maquina::NodePlugin
 NodePlugin (Node *node)
 
virtual ~NodePlugin ()
 
virtual void on_first_init (bool)
 Perform the one shot initialization tasks for this node. More...
 
virtual void on_delete (bool)
 Prepare the node to be deleted. More...
 
virtual void on_add_to_document ()
 Callback called when the node is added to the document. More...
 
virtual void on_remove_from_document ()
 Callback called when the node is removed from the document. More...
 
virtual void on_input_connection (const Plug &, const Plug &, bool)
 Callback called when an a connection has been done between an output plug and a plug of this node as input. More...
 
virtual void on_output_connection (const Plug &, const Plug &, bool)
 Callback called when an a connection has been done between a plug of this node as output and an input plug. More...
 
virtual void on_input_disconnection (const Plug &, const Plug &)
 Callback called when an a connection has been broken between an output plug and a plug of this node as input. More...
 
virtual void on_output_disconnection (const Plug &, const Plug &)
 Callback called when an a connection has been broken between a plug of this node as output and an input plug. More...
 
virtual void relationship (NodeSet &set) const
 Return the node relationships. More...
 
virtual std::shared_ptr< NodeDelegatenode_delegate () const
 Return a node delegate for this node. More...
 
virtual std::optional< Plugchannel_switch_output () const
 If that not is a channel switch node, return the output channel plug. More...
 
virtual std::vector< Plugchannel_switch_inputs () const
 Return the input channel plugs. More...
 
virtual std::optional< Plugchannel_switch_sub_channel (const std::string_view &sub_channel) const
 Return the plug for the sub channel name if available. More...
 
Node node () const
 Returns the Node interface for this object. More...
 
virtual std::string selection_path () const
 Returns the node delegate path to use to select that node. More...
 

Detailed Description

The Document node plugin.

Constructor & Destructor Documentation

◆ Document()

maquina::Document::Document ( Node node)
inline

Member Function Documentation

◆ cameras()

virtual std::vector<std::shared_ptr<maquina::NodeDelegate> > maquina::Document::cameras ( ) const
virtual

Return the document's cameras.

◆ clear_undo_stack()

void maquina::Document::clear_undo_stack ( )

Clear the undo/redo stack.

◆ evaluate()

void maquina::Document::evaluate ( const ProgressCallback progress)

Block until the background cache is up-to-date.

◆ filter()

virtual std::string maquina::Document::filter ( ) const
virtual

Return the file filter name to use to save this document. Default is "Document".

◆ frame()

float maquina::Document::frame ( ) const

Current document frame.

◆ is_active()

bool maquina::Document::is_active ( ) const

Is this document the active one ?

◆ path()

std::string maquina::Document::path ( ) const

Return the document path.

◆ save()

virtual bool maquina::Document::save ( const std::string_view &  filename)
virtual

Save the document.

The function can abort by returning false. {std::runtime_error,RuntimeError} if the document can't be written.

◆ save_order()

virtual int maquina::Document::save_order ( ) const
virtual

Return the save order priority. The lower save order documents are saved first.

◆ set_active()

virtual bool maquina::Document::set_active ( )
virtual

Set this document the active one. Only possible if the document is in the editable state. Returns true if the document has been set active.

◆ set_clean()

virtual void maquina::Document::set_clean ( )
virtual

Mark the document as "unmodified".

◆ set_path()

virtual void maquina::Document::set_path ( std::string  path) const
virtual

Set the document path.


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