All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Member Functions | List of all members
ScriptingApi::Console Class Reference
Inheritance diagram for ScriptingApi::Console:
ApiClass ScriptingObject

Public Member Functions

void print (var debug)
 
void start ()
 
void stop ()
 
void clear ()
 
void assertTrue (var condition)
 
void assertEqual (var v1, var v2)
 
void assertIsDefined (var value)
 
void assertIsObjectOrArray (var value)
 
void assertLegalNumber (var value)
 
- Public Member Functions inherited from ApiClass
 ApiClass (int numConstants_)
 
void addConstant (String constantName, var value)
 
const var getConstantValue (int index) const
 
int getConstantIndex (const Identifier &id) const
 
Identifier getConstantName (int index) const
 
void addFunction (const Identifier &id, call0 newFunction)
 
void addFunction1 (const Identifier &id, call1 newFunction)
 
void addFunction2 (const Identifier &id, call2 newFunction)
 
void addFunction3 (const Identifier &id, call3 newFunction)
 
void addFunction4 (const Identifier &id, call4 newFunction)
 
void addFunction5 (const Identifier &id, call5 newFunction)
 
void getIndexAndNumArgsForFunction (const Identifier &id, int &index, int &numArgs) const
 
var callFunction (int index, var *args, int numArgs)
 
void getAllFunctionNames (Array< Identifier > &ids) const
 
void getAllConstants (Array< Identifier > &ids) const
 

Detailed Description

A set of handy function to debug the script.

Member Function Documentation

void assertEqual ( var  v1,
var  v2 
)

Throws an error message if the values are not equal.

void assertIsDefined ( var  value)

Throws an error message if the value is undefined.

void assertIsObjectOrArray ( var  value)

Throws an error message if the value is not an object or array.

void assertLegalNumber ( var  value)

Throws an error message if the value is not a legal number (eg. string or array or infinity or NaN).

void assertTrue ( var  condition)

Throws an error message if the condition is not true.

void clear ( )

Clears the console.

void print ( var  debug)

Prints a message to the console.

void start ( )
inline

Starts the benchmark. You can give it a name that will be displayed with the result if desired.

void stop ( )

Stops the benchmark and prints the result.

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