|
GLG Toolkit, C / C++ API Library
Version 4.6
|
This group contains methods for getting and setting resource values, as well as checking if a named resource exits. More...
This group contains methods for getting and setting resource values, as well as checking if a named resource exits.
Resource Access Performance Optimization
If NULL is passed as the resource_name parameter of functions for setting and querying resources, the data object supplied by the object parameter will be used directly, avoiding an overhead of a resource search. This can be used to optimize performance when the same resource is accessed repeatedly. The GetResourceObject function of the Intermediate API may be used to obtain an object ID of a data object once and then use it repeatedly.
For example:
The GlgAddDataSampleNode function of the C Intermediate API can also be used instead of setting values of chart entry points to prefill a chart with a large number of data samples.
Functions that set resource or tags values support * and ? wildcards for pattern matching. The asterisk (*) matches any sequence of characters, and the question mark (?) matches any single character.
To enable wildcard matching, prefix the resource or tag name with "$!". For example, "$!Clear*" will target all tags with names beginning with "Clear".
When using wildcards in resource paths, the wildcards prefix must be added to each level of resource hierarchy where pattern matching is required. For example, the following string targets all nested elements with names beginning with "Element" inside parent objects with names beginning with "Group":
$!Group∗/$!Element∗/LineWidth
NOTE: Wildcards can only be used for matching named object resources; they cannot be used for matching default attribute names (e.g. LineWidth, FillColor).
Functions | |
| GlgBoolean | GetDResource (char *resource_name, double *value) |
| Returns the current value of a D (double) resource of this object. More... | |
| GlgBoolean | GetGResource (char *resource_name, double *x_value, double *y_value, double *z_value) |
| Returns the current value of a G (geometrical or color) resource of this object. More... | |
| GlgBoolean | GetResource (char *resource_name, char **value) |
| Returns the current value of a S (string) resource of this object. More... | |
| GlgBoolean | GetResource (char *resource_name, double *value) |
| Returns the current value of a D (double) resource of this object. More... | |
| GlgBoolean | GetResource (char *resource_name, double *x_value, double *y_value, double *z_value) |
| Returns the current value of a G (geometrical or color) resource of this object. More... | |
| GlgBoolean | GetSResource (char *resource_name, char **value) |
| Returns the current value of a S (string) resource of this object. More... | |
| GlgBoolean | HasResourceObject (char *resource_name) |
| Checks if a named resource of this object exists. More... | |
| GlgBoolean | SetDResource (char *resource_name, double value) |
| Sets a new value of a D (double) resource of this object. More... | |
| GlgBoolean | SetDResourceIf (char *resource_name, double value, GlgBoolean if_changed) |
| Sets a new value of a D (double) resource of this object. More... | |
| GlgBoolean | SetGResource (char *resource_name, double x_value, double y_value, double z_value) |
| Sets new values of a G (geometrical or color) resource of this object. More... | |
| GlgBoolean | SetGResourceIf (char *resource_name, double x_value, double y_value, double z_value, GlgBoolean if_changed) |
| Sets new values of a G (geometrical or color) resource of this object. More... | |
| GlgBoolean | SetResource (char *resource_name, char *format, double value) |
| Replaces the string of an S (string) resource of this object with a value specified by an input number and a format string. More... | |
| GlgBoolean | SetResource (char *resource_name, char *format, double value, GlgBoolean if_changed) |
| Replaces the string of an S (string) resource of this object with a value specified by an input number and a format string. More... | |
| GlgBoolean | SetResource (char *resource_name, char *value) |
| Replaces the string of an S (string) resource of this object. More... | |
| GlgBoolean | SetResource (char *resource_name, char *value, GlgBoolean if_changed) |
| Replaces the string of an S (string) resource of this object. More... | |
| GlgBoolean | SetResource (char *resource_name, double value) |
| Sets a new value of a D (double) resource of this object. More... | |
| GlgBoolean | SetResource (char *resource_name, double value, GlgBoolean if_changed) |
| Sets a new value of a D (double) resource of this object. More... | |
| GlgBoolean | SetResource (char *resource_name, double x_value, double y_value, double z_value) |
| Sets new values of a G (geometrical or color) resource of this object. More... | |
| GlgBoolean | SetResource (char *resource_name, double x_value, double y_value, double z_value, GlgBoolean if_changed) |
| Sets new values of a G (geometrical or color) resource of this object. More... | |
| GlgBoolean | SetResource (char *resource_name, GlgObjectC &value) |
| Sets the value of a data or matrix object using another object of the same type and data type. More... | |
| GlgBoolean | SetResource (char *resource_name, GlgObjectC &value, GlgBoolean if_changed) |
| Sets the value of a data or matrix object using another object of the same type and data type. More... | |
| GlgBoolean | SetResourceFromObject (char *resource_name, GlgObjectC &value) |
| Sets the value of a data or matrix object using another object of the same type and data type. More... | |
| GlgBoolean | SetResourceFromObjectIf (char *resource_name, GlgObjectC &value, GlgBoolean if_changed) |
| Sets the value of a data or matrix object using another object of the same type and data type. More... | |
| GlgBoolean | SetSResource (char *resource_name, char *value) |
| Replaces the string of an S (string) resource of this object. More... | |
| GlgBoolean | SetSResourceFromD (char *resource_name, char *format, double value) |
| Replaces the string of an S (string) resource of this object with a value specified by an input number and a format string. More... | |
| GlgBoolean | SetSResourceFromDIf (char *resource_name, char *format, double value, GlgBoolean if_changed) |
| Replaces the string of an S (string) resource of this object with a value specified by an input number and a format string. More... | |
| GlgBoolean | SetSResourceIf (char *resource_name, char *value, GlgBoolean if_changed) |
| Replaces the string of an S (string) resource of this object. More... | |
| GlgBoolean GetDResource | ( | char * | resource_name, |
| double * | value | ||
| ) |
Returns the current value of a D (double) resource of this object.
This is a wrapper for GlgGetDResource.
| resource_name | Specifies the resource path of the scalar resource to query. |
| value | Specifies a pointer used to return the resource value. |
If a scalar resource with the given resource path exists, this method copies its current value into the address specified by the value pointer and returns True, otherwise it generates an error message and returns False.
| GlgBoolean GetGResource | ( | char * | resource_name, |
| double * | x_value, | ||
| double * | y_value, | ||
| double * | z_value | ||
| ) |
Returns the current value of a G (geometrical or color) resource of this object.
This is a wrapper for GlgGetGResource.
| resource_name | Specifies the resource path of the G resource to query. |
| x_value | Specifies a pointer used to return the X value of a geometrical resource or an R component of the color resource. |
| y_value | Specifies a pointer used to return the Y value of a geometrical resource or a G component of the color resource. |
| z_value | Specifies a pointer used to return the Z value of a geometrical resource or a B component of the color resource. |
If a G resource or with the given resource path exists, this method copies its current three values to the addresses specified with the x_value, y_value and z_value pointers and returns True. Otherwise it generates an error message and returns False.
| GlgBoolean GetResource | ( | char * | resource_name, |
| char ** | value | ||
| ) |
Returns the current value of a S (string) resource of this object.
This is an overloaded version of GetSResource.
| resource_name | Specifies the resource path of the string resource to query. |
| value | Specifies a pointer used to return the resource value. |
If a string resource with the given resource path exists, this method copies the string pointer into the address specified by value pointer and returns True, otherwise it generates an error message and returns False.
Warning: The returned pointer points to GLG internal data structures and should not be modified. The pointer is valid only immediately after a call to GlgGetSResource. To store the returned string, create a copy of it using GlgStrClone.
| GlgBoolean GetResource | ( | char * | resource_name, |
| double * | value | ||
| ) |
Returns the current value of a D (double) resource of this object.
This is an overloaded version of GetDResource.
| resource_name | Specifies the resource path of the scalar resource to query. |
| value | Specifies a pointer used to return the resource value. |
If a scalar resource with the given resource path exists, this method copies its current value into the address specified by the value pointer and returns True, otherwise it generates an error message and returns False.
| GlgBoolean GetResource | ( | char * | resource_name, |
| double * | x_value, | ||
| double * | y_value, | ||
| double * | z_value | ||
| ) |
Returns the current value of a G (geometrical or color) resource of this object.
This is an overloaded version of GetGResource.
| resource_name | Specifies the resource path of the G resource to query. |
| x_value | Specifies a pointer used to return the X value of a geometrical resource or an R component of the color resource. |
| y_value | Specifies a pointer used to return the Y value of a geometrical resource or a G component of the color resource. |
| z_value | Specifies a pointer used to return the Z value of a geometrical resource or a B component of the color resource. |
If a G resource or with the given resource path exists, this method copies its current three values to the addresses specified with the x_value, y_value and z_value pointers and returns True. Otherwise it generates an error message and returns False.
| GlgBoolean GetSResource | ( | char * | resource_name, |
| char ** | value | ||
| ) |
Returns the current value of a S (string) resource of this object.
This is a wrapper for GlgGetSResource.
| resource_name | Specifies the resource path of the string resource to query. |
| value | Specifies a pointer used to return the resource value. |
If a string resource with the given resource path exists, this method copies the string pointer into the address specified by value pointer and returns True, otherwise it generates an error message and returns False.
Warning: The returned pointer points to GLG internal data structures and should not be modified. The pointer is valid only immediately after a call to GlgGetSResource. To store the returned string, create a copy of it using GlgStrClone.
| GlgBoolean HasResourceObject | ( | char * | resource_name | ) |
Checks if a named resource of this object exists.
This is a wrapper for GlgHasResourceObject.
| resource_name | Specifies the resource path of the resource object to query. |
| GlgBoolean SetDResource | ( | char * | resource_name, |
| double | value | ||
| ) |
Sets a new value of a D (double) resource of this object.
This is a wrapper for GlgSetDResource.
| resource_name | Specifies the resource path of the scalar resource to be set. May use wildcards, see Using Resource Wildcards. |
| value | Specifies a new value. |
If a scalar resource with the given resource path exists, this method sets it to a new value and returns True, otherwise it generates an error message and returns False.
See Resource Access Optimization for more.
| GlgBoolean SetDResourceIf | ( | char * | resource_name, |
| double | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Sets a new value of a D (double) resource of this object.
This is a wrapper for GlgSetDResourceIf.
| resource_name | Specifies the resource path of the scalar resource to be set. May use wildcards, see Using Resource Wildcards. |
| value | Specifies a new value. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to SetDResource). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. The parameter is ignored when updating chart entry points to allow plotting straight lines when the plotted value does not change over time. |
If a scalar resource with the given resource path exists, this method sets it to a new value and returns True, otherwise it generates an error message and returns False.
See Resource Access Optimization for more.
| GlgBoolean SetGResource | ( | char * | resource_name, |
| double | x_value, | ||
| double | y_value, | ||
| double | z_value | ||
| ) |
Sets new values of a G (geometrical or color) resource of this object.
This is a wrapper for GlgSetGResource.
| resource_name | Specifies the resource path of the geometrical or color resource to be set. May use wildcards, see Using Resource Wildcards. |
| x_value | Specifies the new X value. |
| y_value | Specifies the new Y value. |
| z_value | Specifies the new Z value. |
If a G resource with the given resource path exists, this method sets its new values and returns True, otherwise it generates an error message and returns False.
See Resource Access Optimization for more.
| GlgBoolean SetGResourceIf | ( | char * | resource_name, |
| double | x_value, | ||
| double | y_value, | ||
| double | z_value, | ||
| GlgBoolean | if_changed | ||
| ) |
Sets new values of a G (geometrical or color) resource of this object.
This is a wrapper for GlgSetGResourceIf.
| resource_name | Specifies the resource path of the geometrical or color resource to be set. May use wildcards, see Using Resource Wildcards. |
| x_value | Specifies the new X value. |
| y_value | Specifies the new Y value. |
| z_value | Specifies the new Z value. |
| if_changed | If set to False, the graphical updates will be performed even if the new values are the same as the old one (equivalent to SetGResource). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a G resource with the given resource path exists, this method sets its new values and returns True, otherwise it generates an error message and returns False.
See Resource Access Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| char * | format, | ||
| double | value | ||
| ) |
Replaces the string of an S (string) resource of this object with a value specified by an input number and a format string.
This is an overloaded version of SetSResourceFromD.
| resource_name | Specifies the resource path of the string resource to be set. May use wildcards, see Using Resource Wildcards. |
| format | Specifies the printf-style format to use when setting the resource string. |
| value | Specifies the numerical value to be converted to a string according to the specified format. |
If a string resource with the given resource path exists, this method sets it to a new string containing the value parameter formatter using the format argument and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| char * | format, | ||
| double | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Replaces the string of an S (string) resource of this object with a value specified by an input number and a format string.
This is an overloaded version of SetSResourceFromDIf.
| resource_name | Specifies the resource path of the string resource to be set. May use wildcards, see Using Resource Wildcards. |
| format | Specifies the printf-style format to use when setting the resource string. |
| value | Specifies the numerical value to be converted to a string according to the specified format. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to SetSResourceFromD). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a string resource with the given resource path exists, this method sets it to a new string containing the value parameter formatted using the format argument and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| char * | value | ||
| ) |
Replaces the string of an S (string) resource of this object.
This is an overloaded version of SetSResource.
| resource_name | Specifies the resource path of the string resource to be set. May use wildcards, see Using Resource Wildcards. |
| value | Specifies a new string. |
If a string resource with the given resource path exists, this method creates a copy of the input string, sets that copy as the new value of the resource and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| char * | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Replaces the string of an S (string) resource of this object.
This is an overloaded version of SetSResourceIf.
| resource_name | Specifies the resource path of the string resource to be set. May use wildcards, see Using Resource Wildcards. |
| value | Specifies a new string. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to SetSResource). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a string resource with the given resource path exists, this method creates a copy of the input string, sets that copy as the new value of the resource and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| double | value | ||
| ) |
Sets a new value of a D (double) resource of this object.
This is an overloaded version of SetDResource.
| resource_name | Specifies the resource path of the scalar resource to be set. May use wildcards, see Using Resource Wildcards. |
| value | Specifies a new value. |
If a scalar resource with the given resource path exists, this method sets it to a new value and returns True, otherwise it generates an error message and returns False.
See Resource Access Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| double | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Sets a new value of a D (double) resource of this object.
This is an overloaded version of SetDResourceIf.
| resource_name | Specifies the resource path of the scalar resource to be set. May use wildcards, see Using Resource Wildcards. |
| value | Specifies a new value. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to SetDResource). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. The parameter is ignored when updating chart entry points to allow plotting straight lines when the plotted value does not change over time. |
If a scalar resource with the given resource path exists, this method sets it to a new value and returns True, otherwise it generates an error message and returns False.
See Resource Access Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| double | x_value, | ||
| double | y_value, | ||
| double | z_value | ||
| ) |
Sets new values of a G (geometrical or color) resource of this object.
This is an overloaded version of SetGResource.
| resource_name | Specifies the resource path of the geometrical or color resource to be set. May use wildcards, see Using Resource Wildcards. |
| x_value | Specifies the new X value. |
| y_value | Specifies the new Y value. |
| z_value | Specifies the new Z value. |
If a G resource with the given resource path exists, this method sets its new values and returns True, otherwise it generates an error message and returns False.
See Resource Access Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| double | x_value, | ||
| double | y_value, | ||
| double | z_value, | ||
| GlgBoolean | if_changed | ||
| ) |
Sets new values of a G (geometrical or color) resource of this object.
This is an overloaded version of SetGResourceIf.
| resource_name | Specifies the resource path of the geometrical or color resource to be set. May use wildcards, see Using Resource Wildcards. |
| x_value | Specifies the new X value. |
| y_value | Specifies the new Y value. |
| z_value | Specifies the new Z value. |
| if_changed | If set to False, the graphical updates will be performed even if the new values are the same as the old one (equivalent to SetGResource). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a G resource with the given resource path exists, this method sets its new values and returns True, otherwise it generates an error message and returns False.
See Resource Access Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| GlgObjectC & | value | ||
| ) |
Sets the value of a data or matrix object using another object of the same type and data type.
This is an overloaded version of SetResourceFromObject.
| resource_name | Specifies the name of the resource of this object to be set. May use wildcards, see Using Resource Wildcards. |
| value | Specifies the object containing the new value. |
If a resource of a matching type at the given resource path exists, the method sets the value of the resource to a value defined by the value object and returns True, otherwise it generates an error message and returns False.
The object type (and data type for the data object) of the resource specified by the resource path should match the type of the value object.
See Resource Access Optimization for more.
| GlgBoolean SetResource | ( | char * | resource_name, |
| GlgObjectC & | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Sets the value of a data or matrix object using another object of the same type and data type.
This is an overloaded version of SetResourceFromObjectIf.
| resource_name | Specifies the name of the resource of this object to be set. May use wildcards, see Using Resource Wildcards. |
| value | Specifies the object containing the new value. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to GlgSetResourceFromObject). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a resource of a matching type at the given resource path exists, the method sets the value of the resource to a value defined by the value object and returns True, otherwise it generates an error message and returns False.
The object type (and data type for the data object) of the resource specified by the resource path should match the type of the value object.
See Resource Access Optimization for more.
| GlgBoolean SetResourceFromObject | ( | char * | resource_name, |
| GlgObjectC & | value | ||
| ) |
Sets the value of a data or matrix object using another object of the same type and data type.
This is a wrapper for GlgSetResourceFromObject.
| resource_name | Specifies the name of the resource of this object to be set. May use wildcards, see Using Resource Wildcards. |
| value | Specifies the object containing the new value. |
If a resource of a matching type at the given resource path exists, the method sets the value of the resource to a value defined by the value object and returns True, otherwise it generates an error message and returns False.
The object type (and data type for the data object) of the resource specified by the resource path should match the type of the value object.
See Resource Access Optimization for more.
| GlgBoolean SetResourceFromObjectIf | ( | char * | resource_name, |
| GlgObjectC & | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Sets the value of a data or matrix object using another object of the same type and data type.
This is a wrapper for GlgSetResourceFromObjectIf.
| resource_name | Specifies the name of the resource of this object to be set. May use wildcards, see Using Resource Wildcards. |
| value | Specifies the object containing the new value. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to GlgSetResourceFromObject). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a resource of a matching type at the given resource path exists, the method sets the value of the resource to a value defined by the value object and returns True, otherwise it generates an error message and returns False.
The object type (and data type for the data object) of the resource specified by the resource path should match the type of the value object.
See Resource Access Optimization for more.
| GlgBoolean SetSResource | ( | char * | resource_name, |
| char * | value | ||
| ) |
Replaces the string of an S (string) resource of this object.
This is a wrapper for GlgSetSResource.
| resource_name | Specifies the resource path of the string resource to be set. May use wildcards, see Using Resource Wildcards. |
| value | Specifies a new string. |
If a string resource with the given resource path exists, this method creates a copy of the input string, sets that copy as the new value of the resource and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Optimization for more.
| GlgBoolean SetSResourceFromD | ( | char * | resource_name, |
| char * | format, | ||
| double | value | ||
| ) |
Replaces the string of an S (string) resource of this object with a value specified by an input number and a format string.
This is a wrapper for GlgSetSResourceFromD.
| resource_name | Specifies the resource path of the string resource to be set. May use wildcards, see Using Resource Wildcards. |
| format | Specifies the printf-style format to use when setting the resource string. |
| value | Specifies the numerical value to be converted to a string according to the specified format. |
If a string resource with the given resource path exists, this method sets it to a new string containing the value parameter formatter using the format argument and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Optimization for more.
| GlgBoolean SetSResourceFromDIf | ( | char * | resource_name, |
| char * | format, | ||
| double | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Replaces the string of an S (string) resource of this object with a value specified by an input number and a format string.
This is a wrapper for GlgSetSResourceFromDIf.
| resource_name | Specifies the resource path of the string resource to be set. May use wildcards, see Using Resource Wildcards. |
| format | Specifies the printf-style format to use when setting the resource string. |
| value | Specifies the numerical value to be converted to a string according to the specified format. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to GlgSetSResourceFromD). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a string resource with the given resource path exists, this method sets it to a new string containing the value parameter formatted using the format argument and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Optimization for more.
| GlgBoolean SetSResourceIf | ( | char * | resource_name, |
| char * | value, | ||
| GlgBoolean | if_changed | ||
| ) |
Replaces the string of an S (string) resource of this object.
This is a wrapper for GlgSetSResourceIf.
| resource_name | Specifies the resource path of the string resource to be set. May use wildcards, see Using Resource Wildcards. |
| value | Specifies a new string. |
| if_changed | If set to False, the graphical updates will be performed even if the new value is the same as the old one (equivalent to SetSResource). Setting if_changed=True optimizes performance of applications that set resource values regardless whether the values have changed. |
If a string resource with the given resource path exists, this method creates a copy of the input string, sets that copy as the new value of the resource and returns True, otherwise it generates an error message and returns False.
The memory associated with the old string is automatically freed.
See Resource Access Optimization for more.