DD::Image::Executable Class Reference

Class to wrap up node graph execution. More...

Inherited by DD::Image::ParticleCache, DD::Image::Write, and DD::Image::WriteGeo.

List of all members.

Public Types

enum  ExecMode { WriteOne, WriteAny, WriteMany }

Public Member Functions

 Executable (Op *op)
virtual void beginExecuting ()
virtual void execute ()=0
virtual bool isExecuteThreadSafe () const
virtual void endExecuting ()
void setViewsToExecute (const std::set< int > &view)
void clearViewsToExecute ()
const std::set< int > & viewsToExecute ()
virtual ExecMode execViewMode ()
 can this node be usefully executed for more than one view in sequence
virtual ExecMode execFrameMode ()
 can this node be usefully executed for more then one frame in sequence
virtual const std::set< int > & views ()
 return the views that this node will execute
virtual bool isWrite () const
 return true if this should be picked up by an execute of everything
void frameRangeKnobs (Knob_Callback)
 provide frame range knobs and a 'limit to frame range'
virtual bool skipForContext (const OutputContext &context) const
int frameRangeKnobsChanged (DD::Image::Knob *knob)
virtual Executableexecutable ()=0
virtual const char * filename () const

Detailed Description

Class to wrap up node graph execution.


Member Enumeration Documentation

Enumerator:
WriteOne 

The Op can only be usefully executed for one view/frame unless a filename knob changes when the view or frame changes

WriteAny 

The Op can be usefully executed for various views/frames, even though no knobs change when the view/frame changes. A movie file can do this for frames, for instance.

WriteMany 

The op, when executed, will ignore the views/frames passed to it, and instead write out a set of views or frames that it chooses. (exr writer with multiple views, for example)


Member Function Documentation

virtual bool DD::Image::Executable::isExecuteThreadSafe ( ) const [inline, virtual]

Whether the execute() function on this Executable object can be safely run in a parallel thread. If you return true from this you cannot use any knob setting functions, in particular.

Executable::ExecMode DD::Image::Executable::execViewMode ( ) [virtual]

can this node be usefully executed for more than one view in sequence

Default is WriteAny, indicating this can be called over and over with different views. Note that the Write Op overrides this and returns WriteOne by default.

Reimplemented in DD::Image::Write, and DD::Image::WriteGeo.

References WriteAny.

Executable::ExecMode DD::Image::Executable::execFrameMode ( ) [virtual]

can this node be usefully executed for more then one frame in sequence

Default is WriteAny, indicating this can be called over and over with different frames. Note that the Write Op overrides this and returns WriteOne by default.

Reimplemented in DD::Image::Write, and DD::Image::WriteGeo.

References WriteAny.

bool DD::Image::Executable::isWrite ( ) const [virtual]

return true if this should be picked up by an execute of everything

Return true if this node should be executed when the user asks for the group or script containing this node to be executed. Typically true only for Write nodes.

Reimplemented in DD::Image::Write.

bool DD::Image::Executable::skipForContext ( const OutputContext context) const [virtual]

return true if this node should be skipped for this context. default implementation is used for the 'limit to frame range' facility by Write/WriteGeo; if you call frameRangeKnobs in your knobs function you get that behaviour, but it can also be overriden

References DD::Image::ValueStuffI::get_value(), and DD::Image::Op::knob().

int DD::Image::Executable::frameRangeKnobsChanged ( DD::Image::Knob knob)

If you use frameRangeKnobs your knob_changed should call this and return 1 if it returns 1, to handle enabling/disabling of the limit knobs. It is interested in both the knob 'use_limit' and &Knob::showPanel

References DD::Image::Knob::enable(), DD::Image::Knob::is(), DD::Image::Op::knob(), and DD::Image::Knob::showPanel.

virtual const char* DD::Image::Executable::filename ( ) const [inline, virtual]

Get the filename that this wishes to write to (if any), otherwise NULL.