Sirikata
Namespaces | Defines | Functions
liboh/plugins/js/JSObjects/JSTimer.hpp File Reference
#include <v8.h>
Include dependency graph for JSTimer.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Sirikata
 

Note: All the classes provided in this file are thin wrappers around the corresponding classes in ASIO.


namespace  Sirikata::JS
namespace  Sirikata::JS::JSTimer

Defines

#define INLINE_DECODE_TIMER_ERROR(toConvert, whereError, whereWriteTo)

Functions

v8::Handle< v8::Value > Sirikata::JS::JSTimer::resetTimer (const v8::Arguments &args)
v8::Handle< v8::Value > Sirikata::JS::JSTimer::clear (const v8::Arguments &args)
 Calling clear prevents the timer from ever re-firing again.
v8::Handle< v8::Value > Sirikata::JS::JSTimer::suspend (const v8::Arguments &args)
 Calling suspend prevents the timer from firing again until it is resumed.
v8::Handle< v8::Value > Sirikata::JS::JSTimer::resume (const v8::Arguments &args)
 Calling this function on a timer makes it so that the timer's associated callback will fire however many seconds from now the timer was initialized with.
v8::Handle< v8::Value > Sirikata::JS::JSTimer::isSuspended (const v8::Arguments &args)
v8::Handle< v8::Value > Sirikata::JS::JSTimer::getAllData (const v8::Arguments &args)
v8::Handle< v8::Value > Sirikata::JS::JSTimer::getType (const v8::Arguments &args)
void Sirikata::JS::JSTimer::setNullTimer (const v8::Arguments &args)
 Sets args.This to point to null instead of a timer object.

Define Documentation

#define INLINE_DECODE_TIMER_ERROR (   toConvert,
  whereError,
  whereWriteTo 
)
Value:
JSTimerStruct* whereWriteTo = NULL;                                         \
    {                                                                           \
        String _errMsg = "In " #whereError " of timer.  Cannot complete because likely already cleared this timer."; \
        whereWriteTo = JSTimerStruct::decodeTimerStruct(toConvert,_errMsg);   \
        if (whereWriteTo == NULL)                                               \
        {              \
            return v8::ThrowException(v8::Exception::Error(v8::String::New(_errMsg.c_str(), _errMsg.length()))); \
        } \
    }

Referenced by Sirikata::JS::JSTimer::clear().