Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
Public Member Functions | List of all members
ScriptValue Class Reference

ScriptValue provides functionality to convert this script Engines values to basic types. More...

Public Member Functions

bool isBoolean ()
 Returns true if this ScriptValue is a boolean, otherwise false. More...
 
bool isFunction ()
 Returns true if this ScriptValue is a function, otherwise false. More...
 
bool isNull ()
 Returns true if this ScriptValue is null, otherwise false. More...
 
bool isNumber ()
 Returns true if this ScriptValue is a number, otherwise false. More...
 
bool isObject ()
 Returns true if this ScriptValue is an object, otherwise false. More...
 
bool isUndefined ()
 Returns true if this ScriptValue is undefined, otherwise false. More...
 
bool isValid ()
 Returns true if this ScriptValue is valid, otherwise false. More...
 
bool isString ()
 Returns true if this ScriptValue is a string, otherwise false. More...
 
bool isError ()
 Returns true if this ScriptValue is an error, otherwise false. More...
 
bool isArray ()
 Returns true if this ScriptValue is an array, otherwise false. More...
 
ScriptValue property (QString)
 Returns the specified property. More...
 
bool toBoolean ()
 Converts the ScriptValue to a boolean. More...
 
int toInt32 ()
 Converts the ScriptValue to an integer. More...
 
QString toString ()
 Converts the ScriptValue to a QString. More...
 

Detailed Description

ScriptValue provides functionality to convert this script Engines values to basic types.

Member Function Documentation

◆ isArray()

bool ScriptValue::isArray ( )

Returns true if this ScriptValue is an array, otherwise false.

Returns
bool, true if this ScriptValue is an array, otherwise false.

◆ isBoolean()

bool ScriptValue::isBoolean ( )

Returns true if this ScriptValue is a boolean, otherwise false.

Returns
bool, true if this ScriptValue is a boolean, otherwise false.

◆ isError()

bool ScriptValue::isError ( )

Returns true if this ScriptValue is an error, otherwise false.

Returns
bool, true if this ScriptValue is an error, otherwise false.

◆ isFunction()

bool ScriptValue::isFunction ( )

Returns true if this ScriptValue is a function, otherwise false.

Returns
bool, true if this ScriptValue is a function, otherwise false.

◆ isNull()

bool ScriptValue::isNull ( )

Returns true if this ScriptValue is null, otherwise false.

Returns
bool, true if this ScriptValue is null, otherwise false.

◆ isNumber()

bool ScriptValue::isNumber ( )

Returns true if this ScriptValue is a number, otherwise false.

Returns
bool, true if this ScriptValue is a number, otherwise false.

◆ isObject()

bool ScriptValue::isObject ( )

Returns true if this ScriptValue is an object, otherwise false.

Returns
bool, true if this ScriptValue is an object, otherwise false.

◆ isString()

bool ScriptValue::isString ( )

Returns true if this ScriptValue is a string, otherwise false.

Returns
bool, true if this ScriptValue is a string, otherwise false.

◆ isUndefined()

bool ScriptValue::isUndefined ( )

Returns true if this ScriptValue is undefined, otherwise false.

Returns
bool, true if this ScriptValue is undefined, otherwise false.

◆ isValid()

bool ScriptValue::isValid ( )

Returns true if this ScriptValue is valid, otherwise false.

Returns
bool, true if this ScriptValue is valid, otherwise false.

◆ property()

ScriptValue ScriptValue::property ( QString  )

Returns the specified property.

Parameters
name,thename of the property of interest.
Returns
ScriptValue, the ScriptValue object of the specified property.

◆ toBoolean()

bool ScriptValue::toBoolean ( )

Converts the ScriptValue to a boolean.

Returns
bool, the value of the converted ScriptValue.

◆ toInt32()

int ScriptValue::toInt32 ( )

Converts the ScriptValue to an integer.

Returns
int, the value of the converted ScriptValue.

◆ toString()

QString ScriptValue::toString ( )

Converts the ScriptValue to a QString.

Returns
QString, the value of the converted ScriptValue.

The documentation for this class was generated from the following file: