A named document that contains a callback function. More...
Inherits CodeDocument.
Public Member Functions | |
| void | checkIfScriptActive () |
| Checks if the document contains code. More... | |
| const Identifier & | getCallbackName () const |
| Returns the name of the SnippetDocument. More... | |
| int | getNumArgs () const |
| Returns the number of arguments specified in the constructor. More... | |
| String | getSnippetAsFunction () const |
| Returns the function text. More... | |
| bool | isSnippetEmpty () const |
| Checks if the snippet contains any code to execute. More... | |
| SnippetDocument (const Identifier &callbackName_, const String ¶meters=String()) | |
| Create a snippet document. More... | |
A named document that contains a callback function.
| SnippetDocument | ( | const Identifier & | callbackName_, |
| const String & | parameters = String() |
||
| ) |
Create a snippet document.
If you want to supply parameters, supply a whitespace separated list as last argument:
SnippetDocument doc("onControl", "component value"); // 2 parameters, 'component' and 'value'.
| void checkIfScriptActive | ( | ) |
Checks if the document contains code.
|
inline |
Returns the name of the SnippetDocument.
|
inline |
Returns the number of arguments specified in the constructor.
| String getSnippetAsFunction | ( | ) | const |
Returns the function text.
|
inline |
Checks if the snippet contains any code to execute.
This is a very fast operation.