|
@@ -606,31 +606,30 @@ public:
|
|
|
/// Int, Bool, Float, Vector2, Vector3, Vector4, Quaternion
|
|
/// Int, Bool, Float, Vector2, Vector3, Vector4, Quaternion
|
|
|
/// String, Buffer, ResourceRef, ResourceRefList, IntRect,
|
|
/// String, Buffer, ResourceRef, ResourceRefList, IntRect,
|
|
|
/// IntVector2, Matrix3,Matrix3x4, Matrix4, Double, Color
|
|
/// IntVector2, Matrix3,Matrix3x4, Matrix4, Double, Color
|
|
|
- /// The data value must be programed in the appropriate string form
|
|
|
|
|
- /// used by the Variant class.
|
|
|
|
|
- void setUserData (const String& name, const String& vartype, const String& value)
|
|
|
|
|
|
|
+ /// The data value must be formatted in the Variant type string format.
|
|
|
|
|
+ void SetVarFromString (const String& name, const String& vartype, const String& value)
|
|
|
{
|
|
{
|
|
|
vars_[name].FromString(vartype, value);
|
|
vars_[name].FromString(vartype, value);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// Scripting interface to get user data as a string.
|
|
/// Scripting interface to get user data as a string.
|
|
|
/// an empty string is returned if the entry name is not present.
|
|
/// an empty string is returned if the entry name is not present.
|
|
|
- String getUserData (const String& name) const {
|
|
|
|
|
- if ( isUserData(name) )
|
|
|
|
|
|
|
+ String GetVarAsString (const String& name) const {
|
|
|
|
|
+ if ( IsVar(name) )
|
|
|
return vars_[name]->ToString();
|
|
return vars_[name]->ToString();
|
|
|
return String::EMPTY;
|
|
return String::EMPTY;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// Scripting interface to check if the user data entry exists
|
|
/// Scripting interface to check if the user data entry exists
|
|
|
/// returns true if present, returns false if it is not present.
|
|
/// returns true if present, returns false if it is not present.
|
|
|
- bool isUserData (const String& name) const {
|
|
|
|
|
|
|
+ bool IsVar (const String& name) const {
|
|
|
return vars_.Contains(name);
|
|
return vars_.Contains(name);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// Scripting interface to get user data type as a string
|
|
/// Scripting interface to get user data type as a string
|
|
|
/// an empty string is returned if the entry name is not present.
|
|
/// an empty string is returned if the entry name is not present.
|
|
|
- String getUserDataType (const String& name) const {
|
|
|
|
|
- if ( isUserData(name) )
|
|
|
|
|
|
|
+ String GetVarType (const String& name) const {
|
|
|
|
|
+ if ( IsVar(name) )
|
|
|
return vars_[name]->GetTypeName();
|
|
return vars_[name]->GetTypeName();
|
|
|
return String::EMPTY;
|
|
return String::EMPTY;
|
|
|
}
|
|
}
|