.TH "SoOneShot" 3 "Fri Sep 6 2024 15:32:06" "Version 4.0.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoOneShot \- The \fBSoOneShot\fP class is a timer that runs for a configurable time and then stops\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBSoEngine\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBFlags\fP { \fBRETRIGGERABLE\fP =1, \fBHOLD_FINAL\fP =2 }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const" .br .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 "\fBSoOneShot\fP (void)" .br .in -1c Public Member Functions inherited from \fBSoEngine\fP .in +1c .ti -1c .RI "void \fBevaluateWrapper\fP (void)" .br .ti -1c .RI "virtual int \fBgetOutputs\fP (\fBSoEngineOutputList\fP &l) const" .br .ti -1c .RI "\fBSoEngineOutput\fP * \fBgetOutput\fP (const \fBSbName\fP &outputname) const" .br .ti -1c .RI "SbBool \fBgetOutputName\fP (const \fBSoEngineOutput\fP *output, \fBSbName\fP &outputname) const" .br .ti -1c .RI "SbBool \fBisNotifying\fP (void) const" .br .ti -1c .RI "virtual void \fBnotify\fP (\fBSoNotList\fP *nl)" .br .ti -1c .RI "\fBSoEngine\fP * \fBcopy\fP (void) const" .br .ti -1c .RI "virtual \fBSoFieldContainer\fP * \fBcopyThroughConnection\fP (void) const" .br .ti -1c .RI "SbBool \fBshouldCopy\fP (void) const" .br .in -1c Public Member Functions inherited from \fBSoFieldContainer\fP .in +1c .ti -1c .RI "void \fBsetToDefaults\fP (void)" .br .ti -1c .RI "SbBool \fBhasDefaultValues\fP (void) const" .br .ti -1c .RI "SbBool \fBfieldsAreEqual\fP (const \fBSoFieldContainer\fP *container) const" .br .ti -1c .RI "void \fBcopyFieldValues\fP (const \fBSoFieldContainer\fP *container, SbBool copyconnections=FALSE)" .br .ti -1c .RI "SbBool \fBset\fP (const char *const fielddata)" .br .ti -1c .RI "void \fBget\fP (\fBSbString\fP &fielddata)" .br .ti -1c .RI "virtual int \fBgetFields\fP (\fBSoFieldList\fP &l) const" .br .ti -1c .RI "virtual int \fBgetAllFields\fP (\fBSoFieldList\fP &l) const" .br .ti -1c .RI "virtual \fBSoField\fP * \fBgetField\fP (const \fBSbName\fP &name) const" .br .ti -1c .RI "virtual \fBSoField\fP * \fBgetEventIn\fP (const \fBSbName\fP &name) const" .br .ti -1c .RI "virtual \fBSoField\fP * \fBgetEventOut\fP (const \fBSbName\fP &name) const" .br .ti -1c .RI "SbBool \fBgetFieldName\fP (const \fBSoField\fP *const field, \fBSbName\fP &name) const" .br .ti -1c .RI "SbBool \fBenableNotify\fP (const SbBool flag)" .br .ti -1c .RI "SbBool \fBisNotifyEnabled\fP (void) const" .br .ti -1c .RI "SbBool \fBset\fP (const char *fielddata, \fBSoInput\fP *input)" .br .ti -1c .RI "void \fBget\fP (\fBSbString\fP &fielddata, \fBSoOutput\fP *out)" .br .ti -1c .RI "virtual SbBool \fBvalidateNewFieldValue\fP (\fBSoField\fP *field, void *newval)" .br .ti -1c .RI "virtual void \fBaddWriteReference\fP (\fBSoOutput\fP *out, SbBool isfromfield=FALSE)" .br .ti -1c .RI "SbBool \fBgetIsBuiltIn\fP (void) const" .br .ti -1c .RI "virtual void \fBcopyContents\fP (const \fBSoFieldContainer\fP *from, SbBool copyconnections)" .br .ti -1c .RI "virtual void \fBgetFieldsMemorySize\fP (size_t &managed, size_t &unmanaged) const" .br .ti -1c .RI "void \fBsetUserData\fP (void *userdata) const" .br .ti -1c .RI "void * \fBgetUserData\fP (void) const" .br .in -1c Public Member Functions inherited from \fBSoBase\fP .in +1c .ti -1c .RI "void \fBref\fP (void) const" .br .ti -1c .RI "void \fBunref\fP (void) const" .br .ti -1c .RI "void \fBunrefNoDelete\fP (void) const" .br .ti -1c .RI "int32_t \fBgetRefCount\fP (void) const" .br .ti -1c .RI "void \fBtouch\fP (void)" .br .ti -1c .RI "SbBool \fBisOfType\fP (\fBSoType\fP type) const" .br .RI "Returns \fRTRUE\fP if the type of this object is either of the same type or inherited from \fItype\fP\&. " .ti -1c .RI "virtual \fBSbName\fP \fBgetName\fP (void) const" .br .ti -1c .RI "virtual void \fBsetName\fP (const \fBSbName\fP &newname)" .br .ti -1c .RI "virtual void \fBstartNotify\fP (void)" .br .ti -1c .RI "void \fBaddAuditor\fP (void *const auditor, const \fBSoNotRec::Type\fP type)" .br .ti -1c .RI "void \fBremoveAuditor\fP (void *const auditor, const \fBSoNotRec::Type\fP type)" .br .ti -1c .RI "const \fBSoAuditorList\fP & \fBgetAuditors\fP (void) const" .br .ti -1c .RI "SbBool \fBshouldWrite\fP (void)" .br .ti -1c .RI "void \fBassertAlive\fP (void) const" .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 .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .in -1c Static Public Member Functions inherited from \fBSoEngine\fP .in +1c .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .ti -1c .RI "static void \fBinitClasses\fP (void)" .br .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "This static method returns the \fBSoType\fP object associated with objects of this class\&. " .ti -1c .RI "static \fBSoEngine\fP * \fBgetByName\fP (const \fBSbName\fP &name)" .br .ti -1c .RI "static int \fBgetByName\fP (const \fBSbName\fP &name, \fBSoEngineList\fP &el)" .br .in -1c Static Public Member Functions inherited from \fBSoFieldContainer\fP .in +1c .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "This static method returns the \fBSoType\fP object associated with objects of this class\&. " .ti -1c .RI "static void \fBcleanupClass\fP (void)" .br .ti -1c .RI "static void \fBinitCopyDict\fP (void)" .br .ti -1c .RI "static void \fBaddCopy\fP (const \fBSoFieldContainer\fP *orig, const \fBSoFieldContainer\fP *copy)" .br .ti -1c .RI "static \fBSoFieldContainer\fP * \fBcheckCopy\fP (const \fBSoFieldContainer\fP *orig)" .br .ti -1c .RI "static \fBSoFieldContainer\fP * \fBfindCopy\fP (const \fBSoFieldContainer\fP *orig, const SbBool copyconnections)" .br .ti -1c .RI "static void \fBcopyDone\fP (void)" .br .in -1c Static Public Member Functions inherited from \fBSoBase\fP .in +1c .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "This static method returns the \fBSoType\fP object associated with objects of this class\&. " .ti -1c .RI "static void \fBaddName\fP (\fBSoBase\fP *const base, const char *const name)" .br .ti -1c .RI "static void \fBremoveName\fP (\fBSoBase\fP *const base, const char *const name)" .br .ti -1c .RI "static void \fBincrementCurrentWriteCounter\fP (void)" .br .ti -1c .RI "static void \fBdecrementCurrentWriteCounter\fP (void)" .br .ti -1c .RI "static \fBSoBase\fP * \fBgetNamedBase\fP (const \fBSbName\fP &name, \fBSoType\fP type)" .br .ti -1c .RI "static int \fBgetNamedBases\fP (const \fBSbName\fP &name, \fBSoBaseList\fP &baselist, \fBSoType\fP type)" .br .ti -1c .RI "static SbBool \fBread\fP (\fBSoInput\fP *input, \fBSoBase\fP *&base, \fBSoType\fP expectedtype)" .br .ti -1c .RI "static void \fBsetInstancePrefix\fP (const \fBSbString\fP &c)" .br .ti -1c .RI "static void \fBsetTraceRefs\fP (SbBool trace)" .br .ti -1c .RI "static SbBool \fBgetTraceRefs\fP (void)" .br .ti -1c .RI "static SbBool \fBconnectRoute\fP (\fBSoInput\fP *input, const \fBSbName\fP &fromnodename, const \fBSbName\fP &fromfieldname, const \fBSbName\fP &tonodename, const \fBSbName\fP &tofieldname)" .br .ti -1c .RI "static SbBool \fBreadRoute\fP (\fBSoInput\fP *input)" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoSFTime\fP \fBtimeIn\fP" .br .ti -1c .RI "\fBSoSFTime\fP \fBduration\fP" .br .ti -1c .RI "\fBSoSFTrigger\fP \fBtrigger\fP" .br .ti -1c .RI "\fBSoSFBitMask\fP \fBflags\fP" .br .ti -1c .RI "\fBSoSFBool\fP \fBdisable\fP" .br .ti -1c .RI "\fBSoEngineOutput\fP \fBtimeOut\fP" .br .ti -1c .RI "\fBSoEngineOutput\fP \fBisActive\fP" .br .ti -1c .RI "\fBSoEngineOutput\fP \fBramp\fP" .br .in -1c Public Attributes inherited from \fBSoBase\fP .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual \fB~SoOneShot\fP (void)" .br .in -1c Protected Member Functions inherited from \fBSoEngine\fP .in +1c .ti -1c .RI "\fBSoEngine\fP (void)" .br .ti -1c .RI "virtual \fB~SoEngine\fP (void)" .br .ti -1c .RI "virtual SbBool \fBreadInstance\fP (\fBSoInput\fP *in, unsigned short flags)" .br .ti -1c .RI "void \fBwriteOutputTypes\fP (\fBSoOutput\fP *out)" .br .in -1c Protected Member Functions inherited from \fBSoFieldContainer\fP .in +1c .ti -1c .RI "\fBSoFieldContainer\fP (void)" .br .ti -1c .RI "virtual \fB~SoFieldContainer\fP ()" .br .in -1c Protected Member Functions inherited from \fBSoBase\fP .in +1c .ti -1c .RI "\fBSoBase\fP (void)" .br .ti -1c .RI "virtual \fB~SoBase\fP ()" .br .ti -1c .RI "SbBool \fBhasMultipleWriteRefs\fP (void) const" .br .ti -1c .RI "SbBool \fBwriteHeader\fP (\fBSoOutput\fP *out, SbBool isgroup, SbBool isengine) const" .br .ti -1c .RI "void \fBwriteFooter\fP (\fBSoOutput\fP *out) const" .br .ti -1c .RI "virtual const char * \fBgetFileFormatName\fP (void) const" .br .ti -1c .RI "virtual \fBSoNotRec\fP \fBcreateNotRec\fP (void)" .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 Static Protected Member Functions inherited from \fBSoEngine\fP .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 Static Protected Member Functions inherited from \fBSoBase\fP .in +1c .ti -1c .RI "static uint32_t \fBgetCurrentWriteCounter\fP (void)" .br .ti -1c .RI "static void \fBstaticDataLock\fP (void)" .br .ti -1c .RI "static void \fBstaticDataUnlock\fP (void)" .br .in -1c .SS "Additional Inherited Members" Protected Types inherited from \fBSoBase\fP .in +1c .ti -1c .RI "enum \fBBaseFlags\fP { \fBIS_ENGINE\fP = 0x01, \fBIS_GROUP\fP = 0x02 }" .br .in -1c Protected Attributes inherited from \fBSoFieldContainer\fP .in +1c .ti -1c .RI "SbBool \fBisBuiltIn\fP" .br .in -1c .SH "Detailed Description" .PP The \fBSoOneShot\fP class is a timer that runs for a configurable time and then stops\&. .SH "Member Enumeration Documentation" .PP .SS "enum \fBSoOneShot::Flags\fP" There are two flags available: \fRRETRIGGERABLE\fP will cause the engine to restart at 0 if the \fBSoOneShot::trigger\fP field is activated during a run (otherwise the trigger is ignored during runs)\&. .PP \fRHOLD_FINAL\fP will make the engine outputs keep their values after a run, instead of resetting them\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoOneShot::SoOneShot (void )" Default constructor\&. .SS "SoOneShot::~SoOneShot (void )\fR [protected]\fP, \fR [virtual]\fP" Destructor is protected to avoid explicit destruction\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoOneShot::getClassTypeId (void )\fR [static]\fP" This static method returns the \fBSoType\fP object associated with objects of this class\&. .br .SS "\fBSoType\fP SoOneShot::getTypeId (void ) const\fR [virtual]\fP" Returns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for runtime type checking and 'downward' casting\&. .br .PP Implements \fBSoBase\fP\&. .SS "const \fBSoFieldData\fP ** SoOneShot::getInputDataPtr (void )\fR [static]\fP, \fR [protected]\fP" Returns the \fBSoFieldData\fP class which holds information about inputs in this engine\&. .br .SS "const \fBSoEngineOutputData\fP ** SoOneShot::getOutputDataPtr (void )\fR [static]\fP, \fR [protected]\fP" Returns the \fBSoEngineOutputData\fP class which holds information about the outputs in this engine\&. .br .SS "const \fBSoFieldData\fP * SoOneShot::getFieldData (void ) const\fR [virtual]\fP" Returns the \fBSoFieldData\fP class which holds information about inputs in this engine\&. .br .PP Reimplemented from \fBSoFieldContainer\fP\&. .SS "const \fBSoEngineOutputData\fP * SoOneShot::getOutputData (void ) const\fR [virtual]\fP" Returns the \fBSoEngineOutputData\fP class which holds information about the outputs in this engine\&. .br .PP Implements \fBSoEngine\fP\&. .SS "void * SoOneShot::createInstance (void )\fR [static]\fP" Creates a new instance of the class type corresponding to the \fBSoType\fP object\&. .br .SH "Member Data Documentation" .PP .SS "\fBSoSFTime\fP SoOneShot::timeIn" Input time source\&. Connected by default to the realTime global field, but the application programmer is free to change this to any other time source\&. .SS "\fBSoSFTime\fP SoOneShot::duration" The time the engine should run for when it is triggered\&. Defaults to 1 second\&. .SS "\fBSoSFTrigger\fP SoOneShot::trigger" A pulse on this input field starts the engine\&. .SS "\fBSoSFBitMask\fP SoOneShot::flags" Control flags\&. See \fBSoOneShot::Flags\fP\&. .SS "\fBSoSFBool\fP SoOneShot::disable" Set to \fRTRUE\fP to disable the engine completely\&. .SS "\fBSoEngineOutput\fP SoOneShot::timeOut" (\fBSoSFTime\fP) Output time\&. Will run from 0 to the value of \fBSoOneShot::duration\fP\&. .SS "\fBSoEngineOutput\fP SoOneShot::isActive" (\fBSoSFBool\fP) \fRTRUE\fP while the engine is running, \fRFALSE\fP otherwise\&. .SS "\fBSoEngineOutput\fP SoOneShot::ramp" (\fBSoSFFloat\fP) Will run from 0 to 1 during the active period\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.