All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Member Functions | List of all members
JavascriptProcessor::SnippetDocument Class Reference

Inherits CodeDocument.

Public Member Functions

 SnippetDocument (const Identifier &callbackName_, const String &parameters=String())
 
const Identifier & getCallbackName () const
 
void checkIfScriptActive ()
 
String getSnippetAsFunction () const
 
bool isSnippetEmpty () const
 
int getNumArgs () const
 

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", "widget value"); // 2 parameters, 'widget' 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.