While the appended claims set forth the features of the present invention with particularity, the invention, together with its objects and advantages, may be best understood from the following detailed description taken in conjunction with the accompanying drawings of which:
a, 2b, and 2c are data structure diagrams that illustrate how custom properties can be embedded at different levels within symbols;
Turning to the drawings, wherein like reference numerals refer to like elements, the present invention is illustrated as being implemented in a suitable environment. The following description is based on embodiments of the invention and should not be taken as limiting the invention with regard to alternative embodiments that are not explicitly described herein.
Each non-locked property in each instance of a graphic can have its own non-default value. For example, an embedded symbol has a custom property used to hold a text value. There may be more than one use of this symbol on a single window, and each use can have a different, non-default text value.
When a user of the editor shown in
If the default value is an expression, then the user assigns a data type 102 to it. When the expression is evaluated at runtime, the result of the expression is converted to the assigned data type. Supported data types for custom properties could include, for example, boolean, double, elapsed time, enumeration, float, integer, internationalized string, string, time, and an array of values.
If the default value is a reference, then when the reference is accessed at runtime, the data type used is the data type the reference points to.
If the default value is a constant, then the user can assign a data type 102. When a constant is evaluated at runtime, the result is converted into the assigned data type.
Each custom property is configured with a default value (104 in
End users may or may not need to use a given custom property. For example, an end user would not need to use a custom property that serves only as an internal variable for a calculation. The graphic developer can “hide” these internal variables using the visibility scope setting 108. “Public” custom properties are exposed to users when they embed the symbol. “Private” custom properties are not exposed.
The persistence of the custom property can be set. A “non-retentive” property is initialized to its default value on start-up. On the other hand, a non-default value of a “retentive” custom property is written to disk with all other check-pointed data during runtime. At start-up, the last data stored on disk are retrieved and used to initialize the custom property.
In the Description text field 110, the graphic developer can provide usage instructions to the end user who eventually embeds the graphic.
The end user can override most aspects of the custom property if the custom property is not locked in the parent. If the default value is overridden, then the type (expression, reference, or constant) of the new non-default value supplants the pre-existing type. While the default values of individual array elements can be overridden, in some implementations the length of the array cannot be changed. The visibility scope can be overridden from Public to Private, but not from Private to Public. The description can be overridden, and locked state can be overridden from unlocked to locked, but not from locked to unlocked. The user cannot override the data type.
A string property has both a value and a “String Mode.” The String Mode is set either to “Constant String,” wherein the value itself is a string (like “Tank 1”), or to “Reference to String,” wherein the value refers to a string. Both the default value and the String Mode can be overridden. For example, a symbol developer creates a property with a String Mode set to Constant String and a default value of “Enter Tank Name Here.” The end user resets the String Mode to Reference to String and overrides the default value so that it now points to a string containing the actual tank name.
The data in custom properties are specific to a currently visible graphic and are not accessible outside of the running display. For example, if an object is running on an application engine and has a script running, then that script will not have direct access to the custom properties.
A custom property is given preference in reference-binding resolution. This means that if a custom property and a valid reference (such as object name) collide, then the custom property is bound.
If an expression is re-evaluated, then anything that refers to it is notified. If a custom property is of a reference type, then the custom property is notified if the referent changes. The custom property notifies anything that refers to it of the change. If a constant changes, then the custom property notifies anything that refers to it of the change.
In an animation, an expression-type custom property is evaluated in the same manner as other expressions. A change to any member of the expression triggers a re-evaluation of the expression. An animation cannot write to an expression-type custom property, and such an attempt will generate a runtime error. An animation can read an expression-type property. If the custom property is updated due to a change of a reference in the expression, then the custom property in turn causes a re-evaluation of any expressions which reference it.
In an animation, a reference-type custom property is treated as a pass-through for all functionality. An animation can write to a reference-type custom property. Instead of writing the data to the custom property, the data are forwarded to the custom property's referent. If the referent changes, then the custom property in turn notifies any expressions that use it of the change. An animation can use a reference-type custom property for reading data. The data that are read do not come from the custom property itself but rather come from the referent of the custom property.
An animation can write data directly to a constant-type custom property. If the custom property changes, then any expressions that use it are notified. If the custom property was locked at configuration time, then the write is not allowed. An animation can read data directly from a constant-type custom property.
For the most part, a script treats custom properties in the same manner as does an animation. When running a script, a user cannot change an expression or read the expression definition itself (the data resulting from the evaluation can be read). Similarly, a user cannot change a reference or read the reference definition at runtime but can read the referent data of the reference. A script can read from and write to a constant-type custom property.
a, 2b, and 2c show different scenarios for embedding custom properties. In
CustomProperty1
CustomProperty2
In
EmbeddedSymbol1.CustomProperty1
EmbeddedSymbol1.CustomProperty2
In
EmbeddedSymbol2.EmbeddedSymbol1.CustomProperty1
EmbeddedSymbol2.EmbeddedSymbol1.CustomProperty2
In view of the many possible embodiments to which the principles of the present invention may be applied, it should be recognized that the embodiments described herein with respect to the drawing figures are meant to be illustrative only and should not be taken as limiting the scope of the invention. Those of skill in the art will recognize that some implementation details are determined by specific situations. Therefore, the invention as described herein contemplates all such embodiments as may come within the scope of the following claims and equivalents thereof.
This application claims priority to U.S. Provisional Patent Application 60/829,600, “Graphics Attributes Support,” which was filed on Oct. 16, 2006, and which is incorporated herein by reference in its entirety.
| Number | Date | Country | |
|---|---|---|---|
| 60829600 | Oct 2006 | US |