Dehydra API: Difference between revisions

Line 5: Line 5:
Dehydra works by calling functions in your Javascript for elements of the source code file. You are not required to have any of these functions in your script: if a function is not there, Dehydra will know and will not try to call it. Here are the functions Dehydra will call:
Dehydra works by calling functions in your Javascript for elements of the source code file. You are not required to have any of these functions in your script: if a function is not there, Dehydra will know and will not try to call it. Here are the functions Dehydra will call:


=== process_class(cls) ===
=== process_type(t) ===


Dehydra calls this for each class/struct. process_class is called ''after'' process_function is called for all the member functions. <var>cls</var> is a JS object representing the class, with the following properties:
Dehydra calls this for each class/struct/enum/union. process_class is called ''after'' process_function is called for all the member functions. <var>t</var> is a JS object representing the class, with the following properties:


<dl>
<dl>
<dt>.kind
<dt>.kind
<dd>"class" or "struct"
<dd>One of "class", "struct", "union" or "enum"


<dt>.bases
<dt>.bases
Line 18: Line 18:
<dt>.members
<dt>.members
<dd>An array of member variables and functions.
<dd>An array of member variables and functions.
<dt>.loc
<dd> Location in the source
<dt>.template
<dd> If this class is a template instantiation the .template property describes it
</dl>
</dl>


Confirmed users
381

edits