OpenCMISS-Zinc C++ API Documentation
Public Member Functions | Protected Attributes | List of all members
OpenCMISS::Zinc::Timenotifier Class Reference

Description of timing requirements and for setting up time callbacks. More...

#include <timenotifier.hpp>

Inheritance diagram for OpenCMISS::Zinc::Timenotifier:
OpenCMISS::Zinc::TimenotifierRegular

Public Member Functions

 Timenotifier (cmzn_timenotifier_id in_timenotifier_id)
 
 Timenotifier (const Timenotifier &timenotifier)
 
Timenotifieroperator= (const Timenotifier &timenotifier)
 
bool isValid () const
 
cmzn_timenotifier_id getId () const
 
double getTime ()
 
int setCallback (Timenotifiercallback &callback)
 
int clearCallback ()
 
double getNextCallbackTime (enum Timekeeper::PlayDirection playDirection)
 
TimenotifierRegular castRegular ()
 

Protected Attributes

cmzn_timenotifier_id id
 

Detailed Description

Description of timing requirements and for setting up time callbacks.

A timenotifier informs zinc of the timing requirements of a client and can be set to receive callbacks when the time changes.

See also
Timekeeper::createTimenotifierRegular function.

Member Function Documentation

TimenotifierRegular OpenCMISS::Zinc::Timenotifier::castRegular ( )
inline

If the timenotifier is of regular type, then this function returns the derived regular time notifier handle.

Returns
Handle to derived time notifier regular, or NULL/invalid handle if wrong type or failed.
int OpenCMISS::Zinc::Timenotifier::clearCallback ( )
inline

Stop and clear selection callback. This will stop the callback and also remove the callback function from the selection notifier.

Parameters
selectionnotifierHandle to the selection notifier.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
cmzn_timenotifier_id OpenCMISS::Zinc::Timenotifier::getId ( ) const
inline

Return the C handle of the Timenotifier object.

Returns
C handle of Timenotifier if this objects is valid, 0 otherwise.
double OpenCMISS::Zinc::Timenotifier::getNextCallbackTime ( enum Timekeeper::PlayDirection  playDirection)
inline

Gets the next callback time required by this notifier. This function does not take the maximum and minimum of the timekeeper into consideration.

See also
Timekeeper::getNextCallbackTime
Parameters
playDirectionEnumeration indicating rather next forward/reverse time will be calculated.
Returns
next callback time on success.
double OpenCMISS::Zinc::Timenotifier::getTime ( )
inline

Gets the current time from the time notifier.

Returns
Current time or 0 if invalid argument.
bool OpenCMISS::Zinc::Timenotifier::isValid ( ) const
inline

Check if this is a valid Timenotifier object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Timenotifier::setCallback ( Timenotifiercallback callback)
inline

Set the callback function and user_data for the time notifier. This function also activates callbacks.

See also
cmzn_timenotifier_callback_function
Parameters
callbackfunction to be called when event is triggered.
user_data_inVoid pointer to user object. User is responsible for the life time of such object.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.

The documentation for this class was generated from the following file: