Public Member Functions | List of all members
JavascriptProcessor::SnippetDocument Class Reference

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 &parameters=String())
 Create a snippet document. More...
 

Detailed Description

A named document that contains a callback function.

Constructor & Destructor Documentation

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'.

Member Function Documentation

void checkIfScriptActive ( )

Checks if the document contains code.

const Identifier& getCallbackName ( ) const
inline

Returns the name of the SnippetDocument.

int getNumArgs ( ) const
inline

Returns the number of arguments specified in the constructor.

String getSnippetAsFunction ( ) const

Returns the function text.

bool isSnippetEmpty ( ) const
inline

Checks if the snippet contains any code to execute.

This is a very fast operation.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.