Inheritance diagram for DzScript:
Save mode for saving the script to file.
DzScript::DzScript | ( | String | name = "" |
) |
Constructor.
name | The name of the script |
DzScript::DzScript | ( | DzScript | script | ) |
Copy Constructor
script | The script to copy. |
void DzScript::addCode | ( | String | code | ) |
Appends the given code to the end of the current script.
code | The text to append to the current script. |
Appends the given string and a newline character to the script.
line | The text to add to the script. | |
indentLevel | The number of tab characters to insert in front of the line. |
DzScript::addScriptBinaryExtensionsAsMultipleFilters | ( | DzFileFilter | filter | ) |
filter | The filter to add the binary extensions to |
DzScript::addScriptBinaryExtensionsToFilter | ( | DzFileFilter | filter | ) |
filter | The filter to add the binary extensions to |
DzScript::addScriptOpenExtensionsAsMultipleFilters | ( | DzFileFilter | filter | ) |
filter | The filter to add the open extensions to |
DzScript::addScriptOpenExtensionsToFilter | ( | DzFileFilter | filter | ) |
filter | The filter to add the open extensions to |
DzScript::addScriptSaveExtensionsAsMultipleFilters | ( | DzFileFilter | filter | ) |
filter | The filter to add the save extensions to |
DzScript::addScriptSaveExtensionsToFilter | ( | DzFileFilter | filter | ) |
filter | The filter to add the save extensions to |
DzScript::addScriptTextExtensionsAsMultipleFilters | ( | DzFileFilter | filter, | |
Boolean | includeDepricated = false | |||
) |
filter | The filter to add the plain text extensions to | |
includeDeprecated | Whether or not to include the depricated extension(s) |
DzScript::addScriptTextExtensionsToFilter | ( | DzFileFilter | filter, | |
Boolean | includeDepricated = false | |||
) |
filter | The filter to add the plain text extensions to | |
includeDeprecated | Whether or not to include the depricated extension(s) |
Calls a function in the script
function | The name of the function to call | |
args | A list of arguments to pass to the function |
bool DzScript::checkSyntax | ( | ) |
Checks the syntax of the script for errors uing the curret interpreter.
void DzScript::clear | ( | ) |
Clears any code in the current script, and clears the encryption state if the script was read from an encrypted file.
bool DzScript::convertToDAZScript2 | ( | ) |
Converts the script to DAZ Script 2 syntax.
Number DzScript::errorLine | ( | ) |
String DzScript::errorMessage | ( | ) |
This function is provided as a quick method of evaluating DAZ Script statements without needing to create a DAZ Script object.
code | The text string to evaluate as a script | |
content | A pointer to the QObject instance that will provide the script's context. |
Execute the script with an argument list This can be called from a thread outside of the gui thread, however the script will not be executed until the gui thread processes events. It returns when execution is complete.
args | The list of (string) arguments to pass to the script |
bool DzScript::execute | ( | ) |
Execute the script. This can be called from a thread outside of the gui thread, however the script will not be executed until the gui thread processes events. It returns when execution is complete.
DzAuthor DzScript::getAuthor | ( | ) |
String DzScript::getCode | ( | ) |
String DzScript::getFilename | ( | ) |
bool DzScript::getLastStatus | ( | ) |
filenameWithoutExtension | The path to the file, minus the '.' and the extension |
ScriptLanguage DzScript::getScriptLanguage | ( | ) |
String DzScript::getScriptType | ( | ) |
Number DzScript::getScriptVersion | ( | ) |
Boolean DzScript::getShouldReuseInterpreter | ( | ) |
Boolean DzScript::isEmpty | ( | ) |
Boolean DzScript::isEncrypted | ( | ) |
Access to the encryption state of the script. If the script is encoded, then getCode() returns '[Content Encrypted]', saveToFile() will not save anything and will return false, also, addLine(), addCode(), and setCode() will have no effect. Calling clear() will clear the encryption state as well as the code.
Loads the script from a file.
filename | The path to the script file to load. | |
conver | Whether to convert the file to DAZ Script 2. |
void DzScript::makeEncrypted | ( | ) |
Sets the script to be encrypted.
This process is not reversible! Once a script has been made encrypted, its original text can not be extracted. Encrypted scripts can not be edited or modified.
Object DzScript::result | ( | ) |
DzError DzScript::saveToFile | ( | String | filename, | |
ScriptFileMode | mode = UseExtension , |
|||
String | filetype = "DAZ Script" | |||
) |
Save the script to a file.
filename | The filename of the file to save to | |
mode | The type of file to save. | |
filetype | The filetype that is saved as part of the file information. |
void DzScript::setCode | ( | String | code | ) |
Replaces the existing code of the script with the given code.
code | The new text for the script. |
void DzScript::setContext | ( | DzScriptContext | context | ) |
Sets the context that the script will be executed in.
void DzScript::setReuseInterpreter | ( | Boolean | onoff | ) |
Wet whether the same interpreter is used between calls to the call() function. Setting this flag clears the interperter. Default it false.
Array DzScript::stackTrace | ( | ) |
Boolean DzScript::wasConverted | ( | DzScript::ScriptLanguage | language = DzScript::DAZScript1 |
) |
Access to whether or not the script was converted from the enumurated value specified.