![]() |
http://www.sim.no http://www.coin3d.org |
The SoEngineOutput class is the output slots in SoEngine instances. More...
#include <Inventor/engines/SoEngine.h>
Public Member Functions | |
SoEngineOutput (void) | |
virtual | ~SoEngineOutput () |
SoType | getConnectionType (void) const |
int | getForwardConnections (SoFieldList &fl) const |
void | enable (const SbBool flag) |
SbBool | isEnabled (void) const |
SoEngine * | getContainer (void) const |
SoNodeEngine * | getNodeContainer (void) const |
SbBool | isNodeEngineOutput (void) const |
void | setContainer (SoEngine *engine) |
void | setNodeContainer (SoNodeEngine *nodeengine) |
void | addConnection (SoField *f) |
void | removeConnection (SoField *f) |
int | getNumConnections (void) const |
SoField * | operator[] (int i) const |
void | prepareToWrite (void) const |
void | doneWriting (void) const |
void | touchSlaves (SoNotList *nl, SbBool donotify) |
SoFieldContainer * | getFieldContainer (void) |
The SoEngineOutput class is the output slots in SoEngine instances.
SoEngineOutput has methods for convenient handling of the connections made from SoEngine objects to SoField objects.
SoEngineOutput::SoEngineOutput | ( | void | ) |
Constructor. The SoEngineOutput will initially not be contained within an SoEngine nor will it have any slave fields attached.
Referenced by prepareToWrite().
|
virtual |
Destructor.
References getForwardConnections(), and SoDebugError::postInfo().
SoType SoEngineOutput::getConnectionType | ( | void | ) | const |
Returns the type of the engine output.
References getContainer(), getNodeContainer(), SoEngine::getOutputData(), SoNodeEngine::getOutputData(), and isNodeEngineOutput().
Referenced by SoField::connectFrom(), and SoDB::createRoute().
int SoEngineOutput::getForwardConnections | ( | SoFieldList & | fl | ) | const |
Adds all slave fields connected to this output to fl. Returns the number of slaves.
References SoFieldList::append(), SoField::getContainer(), SoFieldConverter::getForwardConnections(), and SoBase::isOfType().
Referenced by SoDB::createRoute(), SoField::disconnect(), and ~SoEngineOutput().
void SoEngineOutput::enable | ( | const SbBool | flag | ) |
Sets the enabled flag. If output is disabled, the fields connected to this output will not be changed when the engine is evaluated.
References touchSlaves().
SbBool SoEngineOutput::isEnabled | ( | void | ) | const |
Returns status of the enabled flag.
Referenced by SoField::disconnect(), and touchSlaves().
SoEngine * SoEngineOutput::getContainer | ( | void | ) | const |
Returns the engine containing this output. If the engine containing this output is a NodeEngine, this method returns NULL.
References isNodeEngineOutput(), and SoDebugError::postWarning().
Referenced by addConnection(), SoField::copyConnection(), SoField::evaluateConnection(), getConnectionType(), and SoField::referencesCopy().
SoNodeEngine * SoEngineOutput::getNodeContainer | ( | void | ) | const |
Returns the node engine containing this output. If the engine containing this output is not a NodeEgine, this method returns NULL.
This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
References isNodeEngineOutput(), and SoDebugError::postWarning().
Referenced by SoField::copyConnection(), SoField::evaluateConnection(), getConnectionType(), and SoField::referencesCopy().
SbBool SoEngineOutput::isNodeEngineOutput | ( | void | ) | const |
Returns TRUE if the container is a NodeEngine.
This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
Referenced by addConnection(), SoField::copyConnection(), SoField::evaluateConnection(), getConnectionType(), getContainer(), getNodeContainer(), and SoField::referencesCopy().
void SoEngineOutput::setContainer | ( | SoEngine * | engine | ) |
Sets the engine containing this output.
void SoEngineOutput::setNodeContainer | ( | SoNodeEngine * | nodeengine | ) |
Sets the NodeEngine containing this output.
This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
void SoEngineOutput::addConnection | ( | SoField * | f | ) |
Adds f to the list of connections from this output.
Adds 1 to the reference count of the container engine.
References getContainer(), SoField::getContainer(), getFieldContainer(), isNodeEngineOutput(), SoBase::isOfType(), SoDebugError::postWarning(), and SoBase::ref().
Referenced by SoField::connectFrom(), and SoField::connectFrom().
void SoEngineOutput::removeConnection | ( | SoField * | f | ) |
Removes f from the list of connections from this output.
Subtracts 1 from the reference count of the container engine. If the reference count reaches zero (which will happen if this was the last connection and the application programmer did not explicitly ref the engine), the container engine will be deallocated.
References SoField::getContainer(), getFieldContainer(), SoBase::isOfType(), SoDebugError::postWarning(), and SoBase::unref().
Referenced by SoField::disconnect(), and SoField::disconnect().
int SoEngineOutput::getNumConnections | ( | void | ) | const |
Returns the number of fields in the list of connections.
Referenced by touchSlaves().
SoField * SoEngineOutput::operator[] | ( | int | i | ) | const |
Returns the field at index i in the list of connections.
Please note that this might not be the same field as the one the output was originally connected to, since a field converted might have been inserted to converted the output to match the field type.
Returns element at idx.
Will automatically expand the size of the internal array if idx is outside the current bounds of the list. The values of any additional pointers are then set to NULL
.
void SoEngineOutput::prepareToWrite | ( | void | ) | const |
Disables notifications on fields connected to this output. This is done before the engine is evaulated, since the fields we are going to write into have already been notified.
References SbList< Type >::append(), SoField::enableNotify(), SoField::isNotifyEnabled(), SoEngineOutput(), and SbList< Type >::truncate().
void SoEngineOutput::doneWriting | ( | void | ) | const |
Restores the notification flags on fields connected to this output after evaluating.
void SoEngineOutput::touchSlaves | ( | SoNotList * | nl, |
SbBool | donotify ) |
Notify the fields attached to this engine output that the output value has changed.
If donotify is TRUE
, propagate the notification to the fields. Otherwise just mark the fields "dirty" for re-evalution.
Note that this method is not part of the original Open Inventor API.
References getNumConnections(), isEnabled(), SoField::notify(), and SoField::setDirty().
Referenced by enable().
SoFieldContainer * SoEngineOutput::getFieldContainer | ( | void | ) |
Convenience method that returns a field container. This method can be used both for NodeEngine and Engine outputs.
This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
Referenced by addConnection(), SoField::connectFrom(), SoField::countWriteRefs(), and removeConnection().
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Thu Jan 16 2025 for Coin by Doxygen. 1.13.2