-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclassv8_1_1_function_template.html
415 lines (402 loc) · 29.2 KB
/
classv8_1_1_function_template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>V8 API Reference Guide for node.js v0.10.11: v8::FunctionTemplate Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">V8 API Reference Guide for node.js v0.10.11
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#friends">Friends</a> |
<a href="classv8_1_1_function_template-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">v8::FunctionTemplate Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include <<a class="el" href="v8_8h_source.html">v8.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for v8::FunctionTemplate:</div>
<div class="dyncontent">
<div class="center">
<img src="classv8_1_1_function_template.png" usemap="#v8::FunctionTemplate_map" alt=""/>
<map id="v8::FunctionTemplate_map" name="v8::FunctionTemplate_map">
<area href="classv8_1_1_template.html" alt="v8::Template" shape="rect" coords="0,56,131,80"/>
<area href="classv8_1_1_data.html" alt="v8::Data" shape="rect" coords="0,0,131,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3b8e5e214b2ee34c36138961ebac696a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1_local.html">Local</a>< <a class="el" href="classv8_1_1_function.html">Function</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_function_template.html#a3b8e5e214b2ee34c36138961ebac696a">GetFunction</a> ()</td></tr>
<tr class="separator:a3b8e5e214b2ee34c36138961ebac696a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9eb1c827b17faf398a81068721bf40ab"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_function_template.html#a9eb1c827b17faf398a81068721bf40ab">SetCallHandler</a> (InvocationCallback callback, <a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_value.html">Value</a> > data=<a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_value.html">Value</a> >())</td></tr>
<tr class="separator:a9eb1c827b17faf398a81068721bf40ab"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a00dd9725566908e8fd14064542f5a781"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1_local.html">Local</a>< <a class="el" href="classv8_1_1_object_template.html">ObjectTemplate</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_function_template.html#a00dd9725566908e8fd14064542f5a781">InstanceTemplate</a> ()</td></tr>
<tr class="separator:a00dd9725566908e8fd14064542f5a781"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a18f343e7e5749ed886d6e76a1424216e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_function_template.html#a18f343e7e5749ed886d6e76a1424216e">Inherit</a> (<a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> > parent)</td></tr>
<tr class="separator:a18f343e7e5749ed886d6e76a1424216e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa2bcc2652b5f0fdbc666d943ccf72021"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1_local.html">Local</a>< <a class="el" href="classv8_1_1_object_template.html">ObjectTemplate</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_function_template.html#aa2bcc2652b5f0fdbc666d943ccf72021">PrototypeTemplate</a> ()</td></tr>
<tr class="separator:aa2bcc2652b5f0fdbc666d943ccf72021"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a10ad6f0d3d1f67823e08fbca7c5dde41"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_function_template.html#a10ad6f0d3d1f67823e08fbca7c5dde41">SetClassName</a> (<a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_string.html">String</a> > name)</td></tr>
<tr class="separator:a10ad6f0d3d1f67823e08fbca7c5dde41"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ade426e8a21d777ae6100e6c1aa7bfaee"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_function_template.html#ade426e8a21d777ae6100e6c1aa7bfaee">SetHiddenPrototype</a> (bool value)</td></tr>
<tr class="separator:ade426e8a21d777ae6100e6c1aa7bfaee"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a91d2e0643e8c5a53ab1d75f7766c2422"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_function_template.html#a91d2e0643e8c5a53ab1d75f7766c2422">ReadOnlyPrototype</a> ()</td></tr>
<tr class="separator:a91d2e0643e8c5a53ab1d75f7766c2422"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa883e4ab6643498662f7873506098c98"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_function_template.html#aa883e4ab6643498662f7873506098c98">HasInstance</a> (<a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_value.html">Value</a> > object)</td></tr>
<tr class="separator:aa883e4ab6643498662f7873506098c98"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classv8_1_1_template"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classv8_1_1_template')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classv8_1_1_template.html">v8::Template</a></td></tr>
<tr class="memitem:a8a29557db5d0bc980752084b925a9b01 inherit pub_methods_classv8_1_1_template"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_template.html#a8a29557db5d0bc980752084b925a9b01">Set</a> (<a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_string.html">String</a> > name, <a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_data.html">Data</a> > value, PropertyAttribute attributes=None)</td></tr>
<tr class="separator:a8a29557db5d0bc980752084b925a9b01 inherit pub_methods_classv8_1_1_template"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2efda45d51b493bd30f254941b7c8310 inherit pub_methods_classv8_1_1_template"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2efda45d51b493bd30f254941b7c8310"></a>
void </td><td class="memItemRight" valign="bottom"><b>Set</b> (const char *name, <a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_data.html">Data</a> > value)</td></tr>
<tr class="separator:a2efda45d51b493bd30f254941b7c8310 inherit pub_methods_classv8_1_1_template"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:af9012aee4a102c4018fec8e9532cb996"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classv8_1_1_local.html">Local</a>< <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_function_template.html#af9012aee4a102c4018fec8e9532cb996">New</a> (InvocationCallback callback=0, <a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_value.html">Value</a> > data=<a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_value.html">Value</a> >(), <a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_signature.html">Signature</a> > signature=<a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_signature.html">Signature</a> >())</td></tr>
<tr class="separator:af9012aee4a102c4018fec8e9532cb996"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:ac26c806e60ca4a0547680edb68f6e39b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac26c806e60ca4a0547680edb68f6e39b"></a>
class </td><td class="memItemRight" valign="bottom"><b>Context</b></td></tr>
<tr class="separator:ac26c806e60ca4a0547680edb68f6e39b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4d28646409234f556983be8a96c06424"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4d28646409234f556983be8a96c06424"></a>
class </td><td class="memItemRight" valign="bottom"><b>ObjectTemplate</b></td></tr>
<tr class="separator:a4d28646409234f556983be8a96c06424"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> is used to create functions at runtime. There can only be one function created from a <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> in a context. The lifetime of the created function is equal to the lifetime of the context. So in case the embedder needs to create temporary functions that can be collected using Scripts is preferred.</p>
<p>A <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> can have properties, these properties are added to the function object when it is created.</p>
<p>A <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> has a corresponding instance template which is used to create object instances when the function is used as a constructor. Properties added to the instance template are added to each object instance.</p>
<p>A <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> can have a prototype template. The prototype template is used to create the prototype object of the function.</p>
<p>The following example shows how to use a <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a>:</p>
<div class="fragment"><div class="line"><a class="code" href="classv8_1_1_local.html">v8::Local<v8::FunctionTemplate></a> t = <a class="code" href="classv8_1_1_function_template.html#af9012aee4a102c4018fec8e9532cb996">v8::FunctionTemplate::New</a>();</div>
<div class="line">t-><a class="code" href="classv8_1_1_template.html#a8a29557db5d0bc980752084b925a9b01">Set</a>(<span class="stringliteral">"func_property"</span>, v8::Number::New(1));</div>
<div class="line"></div>
<div class="line"><a class="code" href="classv8_1_1_local.html">v8::Local<v8::Template></a> proto_t = t-><a class="code" href="classv8_1_1_function_template.html#aa2bcc2652b5f0fdbc666d943ccf72021">PrototypeTemplate</a>();</div>
<div class="line">proto_t-><a class="code" href="classv8_1_1_template.html#a8a29557db5d0bc980752084b925a9b01">Set</a>(<span class="stringliteral">"proto_method"</span>, <a class="code" href="classv8_1_1_function_template.html#af9012aee4a102c4018fec8e9532cb996">v8::FunctionTemplate::New</a>(InvokeCallback));</div>
<div class="line">proto_t-><a class="code" href="classv8_1_1_template.html#a8a29557db5d0bc980752084b925a9b01">Set</a>(<span class="stringliteral">"proto_const"</span>, v8::Number::New(2));</div>
<div class="line"></div>
<div class="line"><a class="code" href="classv8_1_1_local.html">v8::Local<v8::ObjectTemplate></a> instance_t = t-><a class="code" href="classv8_1_1_function_template.html#a00dd9725566908e8fd14064542f5a781">InstanceTemplate</a>();</div>
<div class="line">instance_t-><a class="code" href="classv8_1_1_object_template.html#a912ade2f7db7c7e30b606d10012c2bac">SetAccessor</a>(<span class="stringliteral">"instance_accessor"</span>, InstanceAccessorCallback);</div>
<div class="line">instance_t-><a class="code" href="classv8_1_1_object_template.html#aa80e9db593d8b954c4153082dc7a439d">SetNamedPropertyHandler</a>(PropertyHandlerCallback, ...);</div>
<div class="line">instance_t-><a class="code" href="classv8_1_1_template.html#a8a29557db5d0bc980752084b925a9b01">Set</a>(<span class="stringliteral">"instance_property"</span>, Number::New(3));</div>
<div class="line"></div>
<div class="line"><a class="code" href="classv8_1_1_local.html">v8::Local<v8::Function></a> <span class="keyword">function</span> = t-><a class="code" href="classv8_1_1_function_template.html#a3b8e5e214b2ee34c36138961ebac696a">GetFunction</a>();</div>
<div class="line"><a class="code" href="classv8_1_1_local.html">v8::Local<v8::Object></a> instance = <span class="keyword">function</span>->NewInstance();</div>
</div><!-- fragment --><p>Let's use "function" as the JS variable name of the function object and "instance" for the instance object created above. The function and the instance will have the following properties:</p>
<div class="fragment"><div class="line">func_property in <span class="keyword">function</span> == <span class="keyword">true</span>;</div>
<div class="line"><span class="keyword">function</span>.func_property == 1;</div>
<div class="line"></div>
<div class="line"><span class="keyword">function</span>.prototype.proto_method() invokes <span class="stringliteral">'InvokeCallback'</span></div>
<div class="line"><span class="keyword">function</span>.prototype.proto_const == 2;</div>
<div class="line"></div>
<div class="line">instance instanceof <span class="keyword">function</span> == <span class="keyword">true</span>;</div>
<div class="line">instance.instance_accessor calls <span class="stringliteral">'InstanceAccessorCallback'</span></div>
<div class="line">instance.instance_property == 3;</div>
</div><!-- fragment --><p>A <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> can inherit from another one by calling the <a class="el" href="classv8_1_1_function_template.html#a18f343e7e5749ed886d6e76a1424216e">FunctionTemplate::Inherit</a> method. The following graph illustrates the semantics of inheritance:</p>
<div class="fragment"><div class="line">FunctionTemplate Parent -> Parent() . prototype -> { }</div>
<div class="line"> ^ ^</div>
<div class="line"> | <a class="code" href="classv8_1_1_function_template.html#a18f343e7e5749ed886d6e76a1424216e">Inherit</a>(Parent) | .__proto__</div>
<div class="line"> | |</div>
<div class="line">FunctionTemplate Child -> Child() . prototype -> { }</div>
</div><!-- fragment --><p>A <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> 'Child' inherits from 'Parent', the prototype object of the Child() function has <b>proto</b> pointing to the Parent() function's prototype object. An instance of the Child function has all properties on Parent's instance templates.</p>
<p>Let Parent be the <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> initialized in the previous section and create a Child <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> by:</p>
<div class="fragment"><div class="line">Local<FunctionTemplate> parent = t;</div>
<div class="line">Local<FunctionTemplate> child = <a class="code" href="classv8_1_1_function_template.html#af9012aee4a102c4018fec8e9532cb996">FunctionTemplate::New</a>();</div>
<div class="line">child->Inherit(parent);</div>
<div class="line"></div>
<div class="line">Local<Function> child_function = child->GetFunction();</div>
<div class="line">Local<Object> child_instance = child_function->NewInstance();</div>
</div><!-- fragment --><p>The Child function and Child instance will have the following properties:</p>
<div class="fragment"><div class="line">child_func.prototype.__proto__ == <span class="keyword">function</span>.prototype;</div>
<div class="line">child_instance.instance_accessor calls <span class="stringliteral">'InstanceAccessorCallback'</span></div>
<div class="line">child_instance.instance_property == 3;</div>
</div><!-- fragment --> </div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a3b8e5e214b2ee34c36138961ebac696a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classv8_1_1_local.html">Local</a><<a class="el" href="classv8_1_1_function.html">Function</a>> v8::FunctionTemplate::GetFunction </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the unique function instance in the current execution context. </p>
</div>
</div>
<a class="anchor" id="aa883e4ab6643498662f7873506098c98"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool v8::FunctionTemplate::HasInstance </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_value.html">Value</a> > </td>
<td class="paramname"><em>object</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if the given object is an instance of this function template. </p>
</div>
</div>
<a class="anchor" id="a18f343e7e5749ed886d6e76a1424216e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void v8::FunctionTemplate::Inherit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> > </td>
<td class="paramname"><em>parent</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Causes the function template to inherit from a parent function template. </p>
</div>
</div>
<a class="anchor" id="a00dd9725566908e8fd14064542f5a781"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classv8_1_1_local.html">Local</a><<a class="el" href="classv8_1_1_object_template.html">ObjectTemplate</a>> v8::FunctionTemplate::InstanceTemplate </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the InstanceTemplate. </p>
</div>
</div>
<a class="anchor" id="af9012aee4a102c4018fec8e9532cb996"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classv8_1_1_local.html">Local</a><<a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a>> v8::FunctionTemplate::New </td>
<td>(</td>
<td class="paramtype">InvocationCallback </td>
<td class="paramname"><em>callback</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_value.html">Value</a> > </td>
<td class="paramname"><em>data</em> = <code><a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_value.html">Value</a> >()</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_signature.html">Signature</a> > </td>
<td class="paramname"><em>signature</em> = <code><a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_signature.html">Signature</a> >()</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a function template. </p>
</div>
</div>
<a class="anchor" id="aa2bcc2652b5f0fdbc666d943ccf72021"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classv8_1_1_local.html">Local</a><<a class="el" href="classv8_1_1_object_template.html">ObjectTemplate</a>> v8::FunctionTemplate::PrototypeTemplate </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>A PrototypeTemplate is the template used to create the prototype object of the function created by this template. </p>
</div>
</div>
<a class="anchor" id="a91d2e0643e8c5a53ab1d75f7766c2422"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void v8::FunctionTemplate::ReadOnlyPrototype </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the ReadOnly flag in the attributes of the 'prototype' property of functions created from this <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> to true. </p>
</div>
</div>
<a class="anchor" id="a9eb1c827b17faf398a81068721bf40ab"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void v8::FunctionTemplate::SetCallHandler </td>
<td>(</td>
<td class="paramtype">InvocationCallback </td>
<td class="paramname"><em>callback</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_value.html">Value</a> > </td>
<td class="paramname"><em>data</em> = <code><a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_value.html">Value</a> >()</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the call-handler callback for a <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a>. This callback is called whenever the function created from this <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> is called. </p>
</div>
</div>
<a class="anchor" id="a10ad6f0d3d1f67823e08fbca7c5dde41"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void v8::FunctionTemplate::SetClassName </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classv8_1_1_handle.html">Handle</a>< <a class="el" href="classv8_1_1_string.html">String</a> > </td>
<td class="paramname"><em>name</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the class name of the <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a>. This is used for printing objects created with the function created from the <a class="el" href="classv8_1_1_function_template.html">FunctionTemplate</a> as its constructor. </p>
</div>
</div>
<a class="anchor" id="ade426e8a21d777ae6100e6c1aa7bfaee"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void v8::FunctionTemplate::SetHiddenPrototype </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Determines whether the <b>proto</b> accessor ignores instances of the function template. If instances of the function template are ignored, <b>proto</b> skips all instances and instead returns the next object in the prototype chain.</p>
<p>Call with a value of true to make the <b>proto</b> accessor ignore instances of the function template. Call with a value of false to make the <b>proto</b> accessor not ignore instances of the function template. By default, instances of a function template are not ignored. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>deps/v8/include/<a class="el" href="v8_8h_source.html">v8.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Aug 11 2015 23:44:59 for V8 API Reference Guide for node.js v0.10.11 by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>