Mercurial > MadButterfly
comparison nodejs/coord.cc @ 684:b346e4699e55
Add more comment for JS binding
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sat, 07 Aug 2010 19:33:42 +0800 |
parents | a588eefd3f04 |
children | 763a4e2bbd85 |
comparison
equal
deleted
inserted
replaced
683:7685c57e29d0 | 684:b346e4699e55 |
---|---|
14 #define ASSERT(x) | 14 #define ASSERT(x) |
15 #endif | 15 #endif |
16 | 16 |
17 using namespace v8; | 17 using namespace v8; |
18 | 18 |
19 /*! \defgroup xnjsmb_coord JS binding for coord objects. | |
20 * \ingroup xnjsmb | |
21 * | |
22 * @{ | |
23 */ | |
19 static void | 24 static void |
20 xnjsmb_coord_mod(Handle<Object> self, coord_t *coord) { | 25 xnjsmb_coord_mod(Handle<Object> self, coord_t *coord) { |
21 Persistent<Object> *self_hdl; | 26 Persistent<Object> *self_hdl; |
22 subject_t *subject; | 27 subject_t *subject; |
23 Handle<Value> subject_o; | 28 Handle<Value> subject_o; |
78 *err = "Unknown error"; | 83 *err = "Unknown error"; |
79 } | 84 } |
80 | 85 |
81 #include "coord-inc.h" | 86 #include "coord-inc.h" |
82 | 87 |
88 /*! \brief This function used by \ref xnjsmb_mb_rt to wrap coord object. | |
89 */ | |
83 Handle<Value> export_xnjsmb_auto_coord_new(coord_t *coord) { | 90 Handle<Value> export_xnjsmb_auto_coord_new(coord_t *coord) { |
84 xnjsmb_auto_coord_new(coord); | 91 xnjsmb_auto_coord_new(coord); |
85 } | 92 } |
86 | 93 |
87 /*! \brief Initialize Javascript object for root coord of a runtime. | 94 /*! \brief Initialize Javascript object for root coord of a runtime. |
108 obj = xnjsmb_auto_coord_new(root).As<Object>(); | 115 obj = xnjsmb_auto_coord_new(root).As<Object>(); |
109 SET(obj, "mbrt", js_rt); | 116 SET(obj, "mbrt", js_rt); |
110 | 117 |
111 SET(js_rt, "root", obj); | 118 SET(js_rt, "root", obj); |
112 } | 119 } |
120 | |
121 /* @} */ |