.TH "SoCounter" 3 "Thu May 29 2014" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoCounter \- .PP The \fBSoCounter\fP class is an integer counter engine\&. .PP The engine counts from its \fImin\fP value to its \fImax\fP value, adding the value of \fIstep\fP each time \fItrigger\fP is touched\&. .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 "\fBSoCounter\fP (void)" .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 "\fBSoSFShort\fP \fBmin\fP" .br .ti -1c .RI "\fBSoSFShort\fP \fBmax\fP" .br .ti -1c .RI "\fBSoSFShort\fP \fBstep\fP" .br .ti -1c .RI "\fBSoSFTrigger\fP \fBtrigger\fP" .br .ti -1c .RI "\fBSoSFShort\fP \fBreset\fP" .br .ti -1c .RI "\fBSoEngineOutput\fP \fBoutput\fP" .br .ti -1c .RI "\fBSoEngineOutput\fP \fBsyncOut\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual \fB~SoCounter\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 .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoCounter\fP class is an integer counter engine\&. .PP The engine counts from its \fImin\fP value to its \fImax\fP value, adding the value of \fIstep\fP each time \fItrigger\fP is touched\&. \fBSoCounter\fP provides a convenient way of keeping track of the number of times some event in your application is triggered\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoCounter::SoCounter (void)" Default constructor\&. .SS "SoCounter::~SoCounter (void)\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .PP Protected, as engines are not supposed to be explicitly deleted, but rather take care of their own destiny by monitoring their reference count\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoCounter::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 "const \fBSoFieldData\fP * SoCounter::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 "const \fBSoEngineOutputData\fP * SoCounter::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\&. .SH "Member Data Documentation" .PP .SS "\fBSoSFShort\fP SoCounter::min" Minimum value for counter\&. .SS "\fBSoSFShort\fP SoCounter::max" Maximum value for counter\&. .SS "\fBSoSFShort\fP SoCounter::step" Counter step value\&. .SS "\fBSoSFTrigger\fP SoCounter::trigger" Increment counter (using step)\&. .SS "\fBSoSFShort\fP SoCounter::reset" Reset counter to this value\&. The value will be clamped between min and max, and step will be accounted for\&. .SS "\fBSoEngineOutput\fP SoCounter::output" (\fBSoSFShort\fP) Output which contains the current counter value\&. .SS "\fBSoEngineOutput\fP SoCounter::syncOut" (\fBSoSFTrigger\fP) Triggers every time counter restarts at \fBSoCounter::min\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.