Sirikata
liboh/plugins/js/JSObjectStructs/JSUtilStruct.hpp
Go to the documentation of this file.
00001 #ifndef __SIRIKATA_JS_UTIL_STRUCT_HPP__
00002 #define __SIRIKATA_JS_UTIL_STRUCT_HPP__
00003 
00004 #include <sirikata/oh/HostedObject.hpp>
00005 #include <v8.h>
00006 
00007 
00008 
00009 namespace Sirikata {
00010 namespace JS {
00011 
00012 //need to forward-declare this so that can reference this inside
00013 class JSContextStruct;
00014 class JSVisibleStruct;
00015 class JSPresenceStruct;
00016 
00017 struct JSUtilStruct
00018 {
00019     JSUtilStruct(JSContextStruct* jscont);
00020     ~JSUtilStruct();
00021 
00022     static JSUtilStruct* decodeUtilStruct(v8::Handle<v8::Value> toDecode ,std::string& errorMessage);
00023 
00024     v8::Handle<v8::Value> struct_createVec3(Vector3d& toCreate );
00025     v8::Handle<v8::Value> struct_createQuaternion(Quaternion& toCreate );
00026 
00027 private:
00028     //associated data
00029     JSContextStruct* associatedContext;
00030 };
00031 
00032 
00033 }//end namespace js
00034 }//end namespace sirikata
00035 
00036 #endif