8. Overview UniScript Objects¶
See chapter UniScript Objects in the UniScript-Manual, especially the section Standard Methods.
UniScript-Object-Functions | |
---|---|
obj_copy | obj_copy creates a copy of an object. |
obj_count | obj_count returns the number of variables in an object. |
obj_count_num | obj_count_num returns the number of number keys in an object. |
obj_count_str | obj_count_str returns the number of string keys in an object. |
obj_create | obj_create creates an UniScript object. |
obj_has_key | obj_has_key checks if a given key exists. |
obj_info | obj_info returns a string of the form “obj-name,hex-address”. |
obj_keys | obj_keys returns all keys or a range of keys for the given object. |
obj_load | obj_load loads an object saved with obj_save from the hard drive. |
obj_lookup | obj_lookup returns the value of a given key. |
obj_methods | obj_methods returns an object with methods (member functions) for the given object. |
obj_parent | obj_parent returns the parent object or 0 if the object does not have a parent. |
obj_remove | obj_remove removes a key-value pair from an object. |
obj_save | obj_save saves an object as an XML file or as an binary file on the hard drive or as a string. |
obj_set_at | obj_set_at adds a key-value pair to the given object. If the key already exists the value will be overwritten. |
obj_set_methods | obj_set_methods sets the methods (member functions) for the given object. |
obj_set_parent | obj_set_parent sets the parent object. |
obj_set_str_return | obj_set_str_return specifies the return value of obj_lookup. If a key does not exist, obj_lookup may return 0, an empty string or throw an exception. |
set_method_table | set_method_table sets the methods (member functions) for the given object. |
See also
id-2115846