Rumba C++ SDK
maquina::EvaluationEngine Class Referenceabstract

An evaluation engine to compute plug values. More...

#include <EvaluationEngine.h>

Public Member Functions

virtual void start (const Plug &plug, int32_t first_frame, int32_t last_frame)=0
 Compute the plug values on the interval [start_frame, end_frame] in background. More...
 
virtual void stop_and_wait ()=0
 Stop the engine and wait for it. More...
 
virtual void wait ()=0
 Wait until the engine complete its job. More...
 
virtual void set_notification (const std::function< void()> &notify)=0
 Set the notification callback. More...
 
virtual Value evaluate (const Plug &plug, float time, int32_t first_frame, int32_t last_frame, bool incremental=false, bool exact=true)=0
 Evaluate a plug value at a specific time. More...
 
virtual std::vector< Valueevaluate (const maquina::Plug &plug, const gsl::span< const float > &frames, int32_t first_frame, int32_t last_frame, bool incremental=false, bool exact=false)=0
 Evaluate a plug value at multiple times. More...
 
virtual void clear_incremental (uint32_t initial_token)=0
 Clear the incremental data. More...
 
virtual void start_profiling ()=0
 Start a profiling session. More...
 
virtual std::vector< std::pair< std::string, float > > end_profiling ()=0
 Finish a profiling session. More...
 

Static Public Member Functions

static std::shared_ptr< EvaluationEnginecreate ()
 

Detailed Description

An evaluation engine to compute plug values.

Member Function Documentation

◆ clear_incremental()

virtual void maquina::EvaluationEngine::clear_incremental ( uint32_t  initial_token)
pure virtual

Clear the incremental data.

◆ create()

static std::shared_ptr<EvaluationEngine> maquina::EvaluationEngine::create ( )
static

◆ end_profiling()

virtual std::vector<std::pair<std::string, float> > maquina::EvaluationEngine::end_profiling ( )
pure virtual

Finish a profiling session.

◆ evaluate() [1/2]

virtual Value maquina::EvaluationEngine::evaluate ( const Plug plug,
float  time,
int32_t  first_frame,
int32_t  last_frame,
bool  incremental = false,
bool  exact = true 
)
pure virtual

Evaluate a plug value at a specific time.

incremental:

Set incremental to true when evaluating multiple time the same modifications, like in an interactive rig modification. During this incremental session, the plug structure shall not be modified. The engine will keep informations to speed up the next evaluation.

Call clear_incremental to end the incremental session, free the resources or start a session.

◆ evaluate() [2/2]

virtual std::vector<Value> maquina::EvaluationEngine::evaluate ( const maquina::Plug plug,
const gsl::span< const float > &  frames,
int32_t  first_frame,
int32_t  last_frame,
bool  incremental = false,
bool  exact = false 
)
pure virtual

Evaluate a plug value at multiple times.

One frame in frames can be an arbitrary floating number frame (outside of the frame range and/or non integer) the other ones must be integer frames inside the frame range. Only one frame can be evaluated in non exact mode.

◆ set_notification()

virtual void maquina::EvaluationEngine::set_notification ( const std::function< void()> &  notify)
pure virtual

Set the notification callback.

This notification is called during the evaluation progression and at the end

◆ start()

virtual void maquina::EvaluationEngine::start ( const Plug plug,
int32_t  first_frame,
int32_t  last_frame 
)
pure virtual

Compute the plug values on the interval [start_frame, end_frame] in background.

The function returns before the evaluation is done. Call wait() to wait for the job completion.

The plug and all his dependencies connection and values should not change during the evaluation. The engine must be stopped with stop_and_wait() before such modifications are done.

◆ start_profiling()

virtual void maquina::EvaluationEngine::start_profiling ( )
pure virtual

Start a profiling session.

◆ stop_and_wait()

virtual void maquina::EvaluationEngine::stop_and_wait ( )
pure virtual

Stop the engine and wait for it.

The job won't be completed. Some of the intermediate cached values may have been computed.

◆ wait()

virtual void maquina::EvaluationEngine::wait ( )
pure virtual

Wait until the engine complete its job.


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