Sirikata
Classes | Namespaces | Defines | Typedefs
liboh/plugins/js/JSObjectStructs/JSContextStruct.hpp File Reference
#include <sirikata/oh/HostedObject.hpp>
#include <v8.h>
#include <vector>
#include "../JSSystemNames.hpp"
#include "../JSObjects/JSFields.hpp"
#include "JSSuspendable.hpp"
#include "../JSEntityCreateInfo.hpp"
#include "../JSUtil.hpp"
#include <sirikata/core/util/Vector3.hpp>
#include <sirikata/oh/Storage.hpp>
#include <sirikata/core/util/Liveness.hpp>
#include "../EmersonHttpManager.hpp"
#include "../JSVisibleManager.hpp"
#include "JSCapabilitiesConsts.hpp"
#include "../JSCtx.hpp"
Include dependency graph for JSContextStruct.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Sirikata::JS::JSContextStruct

Namespaces

namespace  Sirikata
 

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


namespace  Sirikata::JS

Defines

#define NullPresenceCheck(funcName)
#define CHECK_EMERSON_SCRIPT_ERROR(emerScriptName, errorIn, whatToCast)
#define CHECK_EMERSON_SCRIPT_RETURN(emerScriptName, errorIn, whatToCast)
#define INLINE_CONTEXT_CONV_ERROR(toConvert, whereError, whichArg, whereWriteTo)

Typedefs

typedef std::vector
< JSContextStruct * > 
Sirikata::JS::ContextVector
typedef ContextVector::iterator Sirikata::JS::ContextVecIter

Define Documentation

#define CHECK_EMERSON_SCRIPT_ERROR (   emerScriptName,
  errorIn,
  whatToCast 
)
#define CHECK_EMERSON_SCRIPT_RETURN (   emerScriptName,
  errorIn,
  whatToCast 
)
Value:
EmersonScript* emerScriptName =                                     \
        dynamic_cast<EmersonScript*> (whatToCast);                      \
    if (emerScriptName == NULL)                                         \
    {                                                                   \
        JSLOG(error,"Error in " #errorIn ".  "  <<                      \
            "Must not be in headless mode to run " #errorIn );          \
                                                                        \
        return;                                                         \
    }

Referenced by Sirikata::JS::JSContextStruct::proximateEvent().

#define INLINE_CONTEXT_CONV_ERROR (   toConvert,
  whereError,
  whichArg,
  whereWriteTo 
)
Value:
JSContextStruct* whereWriteTo;                                      \
    {                                                                   \
        String _errMsg = "In " #whereError "cannot convert " #whichArg " to sandbox struct"; \
        whereWriteTo = JSContextStruct::decodeContextStruct(toConvert,_errMsg); \
        if (whereWriteTo == NULL)                                       \
            V8_EXCEPTION_STRING(_errMsg);                               \
    }

Referenced by Sirikata::JS::JSSystem::root_sendSandbox().

#define NullPresenceCheck (   funcName)
Value:
String fname (funcName);                                            \
    if (associatedPresence == NULL)                                     \
    {                                                                   \
        String errorMessage = "Error in " + fname +                     \
            " of JSContextStruct.  " +                                  \
            "Have no default presence to perform action with.";         \
                                                                        \
        return v8::ThrowException( v8::Exception::Error(                \
                v8::String::New(errorMessage.c_str())));                \
    }

Referenced by Sirikata::JS::JSContextStruct::struct_getAssociatedPresPosition(), and Sirikata::JS::JSContextStruct::struct_sendHome().