.TH "SoGate" 3 "Thu May 29 2014" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoGate \- .PP The \fBSoGate\fP class is used to selectively copy values from input to output\&. .PP This engine will forward values from the \fBSoGate::input\fP field to the \fBSoGate::output\fP field when the \fBSoGate::enable\fP field is \fCTRUE\fP\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoEngine\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const " .br .RI "\fIReturns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. \fP" .ti -1c .RI "virtual const \fBSoFieldData\fP * \fBgetFieldData\fP (void) const " .br .ti -1c .RI "virtual const \fBSoEngineOutputData\fP * \fBgetOutputData\fP (void) const " .br .ti -1c .RI "\fBSoGate\fP (\fBSoType\fP type)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void * \fBcreateInstance\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoSFBool\fP \fBenable\fP" .br .ti -1c .RI "\fBSoSFTrigger\fP \fBtrigger\fP" .br .ti -1c .RI "\fBSoMField\fP * \fBinput\fP" .br .ti -1c .RI "\fBSoEngineOutput\fP * \fBoutput\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual void \fBinputChanged\fP (\fBSoField\fP *which)" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static const \fBSoFieldData\fP ** \fBgetInputDataPtr\fP (void)" .br .ti -1c .RI "static const \fBSoEngineOutputData\fP ** \fBgetOutputDataPtr\fP (void)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoGate\fP class is used to selectively copy values from input to output\&. .PP This engine will forward values from the \fBSoGate::input\fP field to the \fBSoGate::output\fP field when the \fBSoGate::enable\fP field is \fCTRUE\fP\&. Note that this engine's output field deviates a little from the 'standard' output mechanism of the majority of engine classes: the \fBSoGate::output\fP is not a permanent \fBSoEngineOutput\fP instance, but a \fIpointer\fP to a \fBSoEngineOutput\fP instance\&. The reason for this is that it is necessary to allocate the output field dynamically to make it match what the \fBSoGate::input\fP is connected to since the type of the \fBSoGate::output\fP always should be the same as the type of the \fBSoGate::input\fP\&. .PP The file format for this field is a bit special\&. Note the leading type specification, which is not necessary for most other field types: .PP .PP .nf Gate { type [...fields...] } .fi .PP .SH "Constructor & Destructor Documentation" .PP .SS "SoGate::SoGate (\fBSoType\fPtype)" Constructor\&. The type of the input/output is specified in \fItype\fP\&. .SH "Member Function Documentation" .PP .SS "virtual \fBSoType\fP SoGate::getTypeId (void) const\fC [virtual]\fP" .PP Returns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for run-time type checking and 'downward' casting\&. Usage example: .PP .PP .nf void foo(SoNode * node) { if (node->getTypeId() == SoFile::getClassTypeId()) { SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type } } .fi .PP .PP For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in \fIall\fP subclasses\&. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance \fBInventor/nodes/SoSubNode\&.h\fP (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine\&.h (for engine classes) and so on\&. .PP For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups\&. .PP Implements \fBSoBase\fP\&. .SS "virtual const \fBSoFieldData\fP* SoGate::getFieldData (void) const\fC [virtual]\fP" Returns a pointer to the class-wide field data storage object for this instance\&. If no fields are present, returns \fCNULL\fP\&. .PP Reimplemented from \fBSoFieldContainer\fP\&. .SS "virtual const \fBSoEngineOutputData\fP* SoGate::getOutputData (void) const\fC [virtual]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .PP Implements \fBSoEngine\fP\&. .SS "void SoGate::inputChanged (\fBSoField\fP *which)\fC [protected]\fP, \fC [virtual]\fP" Called when an input is changed\&. The default method does nothing, but subclasses may override this method to do The Right Thing when a specific field is changed\&. .PP Reimplemented from \fBSoEngine\fP\&. .SH "Member Data Documentation" .PP .SS "\fBSoSFBool\fP SoGate::enable" Set whether or not to forward from input to output field\&. .SS "\fBSoSFTrigger\fP SoGate::trigger" Copy the current values of the input field once to the output field\&. .SS "\fBSoMField\fP * SoGate::input" The multivalue input field which we will forward to the output when \fBSoGate::enable\fP is \fCTRUE\fP\&. .SS "\fBSoEngineOutput\fP * SoGate::output" (\fBSoMField\fP) This is the field output containing the values of \fBSoGate::input\fP\&. .PP The type of the field will of course match the type of the input field\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.