Skip to content

Commit

Permalink
MiniScript: some initial WIP regarding custom data types: should be c…
Browse files Browse the repository at this point in the history
…omplete, lets test in next session (23)
  • Loading branch information
andreasdr committed Nov 6, 2023
1 parent 7f56877 commit ef7ca88
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions src/tdme/utilities/MiniScript.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,22 +196,22 @@ class tdme::utilities::MiniScript {
virtual void registerMethods(MiniScript* miniScript) const = 0;

/**
* Unset script variable
* Unset script variable value
* @param variable variable
*/
virtual void unsetScriptVariableValue(ScriptVariable& variable) const = 0;

/**
* Unset script variable
* Set script variable value
* @param variable variable
* @param value value
*/
virtual void setScriptVariableValue(ScriptVariable& variable, const void* value) = 0;

/**
* Copy script variable
* @param from from
* @param to to
* @param from from
*/
virtual void copyScriptVariable(ScriptVariable& to, const ScriptVariable& from) const = 0;

Expand Down Expand Up @@ -635,7 +635,6 @@ class tdme::utilities::MiniScript {

/**
* Copy script variable
* @param miniScr
* @param from from
* @param to to
*/
Expand Down Expand Up @@ -1901,7 +1900,7 @@ class tdme::utilities::MiniScript {
* @param type type
* @return script variable type as string
*/
inline static const string getTypeAsString(const MiniScript* miniScript, ScriptVariableType type) {
inline static const string getTypeAsString(MiniScript* miniScript, ScriptVariableType type) {
switch(type) {
case TYPE_NULL: return "Null";
case TYPE_BOOLEAN: return "Boolean";
Expand Down Expand Up @@ -1957,21 +1956,11 @@ class tdme::utilities::MiniScript {
}
/**
* Returns given return value variable type string representation
* @param type type
* @param nullable nullable
* @return return value variable type string representation
*/
inline const string getReturnTypeAsString(ScriptVariableType type, bool nullable) const {
return getReturnTypeAsString(miniScript, type, nullable);
}

/**
* Returns this script variable type as return type string representation
* @param nullable nullable
* @return this script variable type as return type string representation
*/
inline const string getReturnTypeAsString(bool nullable) const {
return getReturnTypeAsString(getType(), nullable);
return getReturnTypeAsString(miniScript, getType(), nullable);
}

/**
Expand Down Expand Up @@ -2345,7 +2334,7 @@ class tdme::utilities::MiniScript {

/**
* Get arguments information
* @param miniScript mini script
* @param miniScript mini script instance
* @param beginIdx begin index
* @return arguments information
*/
Expand Down

0 comments on commit ef7ca88

Please sign in to comment.