-------------------------------- -- @module Properties -- @parent_module cc -------------------------------- -- Returns the value of a variable that is set in this Properties object.
-- Variables take on the format ${name} and are inherited from parent Property objects.
-- param name Name of the variable to get.
-- param defaultValue Value to return if the variable is not found.
-- return The value of the specified variable, or defaultValue if not found. -- @function [parent=#Properties] getVariable -- @param self -- @param #char name -- @param #char defaultValue -- @return char#char ret (return value: char) -------------------------------- -- Get the value of the given property as a string. This can always be retrieved,
-- whatever the intended type of the property.
-- param name The name of the property to interpret, or NULL to return the current property's value.
-- param defaultValue The default value to return if the specified property does not exist.
-- return The value of the given property as a string, or the empty string if no property with that name exists. -- @function [parent=#Properties] getString -- @param self -- @return char#char ret (return value: char) -------------------------------- -- Interpret the value of the given property as a long integer.
-- If the property does not exist, zero will be returned.
-- If the property exists but could not be scanned, an error will be logged and zero will be returned.
-- param name The name of the property to interpret, or NULL to return the current property's value.
-- return The value of the given property interpreted as a long.
-- Zero if the property does not exist or could not be scanned. -- @function [parent=#Properties] getLong -- @param self -- @return long#long ret (return value: long) -------------------------------- -- @overload self -- @overload self, char, bool, bool -- @function [parent=#Properties] getNamespace -- @param self -- @param #char id -- @param #bool searchNames -- @param #bool recurse -- @return Properties#Properties ret (return value: cc.Properties) -------------------------------- -- Gets the file path for the given property if the file exists.
-- This method will first search for the file relative to the working directory.
-- If the file is not found then it will search relative to the directory the bundle file is in.
-- param name The name of the property.
-- param path The string to copy the path to if the file exists.
-- return True if the property exists and the file exists, false otherwise.
-- script{ignore} -- @function [parent=#Properties] getPath -- @param self -- @param #char name -- @param #string path -- @return bool#bool ret (return value: bool) -------------------------------- -- Interpret the value of the given property as a Matrix.
-- If the property does not exist, out will be set to the identity matrix.
-- If the property exists but could not be scanned, an error will be logged and out will be set
-- to the identity matrix.
-- param name The name of the property to interpret, or NULL to return the current property's value.
-- param out The matrix to set to this property's interpreted value.
-- return True on success, false if the property does not exist or could not be scanned. -- @function [parent=#Properties] getMat4 -- @param self -- @param #char name -- @param #mat4_table out -- @return bool#bool ret (return value: bool) -------------------------------- -- Check if a property with the given name is specified in this Properties object.
-- param name The name of the property to query.
-- return True if the property exists, false otherwise. -- @function [parent=#Properties] exists -- @param self -- @param #char name -- @return bool#bool ret (return value: bool) -------------------------------- -- Sets the value of the property with the specified name.
-- If there is no property in this namespace with the current name,
-- one is added. Otherwise, the value of the first property with the
-- specified name is updated.
-- If name is NULL, the value current property (see getNextProperty) is
-- set, unless there is no current property, in which case false
-- is returned.
-- param name The name of the property to set.
-- param value The property value.
-- return True if the property was set, false otherwise. -- @function [parent=#Properties] setString -- @param self -- @param #char name -- @param #char value -- @return bool#bool ret (return value: bool) -------------------------------- -- Get the ID of this Property's namespace. The ID should be a unique identifier,
-- but its uniqueness is not enforced.
-- return The ID of this Property's namespace. -- @function [parent=#Properties] getId -- @param self -- @return char#char ret (return value: char) -------------------------------- -- Rewind the getNextProperty() and getNextNamespace() iterators
-- to the beginning of the file. -- @function [parent=#Properties] rewind -- @param self -- @return Properties#Properties self (return value: cc.Properties) -------------------------------- -- Sets the value of the specified variable.
-- param name Name of the variable to set.
-- param value The value to set. -- @function [parent=#Properties] setVariable -- @param self -- @param #char name -- @param #char value -- @return Properties#Properties self (return value: cc.Properties) -------------------------------- -- Interpret the value of the given property as a boolean.
-- param name The name of the property to interpret, or NULL to return the current property's value.
-- param defaultValue the default value to return if the specified property does not exist within the properties file.
-- return true if the property exists and its value is "true", otherwise false. -- @function [parent=#Properties] getBool -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- -- @overload self, char, vec4_table -- @overload self, char, vec3_table -- @function [parent=#Properties] getColor -- @param self -- @param #char name -- @param #vec3_table out -- @return bool#bool ret (return value: bool) -------------------------------- -- Returns the type of a property.
-- param name The name of the property to interpret, or NULL to return the current property's type.
-- return The type of the property. -- @function [parent=#Properties] getType -- @param self -- @return int#int ret (return value: int) -------------------------------- -- Get the next namespace. -- @function [parent=#Properties] getNextNamespace -- @param self -- @return Properties#Properties ret (return value: cc.Properties) -------------------------------- -- Interpret the value of the given property as an integer.
-- If the property does not exist, zero will be returned.
-- If the property exists but could not be scanned, an error will be logged and zero will be returned.
-- param name The name of the property to interpret, or NULL to return the current property's value.
-- return The value of the given property interpreted as an integer.
-- Zero if the property does not exist or could not be scanned. -- @function [parent=#Properties] getInt -- @param self -- @return int#int ret (return value: int) -------------------------------- -- Interpret the value of the given property as a Vector3.
-- If the property does not exist, out will be set to Vector3(0.0f, 0.0f, 0.0f).
-- If the property exists but could not be scanned, an error will be logged and out will be set
-- to Vector3(0.0f, 0.0f, 0.0f).
-- param name The name of the property to interpret, or NULL to return the current property's value.
-- param out The vector to set to this property's interpreted value.
-- return True on success, false if the property does not exist or could not be scanned. -- @function [parent=#Properties] getVec3 -- @param self -- @param #char name -- @param #vec3_table out -- @return bool#bool ret (return value: bool) -------------------------------- -- Interpret the value of the given property as a Vector2.
-- If the property does not exist, out will be set to Vector2(0.0f, 0.0f).
-- If the property exists but could not be scanned, an error will be logged and out will be set
-- to Vector2(0.0f, 0.0f).
-- param name The name of the property to interpret, or NULL to return the current property's value.
-- param out The vector to set to this property's interpreted value.
-- return True on success, false if the property does not exist or could not be scanned. -- @function [parent=#Properties] getVec2 -- @param self -- @param #char name -- @param #vec2_table out -- @return bool#bool ret (return value: bool) -------------------------------- -- Interpret the value of the given property as a Vector4.
-- If the property does not exist, out will be set to Vector4(0.0f, 0.0f, 0.0f, 0.0f).
-- If the property exists but could not be scanned, an error will be logged and out will be set
-- to Vector4(0.0f, 0.0f, 0.0f, 0.0f).
-- param name The name of the property to interpret, or NULL to return the current property's value.
-- param out The vector to set to this property's interpreted value.
-- return True on success, false if the property does not exist or could not be scanned. -- @function [parent=#Properties] getVec4 -- @param self -- @param #char name -- @param #vec4_table out -- @return bool#bool ret (return value: bool) -------------------------------- -- Get the name of the next property.
-- If a valid next property is returned, the value of the property can be
-- retrieved using any of the get methods in this class, passing NULL for the property name.
-- return The name of the next property, or NULL if there are no properties remaining. -- @function [parent=#Properties] getNextProperty -- @param self -- @return char#char ret (return value: char) -------------------------------- -- Interpret the value of the given property as a floating-point number.
-- If the property does not exist, zero will be returned.
-- If the property exists but could not be scanned, an error will be logged and zero will be returned.
-- param name The name of the property to interpret, or NULL to return the current property's value.
-- return The value of the given property interpreted as a float.
-- Zero if the property does not exist or could not be scanned. -- @function [parent=#Properties] getFloat -- @param self -- @return float#float ret (return value: float) -------------------------------- -- Interpret the value of the given property as a Quaternion specified as an axis angle.
-- If the property does not exist, out will be set to Quaternion().
-- If the property exists but could not be scanned, an error will be logged and out will be set
-- to Quaternion().
-- param name The name of the property to interpret, or NULL to return the current property's value.
-- param out The quaternion to set to this property's interpreted value.
-- return True on success, false if the property does not exist or could not be scanned. -- @function [parent=#Properties] getQuaternionFromAxisAngle -- @param self -- @param #char name -- @param #cc.Quaternion out -- @return bool#bool ret (return value: bool) -------------------------------- -- @overload self, char, vec4_table -- @overload self, char, vec3_table -- @function [parent=#Properties] parseColor -- @param self -- @param #char str -- @param #vec3_table out -- @return bool#bool ret (return value: bool) -------------------------------- -- Attempts to parse the specified string as a Vector3 value.
-- On error, false is returned and the output is set to all zero values.
-- param str The string to parse.
-- param out The value to populate if successful.
-- return True if a valid Vector3 was parsed, false otherwise. -- @function [parent=#Properties] parseVec3 -- @param self -- @param #char str -- @param #vec3_table out -- @return bool#bool ret (return value: bool) -------------------------------- -- Attempts to parse the specified string as an axis-angle value.
-- The specified string is expected to contain four comma-separated
-- values, where the first three values represents the axis and the
-- fourth value represents the angle, in degrees.
-- On error, false is returned and the output is set to all zero values.
-- param str The string to parse.
-- param out A Quaternion populated with the orientation of the axis-angle, if successful.
-- return True if a valid axis-angle was parsed, false otherwise. -- @function [parent=#Properties] parseAxisAngle -- @param self -- @param #char str -- @param #cc.Quaternion out -- @return bool#bool ret (return value: bool) -------------------------------- -- Attempts to parse the specified string as a Vector2 value.
-- On error, false is returned and the output is set to all zero values.
-- param str The string to parse.
-- param out The value to populate if successful.
-- return True if a valid Vector2 was parsed, false otherwise. -- @function [parent=#Properties] parseVec2 -- @param self -- @param #char str -- @param #vec2_table out -- @return bool#bool ret (return value: bool) -------------------------------- -- Attempts to parse the specified string as a Vector4 value.
-- On error, false is returned and the output is set to all zero values.
-- param str The string to parse.
-- param out The value to populate if successful.
-- return True if a valid Vector4 was parsed, false otherwise. -- @function [parent=#Properties] parseVec4 -- @param self -- @param #char str -- @param #vec4_table out -- @return bool#bool ret (return value: bool) return nil