WO1993021591A1 - Method for converting a first data collection to a second data collection - Google Patents

Method for converting a first data collection to a second data collection Download PDF

Info

Publication number
WO1993021591A1
WO1993021591A1 PCT/US1993/003274 US9303274W WO9321591A1 WO 1993021591 A1 WO1993021591 A1 WO 1993021591A1 US 9303274 W US9303274 W US 9303274W WO 9321591 A1 WO9321591 A1 WO 9321591A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
collection
widget
class
attribute
Prior art date
Application number
PCT/US1993/003274
Other languages
French (fr)
Inventor
Peter Carl Ohler
Original Assignee
Teknekron Communications Systems, Inc.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Teknekron Communications Systems, Inc. filed Critical Teknekron Communications Systems, Inc.
Publication of WO1993021591A1 publication Critical patent/WO1993021591A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/117Tagging; Marking up; Designating a block; Setting of attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • G06F40/16Automatic learning of transformation rules, e.g. from examples
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language

Definitions

  • the present invention relates to a computer program operating under the control of a digital computer for converting a first collection of data to a second collection of data. More particularly, the method of the present invention provides for greater flexibility in changing the conversion of the data in the event it is desired to change the conversion from the first collection to the second collection to the conversion of the first collection of data to a third collection of data.
  • Object programming is also well known in the art.
  • object programming the program is written with objects having attributes and behavior defined therein.
  • the aim of object programming is to
  • a method of converting by a computer program operating under a digital computer of a first collection of data to a second collection of data is disclosed.
  • the first collection of data has a plurality of attributes.
  • the second collection of data has a plurality of attributes and is displayed on a display device of the computer.
  • the method comprises the steps of identifying by the computer a plurality of relationships with each relationship being an
  • a plurality of independent conversion routines is formed. Each of the independent
  • the data of the first collection is transformed to the data of the second collection by the plurality of independent conversion routine.
  • the second collection of data is then displayed on the display device.
  • Figure 1 is a perspective view of a digital computer under which a computer program of the present invention operates.
  • Figure 2 is a graphical display of a first collection of data having a plurality of attributes and a second collection of data having a plurality of different attributes to which the first collection of data is to be converted.
  • Figure 3 is a schematic diagram of a conversion program of the prior art wherein the entire first collection of data is converted into the entire second collection of data.
  • Figure 4 is a schematic diagram of another conversion method of the prior art employing object programming, wherein each object of a first
  • Figures 5 is a graphical depiction of the method of the present invention wherein the first collection of data has a plurality of attributes and a second collection of data has a plurality of attributes with a plurality of relationships being formed between an attribute of the first collection and an attribute of the second collection.
  • Figure 6 is a schematic diagram of the change of the conversion from Figure 5 wherein a first
  • the digital computer 10 comprises an enclosure 12 which contains a processor, memory and disk drive (not shown).
  • the digital computer 10 also comprises a display 14 for
  • Exhibit A is written in C++ language, which is a variation of the well know C++ language.
  • the C++ language is available from Teknekron Communications Systems, Inc. of Berkeley, California.
  • the program executes under a
  • UNIX operating system running on a computer 10, such as a Sparc Work Station, available from SUN
  • the first database 20 has a plurality of attributes (designated as A, B, D and E).
  • the first collection of data 20 is the result of processing of data by the processor 10. Thereafter, it is desired to display the results of the first collection of data 20 on the display screen 14.
  • display screen 14 would display a second collection of data 22 having its own attributes, possibly, in accordance with some standard.
  • the attributes of the second collection of data 22 can be graphical as depicted by element 22a or textual as depicted by element 22b, or floating point as depicted by element 22c, or integer as depicted by element 22d.
  • the method of the present invention is the conversion of the first collection of data 20 to the second
  • the second collection of data 22 can be displayed on the display screen 14.
  • the first collection of data B has a plurality of attributes b 1 , b 2 ... b m .
  • the first collection B is converted into a second collection A, comprising of attributes a 1 , a 2 ... a n .
  • a single conversion routine or program P receives all of the attributes from the database B and converts them into the attributes for database A and vice versa.
  • each of the collection of data A and B is termed an object of complex class.
  • each object of complex class A and B are a plurality of objects a 1 ... a n and objects b 1 ... b n , each of which is of a particular class.
  • the classes must be pre-defined. Since each class is also an object, the class
  • definition contains the attribute or the definition of data and the behavior, including translation behavior for that data.
  • the following example illustrates the object programming method of the prior art and its problem.
  • the program has defined the following classes of objects along with their attributes and translation behavior:
  • the objects of complex classes A and B are as
  • the computer program identifies a plurality of relationships wherein each relationship is one attribute of the first collection B to be converted to an attribute of the data of the second collection A. With each of these relationship identified, a plurality of independent conversion routines, called pipes, is then formed. Each of the pipes, p 1 ... p k , corresponds to one of the
  • Each one of the conversion routines e.g. p 1
  • the results of the conversion of the second collection of data A can be displayed on the device 14.
  • Each of the plurality of conversion routines p 1 ... p k can also convert an attribute of the second collection A back to an attribute of the first collection B.
  • a plurality of classes of translation objects P are also defined. They are:
  • a new class of objects STRING must be defined.
  • the new class would have an attribute of characters.
  • its translation behavior would be -none-.
  • new classes of translation objects must be created. These new classes of translation objects are the requisite translation types. If it is desired to convert the string characters to integer and to long, new class objects of STRING-TO-INT and STRING-TO-LONG objects must be created. Each of these objects would have an attribute of the address location for the operation. The translation behavior for each of these objects would be the translation of string characters to integer and string characters to long, respectively.
  • definition and the additional translation objects are defined, created, tested and debugged modularly and independent of the preexisting objects.
  • the objects of a particular class definition contain the attribute of the object but do not contain any translation behavior of the object. Further, within the translation objects or the pipe classes, each of the objects within the class of translation objects have translation behavior but no system data and minimal attributes. In fact, the only attribute of the object is the address and location of where the pipe is to be connected.
  • the routine uiBasicAttribute.C (commencing on page 6 of Exhibit A) is a root class routine from which the definition of each of the classes of objects flow.
  • the routine uiBasicDS.C is a routine (commencing on page 4 of Exhibit A) which defines the objects of the complex class (Class A or B in the example shown herein above).
  • uiBasicForm. C (commencing on page 30 of Exhibit A) is a routine which transforms uiBasicDS.C for display on the display screen 14.
  • the routine uiBasicPIPE.C (commencing on page 17 of Exhibit A) is a routine for all pipe classes. The action within the pipe is the translation behavior and this is seen on page 12, lines 45-46 of Exhibit A wherein the following statements appear:
  • a subclass of the class "STRING" which allows the display on the screen is the routine entitled “LabelWEC” commencing on page 49 of Exhibit A.
  • the attributes that are inherited by the objects of the class LabelWEC is performed by the routine
  • BridgeBS.C and BridgeBS.h (commencing on pages 58 and 57 respectively), and BridgeForm.C and BridgeForm.h (commencing on pages 53 and 51 respectively).
  • the routine BridgeBS.C (including the file .h) is an example of a complex class object for the data side, such as object B.
  • the routine BridgeForm.C is an example of a complex class object for the data side, such as object B.
  • the method of the present invention permits modular addition of new class of objects or types of data and new actions to be performed thereon.
  • data type or attributes and action are separated into separate objects to the extent possible, maintaining the simplicity and ease of debugging of object
  • This macro should be used to place attributes on the attributeList. It * is used to that classes derived from the uiBasicDS can replace it with * one that pushs attributes on more than one list. This has to be a macro * as long as the uiBasicAttribute class is not a virtual base class of * uiWECMixin and bsBSAMixin. Otherwise when you try to write PushMember * for classes such as uiBasicForm you can not create a version that pushes * the WECs onto both the attributeList and the wecList since a uiWECMixin * can not be caste to a uiBasicAttribute.
  • the BasicDS class is inherited by all Data Sources (DS) - It sets up * the basic functionality of the DS. This includes support for storing the * DS attributes on a list. CThe list has to be set up by the derived * classes since the members of the derived classes can not be known by the * inherited BasicDS class.) The DS also supports the ability to perform * several operation on the attributes of the derived DSs as long as those * DS have placed the attributes on the attribute list. The DS contains an * 'id.' for string name identification. It also has a 'stayActive' flag * which controls what the DS will do when there are no longer any other DSs * looking at it.
  • the constructor for the BasicDS creates a BasicDSList object for * storing the observers of the DS. It also initializes the 'id' to the name * argument and 'stayActive' flag to uFalse.
  • INPUT name The name is used to set the ⁇ id> data member in the DS. It * can be any valid pointer, including NULL.
  • AttributesHotLinkOn calls the BasicAttribute member function * uiBasicAttribute: :HotLinkOn () for each attribute on the 'attributeList'. * This has the affect of setting all the attributes of the DS to
  • AttributesHotLinkOff calls the BasicAttribute member function * uiBasicAttribute: :HotLinkOff() for each attribute on the 'attributeList'. * This has the affect of not propagating changes unless the attributes are * explicitly called to do so.
  • the RegisterObserver () function registers another DS as an observer * of the DS.
  • the other DS is pushed onto the observer list.
  • This class defines behavior for a list of uiBasicDS objects. This * class is defined using the uDECLARE_OBJECT_POINTER_LIST class definition * macro defined in uCons.h.
  • uDECLARE_OBJECT_POINTER LIST (uiBasicDSList, uiBasicDSCons, uiBasicDS);
  • uiBasicDS :uiBasicDS (const char *name)
  • observerList new uiBasicDSList
  • uiBasicDS : ⁇ uiBasicDS ( )
  • attributeList.Mapc (uiBasicAttribute: :HotLinkOn);
  • attributeList.Mapc (uiBasicAttribute: :HotLinkOff);
  • attributeList.Mapc (uiBasicAttribute: :Lock);
  • uiBasicDS :RegisterObserver (uiBasicDS *observer)
  • uiBasicDS :RemoveObserver (uiBasicDS *observer)
  • attributeList.Mapc (uiBasicAttribute: :Tickle);
  • attributeList.Mapc (uiBasicAttribute: :Siphon);
  • INPUT parentDS Typically it points to the Data Source object in which
  • parentDS' must be a valid uiBasicDS pointer
  • uiBasicAttribute : uiBasicAttribute (uiBasicDS *parentDS)
  • uiBasicAttribute :RegisterObserver (uiBasicPipe *pipe)
  • uiBasicAttribute UnregisterObserver (uiBasicPipe *pipe)
  • the Tickle ( ) function calls * uiBasicPipe ::SubjectChanged () for each observing pipe with a pointer to * itself as the argument.
  • Tickle () should just use an optional * argument, with the default being 0L as the uiBasicPipe. This doesn't * work when trying to use the Mapc () member function if we want to Tickle () * a list of objects. To avoid this problem.
  • Tickle () calls TickleOthers () * with a 0L argument.
  • * :DESC This causes the attribute value to be propogated through any * observing pipes, except for the 'skipPipe' to other attributes.
  • the * Tickle () function calls uiBasicPipe: : SubjectChanged () for each observing * pipe, except 'skipPipe' with a pointer to itself as the argument. In * effect this causes the Attribute's data value to be propagated through * each Pipe to the connecting Attribute at other end.
  • INPUT skipPipe Pipe object to be skipped during the propogation process * 'skipPipe' must be a valid uiBasicPipe or NULL.
  • the Siphon () function * calls uiBasicPipe: :UpdateSubject () for each observing pipe with a pointer * to itself as the argument.
  • the Siphon () function calls uiBasicPipe: :UpdateSubject() for each * observing pipe, except the one pointed to by 'skipPipe', with a pointer * to itself as the argument.
  • uiBasicAttribute ValueAltered (uiBasicPipe *pipe)
  • This class defines behavior for a Cons cell for a uiBasicAttribute * objects. This class is defined using the uDECLARE_OBJECT_POINTER_LIST * class definition macro defined in uCons.h.
  • uiBasicAttribute TickleOthers (uiBasicPipe *skipPipe)
  • uiBasicAttribute : ⁇ uiBasicAttribute ( )
  • BreakLink() removes the pipe from the list so a uDolist() or Mapc * can not be used.
  • the destructor breaks the link between the Pipe and any Attributes * it is connected to.
  • This member function causes the data member stored in the Attribute * at logical end A to be propagated to the Attribute at logical end B.
  • the data value is translated from Attribute A type to * Attribute B type using the TranslateAtoB () member function for the * specific Pipe subclass .
  • Data propagation takes place only if the Pipes * 'ChangeLockB' for end A is uFalse. If 'ChangeLockB' is uTrue no data * propagation takes place and a success value of 0 is returned.
  • This member function causes the data member stored in the Attribute * at logical end B to be propagated to the Attribute at logical end A.
  • the data value is translated from Attribute B type to * Attribute A type using the TranslateBtoA() member function for the * specific Pipe subclass. Data propagation takes place only if the Pipes * 'changeLockA' for end A is uFalse. If 'changeLockA' is uTrue no data * propagation takes place and a success value of 0 is returned.
  • uiBasicPipe :SubjectChanged(uiBasicAttribute *observer)
  • uiBasicPipe :UpdateSubject (uiBasicAttribute *observer)
  • This class defines behavior for a list of uiBasicPipe objects. This * class is defined using the uDECLARE_OBJECT_POINTER_LIST class definition * macro defined in uCons.h.
  • This class is defined using the uDECLARE_OBJECT_POINTER_LIST
  • uDECLARE_OBJECT_POINTER_LIST ( uiBasicPipeList, uiBasicPipeCons, uiBasicPipe ); #endif /* _uiBasicPipe_h_ */
  • uDEFINE_OBJECT_POINTER_LIST ( uiBasicPipeList, uiBasicPipeCons, uiBasicPipe ) ;
  • a link is established by setting the values of ⁇ endA> and ⁇ endB> and by
  • uiBasicPipe :EstablishLink (uiBasicAttribute *a,
  • endA (uiBasicAttribute*) 0L;
  • endB (uiBasicAttribute*) 0L;
  • uiBasicPipe :SetPriority (int p)
  • uilntAttribute :uilntAttribute (uiBasicDS *parentDS, int v) :
  • This subclass of uiBasicPipe provides functionality for linking a * BooleanAttribute and a StringAttribute. Conversion from one Attribute * value to the other is provided with a direct mapping of each uBoolean * value with a single string value as described in the translation member * functions. There is no limit to the number of instances that may exist * for this class. Objects of this class can be contained by Data Sources. */
  • class uiBooleanStrPipe public uiBasicPipe ⁇
  • uiBooleanStrPipe :EstablishLink(uiBooleanAttribute *a,

Abstract

In the present invention a modular method for converting a first collection of data having a plurality of attributes to a second collection of data having a plurality of attributes is disclosed. The method comprises establishing a plurality relationship with each relationship being an attribute of the data of the first collection to be converted to an attribute of the data of the second collection. A plurality of independent conversion routines is formed with each conversion routine corresponding to one of the established relationships. The data of the first collection is transformed into the data of the second collection and is displayed on the display device of a computer.

Description

"METHOD FOR CONVERTING A FIRST DATA COLLECTION
TO A SECOND DATA COLLECTION"
Technical Field
The present invention relates to a computer program operating under the control of a digital computer for converting a first collection of data to a second collection of data. More particularly, the method of the present invention provides for greater flexibility in changing the conversion of the data in the event it is desired to change the conversion from the first collection to the second collection to the conversion of the first collection of data to a third collection of data.
Background of the Invention
Computer programs to convert a first collection of data having a plurality of attributes to a second collection of data having a plurality of attributes are well known in the art. Heretofore, however, the computer programs that convert the first collection of data to the second collection of data, once written, tested and debugged, cannot be changed with ease. The problem with the computer programs of the prior art is that in the event it is desired to modify the conversion of the data from the first collection to a third collection, for example, the entire conversion program must be rewritten, tested, and debugged. Thus, the conversion program offers little in way of flexibility of upgrade and change.
Object programming is also well known in the art. In object programming, the program is written with objects having attributes and behavior defined therein. The aim of object programming is to
encapsulate as much of the attributes (or definition of data) and behavior (action on that data) in a single modular entity so that objects can be created at a different time, and/or by different programmers, and brought together in a system. Further, it is believed that changes can be made modularly.
Summary of the Invention
In accordance with the present invention, a method of converting by a computer program operating under a digital computer of a first collection of data to a second collection of data is disclosed. The first collection of data has a plurality of attributes. The second collection of data has a plurality of attributes and is displayed on a display device of the computer. The method comprises the steps of identifying by the computer a plurality of relationships with each relationship being an
attribute of the data of the first collection to be converted to an attribute of the data of the second collection. A plurality of independent conversion routines is formed. Each of the independent
conversion routines corresponds to one of the
relationships. The data of the first collection is transformed to the data of the second collection by the plurality of independent conversion routine. The second collection of data is then displayed on the display device. Brief Description of the Drawings
Figure 1 is a perspective view of a digital computer under which a computer program of the present invention operates. Figure 2 is a graphical display of a first collection of data having a plurality of attributes and a second collection of data having a plurality of different attributes to which the first collection of data is to be converted.
Figure 3 is a schematic diagram of a conversion program of the prior art wherein the entire first collection of data is converted into the entire second collection of data.
Figure 4 is a schematic diagram of another conversion method of the prior art employing object programming, wherein each object of a first
collection contains the behavior necessary to convert the attribute of that object to an object of a second collection.
Figures 5 is a graphical depiction of the method of the present invention wherein the first collection of data has a plurality of attributes and a second collection of data has a plurality of attributes with a plurality of relationships being formed between an attribute of the first collection and an attribute of the second collection. A single independent
conversion routine is established for each of the relationships.
Figure 6 is a schematic diagram of the change of the conversion from Figure 5 wherein a first
collection is converted into a second collection and in Figure 6 wherein the first collection of data is converted into a third collection of data. Detailed Description of the Drawings
Referring to Figure l there is shown a
perspective view of a digital computer 10 under which the computer program of the present invention
operates. As is well known, the digital computer 10 comprises an enclosure 12 which contains a processor, memory and disk drive (not shown). The digital computer 10 also comprises a display 14 for
displaying the results of the computation by the processor. Finally, a user interacts with the digital computer 10 through a keyboard 16. The program of the present invention is operated under a digital computer 10. The software listing for the program is attached herewith as Exhibit A. In the preferred embodiment, the program set forth in
Exhibit A is written in C++ language, which is a variation of the well know C++ language. The C++ language is available from Teknekron Communications Systems, Inc. of Berkeley, California. In the preferred embodiment, the program executes under a
UNIX operating system running on a computer 10, such as a Sparc Work Station, available from SUN
Microsystems, Inc.
Referring to Figure 2 there is shown
schematically a block diagram of a first database 20 operated upon by the computer program of the present invention. Schematically, the first database 20 has a plurality of attributes (designated as A, B, D and E). Typically, the first collection of data 20 is the result of processing of data by the processor 10. Thereafter, it is desired to display the results of the first collection of data 20 on the display screen 14.
Many standards have been developed dictating the particular manner in which data is displayed on the screen 14. Thus, for example, one standard is the X Windows (available from MIT) having the capability for a windowed presentation that consists of both text and graphical components, called widgets. A number of widgets work together to display information and provide user interaction
capabilities. Thus, as shown in Figure 2, the
display screen 14 would display a second collection of data 22 having its own attributes, possibly, in accordance with some standard. The attributes of the second collection of data 22 can be graphical as depicted by element 22a or textual as depicted by element 22b, or floating point as depicted by element 22c, or integer as depicted by element 22d. The method of the present invention is the conversion of the first collection of data 20 to the second
collection of data 22 and vice versa. The second collection of data 22 can be displayed on the display screen 14.
Before discussing the present invention, it would be useful to review the methods of the prior art. Referring to Figure 3 there is shown
schematically the conversion of the first collection of data B to the second collection of data A as performed by one method of the prior art. The first collection of data B has a plurality of attributes b1, b2 ... bm. The first collection B is converted into a second collection A, comprising of attributes a1, a2 ... an. In the prior art, a single conversion routine or program P receives all of the attributes from the database B and converts them into the attributes for database A and vice versa. As can be seen, in the event it is desired to add another element, e.g. data having attribute bm+1 and to convert that to an
attribute an+1, the entire program P must be
rewritten. This would be a laborious task involving the rewriting, debugging and testing of the entire program P.
Referring to Figure 4 there is shown
schematically the conversion of the first collection of data B, to the second collection of data A, as represented by another method of the prior art. In this method, which is based upon object programming, each of the collection of data A and B is termed an object of complex class. Within each object of complex class A and B are a plurality of objects a1 ... an and objects b1 ... bn, each of which is of a particular class. The classes must be pre-defined. Since each class is also an object, the class
definition contains the attribute or the definition of data and the behavior, including translation behavior for that data.
The following example illustrates the object programming method of the prior art and its problem. The program has defined the following classes of objects along with their attributes and translation behavior:
LONG FLOAT INT
attribute: double floating integer
precision point
translation TO INT TO LONG TO FLOAT behavior: TO LONG
The objects of complex classes A and B are as
follows:
A B
a1 - object of class LONG b1 - object of class INT a2 - object of class INT b2 - object of class FLOAT a3 - object of class FLOAT b3 - object of class LONG b4 - object of class INT
The translation or conversion between objects of A and B occur as follows: A B
a 1 TO INT b1
- - - - - - - - - - ->
a 2 TO FLOAT b2
- - - - - - - - - - ->
a 3 TO LONG b3
- - - - - - - - - - ->
a 2 TO LONG b3
- - - - - - - - - - -> The objects within the complex class A and B will transform themselves with the translation behavior encapsulated within that object.
However, let us assume now that a new class of object STRING is created. Further, an object in the class STRING must be able to translate to and from an object in the classes INT and LONG. To accomplish this change, the following must occur:
1) define new class STRING
attribute: characters translation behavior: TO INT
TO LONG
2) modify the classes INT and LONG to include the translation behavior TO STRING.
As can be seen from the foregoing, the addition of a new class definition may necessitate more than one modification to existing defined classes.
Although object programming has minimized the amount of change the creation of a new object causes, nevertheless, it is not totally modular and portions of existing code must be modified and tested.
Referring to Figure 5 there is shown
schematically the method of the present invention. In the present invention, the computer program identifies a plurality of relationships wherein each relationship is one attribute of the first collection B to be converted to an attribute of the data of the second collection A. With each of these relationship identified, a plurality of independent conversion routines, called pipes, is then formed. Each of the pipes, p1 ... pk, corresponds to one of the
relationships. Each one of the conversion routines, e.g. p1, converts a data having an attribute, e.g. b1, of the first set B, to a data having an attribute, such as a1, of the second collection of data A. The results of the conversion of the second collection of data A can be displayed on the device 14. Each of the plurality of conversion routines p1 ... pk can also convert an attribute of the second collection A back to an attribute of the first collection B.
The ease with which the method of the present invention facilitates changes is seen by referring to Figure 6. In Figure 6, for example, the original first collection of data B is now desired to be converted into a third collection of data A'. The difference between the third collection of data A' and the second collection A is that some new
relationship, e.g. shown in Figure 6 as pk is
established in the conversion between b1 to a'm. As can be seen in Figure 6, only the necessary changes to the relationships need be established by the creation of new conversion routines. The necessary-pipes to maintain the conversion of the data from the attributes of the first collection of data B to the second collection of data A which are the same as the conversion from B to A' continue to be maintained. All other pipes p are then severed. The necessary new relationship to convert the additional conversion from the attributes of B to A' are established by the creation of the new pipes, e.g. pk. Thus, in this manner, conversion changes can be modularly affected.
The invention will now be described with respect to object programming and the example illustrated herein above. In the present invention, the classes of objects are defined without any translation behavior. Thus, analogous to the example illustrated herein above, the classes are defined as:
LONG FLOAT INT
attribute: double floating integer
precision point
translation - none - - none - - none - behavior:
A plurality of classes of translation objects P are also defined. They are:
LONG-TO- FLOAT-TO- INT-TO- INT-TO-
INT LONG FLOAT LONG
attribute: address address address address location location location location for for for for operation operation operation operation transtranslate translate translate translate lation long to float to integer to integer to behavior: integer long float long
The objects of complex class A and B are as defined before:
A B
a1 - object of class LONG b1 - object of class INT a2 - object of class INT b2 - object of class FLOAT a3 - object of class FLOAT b3 - object of class LONG b4 - object of class INT The objects for the pipes are
P
p1 - object of class LONG-TO-INT
p2 - object of class FLOAT-TO-LONG
p3 - object of class INT-TO-FLOAT
pA - object of class INT-TO-LONG
The translation or conversion between objects of A and B occur as follows:
A P B
a1 - - - - - - - - - p1 - - - - - - - - - > b1
a2 - - - - - - - - - p3 - - - - - - - - - > b2
a3 - - - - - - - - - p2 - - - - - - - - - > b3
a2 - - - - - - - - - p4 - - - - - - - - - > b3
Now if a new class of object STRING were
created, a new class of objects STRING must be defined. The new class would have an attribute of characters. In addition, similar to the discussion heretofore with regard to object classification, its translation behavior would be -none-. In addition, new classes of translation objects must be created. These new classes of translation objects are the requisite translation types. If it is desired to convert the string characters to integer and to long, new class objects of STRING-TO-INT and STRING-TO-LONG objects must be created. Each of these objects would have an attribute of the address location for the operation. The translation behavior for each of these objects would be the translation of string characters to integer and string characters to long, respectively.
As can be seen from the foregoing, the addition of a new class definition does not necessitate any change or modification to pre-existing defined classes of objects. The additional new class
definition and the additional translation objects, are defined, created, tested and debugged modularly and independent of the preexisting objects.
In the method of the present invention, the objects of a particular class definition contain the attribute of the object but do not contain any translation behavior of the object. Further, within the translation objects or the pipe classes, each of the objects within the class of translation objects have translation behavior but no system data and minimal attributes. In fact, the only attribute of the object is the address and location of where the pipe is to be connected.
The program software listing attached herewith as Exhibit A, and with reference to the example illustrated herein above, is explained as follows:
The routine uiBasicAttribute.C (commencing on page 6 of Exhibit A) is a root class routine from which the definition of each of the classes of objects flow. The routine uiBasicDS.C is a routine (commencing on page 4 of Exhibit A) which defines the objects of the complex class (Class A or B in the example shown herein above). The routine
uiBasicForm. C (commencing on page 30 of Exhibit A) is a routine which transforms uiBasicDS.C for display on the display screen 14. The routine uiBasicPIPE.C (commencing on page 17 of Exhibit A) is a routine for all pipe classes. The action within the pipe is the translation behavior and this is seen on page 12, lines 45-46 of Exhibit A wherein the following statements appear:
virtual int TranslateAtoB() = 0;
virtual int TranslateBtoA() = 0; An example of a pipe to translate boolean data wherein the state of the data is true or false or "0" or "1" to a string character wherein characters of "true or yes" or "false or no" is created as set forth in the routine uiBooleanStrPipe (commencing on page 24 of Exhibit A, lines 26-52). A class
definition for the class INT having the attribute integer is set forth in the routine uilntAttribute.h commencing on page 21 of Exhibit A.
such as object A.
A subclass of the class "STRING" which allows the display on the screen is the routine entitled "LabelWEC" commencing on page 49 of Exhibit A. The attributes that are inherited by the objects of the class LabelWEC is performed by the routine
uiWECMixin(), commencing on page 43 of Exhibit A.
Other routines set forth on Exhibit A are
BridgeBS.C and BridgeBS.h (commencing on pages 58 and 57 respectively), and BridgeForm.C and BridgeForm.h (commencing on pages 53 and 51 respectively). The routine BridgeBS.C (including the file .h) is an example of a complex class object for the data side, such as object B. The routine BridgeForm.C
(including the file .h) is an example of a complex class object for the display or presentation side, From the foregoing, it can be seen that a modified form of object programming method for translation is disclosed. Unlike the methods of the prior art wherein the entire collection data is translated by a single program or the object
programming method of the prior art wherein each data inherently contains the translation behavior or action, the method of the present invention permits modular addition of new class of objects or types of data and new actions to be performed thereon. With the method of the present invention, data type or attributes and action are separated into separate objects to the extent possible, maintaining the simplicity and ease of debugging of object
programming as well as the modularity of conversion.
uiBasicDS.h
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAX NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*/
/* SCCS Info: @(#) uiBasicDS.h integration_cfgCore: :0:0 plastic */
#ifndef_uiBasicDS_h_
#define _uiBasicDS_h_
#include <util/Types/uTypes.h>
#include <util/List/uCons.h>
#include "ui/abstract/uiBasicAttribute.h"
/* This macro should be used to place attributes on the attributeList. It * is used to that classes derived from the uiBasicDS can replace it with * one that pushs attributes on more than one list. This has to be a macro * as long as the uiBasicAttribute class is not a virtual base class of * uiWECMixin and bsBSAMixin. Otherwise when you try to write PushMember * for classes such as uiBasicForm you can not create a version that pushes * the WECs onto both the attributeList and the wecList since a uiWECMixin * can not be caste to a uiBasicAttribute.
*/
#define PushMember (attr) { \
attributeList. Push ( ( uiBasicAttribute* ) & ( attr) ) ; \ }
/* This class declaration is included here since the uiBasicDSList class * can not be defined until after the uiBasicDS class, yet the uiBasicDS * class needs to have a list of objects of the uiBasicDS class. It would * be better to have the List embedded in the uiBasicDS but that is not * possible.
*/
class uiBasicDSList;
/* :CLASS uiBasicDS
* :DESC The BasicDS class is inherited by all Data Sources (DS) - It sets up * the basic functionality of the DS. This includes support for storing the * DS attributes on a list. CThe list has to be set up by the derived * classes since the members of the derived classes can not be known by the * inherited BasicDS class.) The DS also supports the ability to perform * several operation on the attributes of the derived DSs as long as those * DS have placed the attributes on the attribute list. The DS contains an * 'id.' for string name identification. It also has a 'stayActive' flag * which controls what the DS will do when there are no longer any other DSs * looking at it.
*/
class uiBasicDS {
public:
uiBasicDS (const char *name = (const char*) 0L);
virtual -uiBasicDS();
void AttributesHotLinkOn ();
void AttributesHotLinkOff ();
void LockAttributes ();
void UnlockAttributes ();
int RegisterObserver(uiBasicDS *observer);
void RemoveObserver (uiBasicDS *observer) ;
void TicklePipes ();
void SiphonPipes (); const char *id;
uiBasicAttributeList attributeList;
uiBasicDSList *observerList;
uBoolean stay-Active;
};
/* :FUNC uiBasicDS: :uiBasicDS (const char *name = (const char*) 0L)
*
* :DESC The constructor for the BasicDS creates a BasicDSList object for * storing the observers of the DS. It also initializes the 'id' to the name * argument and 'stayActive' flag to uFalse.
*
* : INPUT name The name is used to set the <id> data member in the DS. It * can be any valid pointer, including NULL.
*/
/* :FUNC uiBasicDS: :~uiBasicDS (void)
*
* :DESC The destructor for the uiBasicDS only deletes the observer list * object.
*/
/* :FUNC uiBasicDS: :AttributesHotLinkOn(void)
*
* :DESC The AttributesHotLinkOn () calls the BasicAttribute member function * uiBasicAttribute: :HotLinkOn () for each attribute on the 'attributeList'. * This has the affect of setting all the attributes of the DS to
* automatically propagate changes when they occur.
*/
/* :FUNC uiBasicDS: :AttributesHotLinkOff (void)
*
* :DESC The AttributesHotLinkOff () calls the BasicAttribute member function * uiBasicAttribute: :HotLinkOff() for each attribute on the 'attributeList'. * This has the affect of not propagating changes unless the attributes are * explicitly called to do so.
*/
/* :FUNC uiBasicDS: :LockAttributes (void)
*
* :DESC The LockAttributes ( ) calls the member function
* uiBasicAttribute: :Lock () for each attribute on the 'attributeList'. This * has the affect of locking all the attributes of the DS.
*/
/* :FUNC uiBasicDS: :uiBasicDS: :UnlockAttributes
*
* :DESC The UnlockAttributes () calls the member function
* uiBasicAttribute: :Unlock () for each attribute on the 'attributeList'.
* This has the affect of unlocking all the attributes of the DS.
*/
/* :FUNC uiBasicDS: :RegisterObserver (uiBasicDS *observer)
*
* :DESC The RegisterObserver () function registers another DS as an observer * of the DS. The other DS is pushed onto the observer list.
* : INPUT observer This is the uiBasicDS that is being registered. It must be a * valid uiBasicDS.
*/
/* :FUNC uiBasicDS: : RemoveObserver (uiBasicDS *observer)
*
* :DESC The RemoveObserver ( ) function removes a specific DS from the
* observer list using the uiBasicDSList ::Delete () member function of the * list. If the list becomes empty as a result of this method invocation and * the DS's 'stayActive' data member is set to uFalse, the DS is destroyed. *
* :INPUT observer This is uiBasicDS that is being removed from the observer * list. It must be a valid uiBasicDS.
*/
/* :FUNC uiBasicDS: :TicklePipes (void)
*
* :DESC The TicklePipes () calls the member function
* uiBasicAttribute::Tickle() for each attribute on the attributelist. It * uses the uiBasicDSList: :Mapc() member function of the observer list. This * causes each attribute to propagate its changes through any attached * pipes.
*/
/* :FDNC uiBasicDS: :SiphonPipes (void)
*
* :DESC The SiphonPipes () calls the member function
* uiBasicAttribute: :Siphon() for each attribute on the attributelist. It * uses the uiBasicDSList: rMapc() member function of the observer list. This * causes each attribute to draw in the values from attributes at the other * end of any attached pipes.
*/
/* :VAR uiBasicDS::id
*
* :DESC Pointer to string used to identify an instance of this class.
*/
/* :VAR uiBasicDS::attributeList
*
* :DESC A uiBasicAttributeList object which keeps a list of all the
* Attributes contained in the Data Source. The list must be populated by * the constructor for the derived class using the PushMember () macro.
*/
/* :VAR uiBasicDS:robserverList
*
* :DESC Pointer to a uiBasicDSList object which keeps a list of all the * other uiBasicDSs that are getting values from this Data Source's
* Attributes.
*/
/* :VAR uiBasicDS::stayActive
*
* :DESC Boolean flag indicating whether or not this Data Source should be * destroyed when its observer list becomes empty. If set to uTrue the object * is not destroyed. If it is uFalse then the DS will be deleted when the * observerList becomes empty.
*/
/* :CLASS uiBasicDSList
*
* :DESC This class defines behavior for a list of uiBasicDS objects. This * class is defined using the uDECLARE_OBJECT_POINTER_LIST class definition * macro defined in uCons.h.
*/
/* :CLASS uiBasicDSCons
*
* :DESC This class defines behavior for a Cons cell for a uiBasicDS objects. * This class is defined using the uDECLARE_OBJECT_POINTER_LIST class * definition macro defined in uCons.h.
*/
uDECLARE_OBJECT_POINTER LIST (uiBasicDSList, uiBasicDSCons, uiBasicDS);
#endif /* _uiBasicDS_h_ */ uiBasicDS.C
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*
*/
#ifndef SABER
static char sccslnfo[ ] = "SCCS Info: @(#) uiBasicDS.C integration_cfgCore: :0:0 plastic"; #endif /* ! SABER */
/* uiBasicDS.C */
#include <util/List/uConsImp.h>
#include "ui/abstract/uiBasicDS.h"
uDEFINE_OBJECT_POINTER_LIST(uiBasicDSList, uiBasicDSCons, uiBasicDS);
/*
* Most of the comments for these functions can be found in the header file.
* Only additional information about the implementation will be included in
* this file.
*/
uiBasicDS: :uiBasicDS (const char *name)
{
id = name;
stayActive = uFalse;
observerList = new uiBasicDSList;
}
uiBasicDS: : ~uiBasicDS ( )
{
delete observerList;
}
void
uiBasicDS: :AttributesHotLinkOn()
{
attributeList.Mapc (uiBasicAttribute: :HotLinkOn);
}
void
uiBasicDS: :AttributesHotLinkOff ()
{
attributeList.Mapc (uiBasicAttribute: :HotLinkOff);
)
void
uiBasicDS: : LockAttributes ()
{
attributeList.Mapc (uiBasicAttribute: :Lock);
}
void
uiBasicDS : : UnlockAttributes ( )
{
attributeList .Mapc (uiBasicAttribute: : Unlock);
}
int
uiBasicDS: :RegisterObserver (uiBasicDS *observer)
{ return observerList->Push (observer);
)
/*
* :N uiBasicDS: :RemoveObserver
*
* :A We check the staActive flag to determine if this DS should be deleted * when there are no other DSs observing it.
*/
void
uiBasicDS: :RemoveObserver (uiBasicDS *observer)
{
observerList->Delete (observer);
if (observerList->lsEmpty() && uFalse = stayActive) {
delete this;
}
}
void
uiBasicDS: :TicklePipes()
{
attributeList.Mapc(uiBasicAttribute: :Tickle);
}
void
uiBasicDS: :SiphonPipes ()
{
attributeList.Mapc(uiBasicAttribute: :Siphon);
}
uiBasicAttribute.h
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*/
/* SCCS Info: @(#) uiBasicAttribute. h integration_cfgCore: :0:0 plastic */ tifndef _uiBasicAttribute_h_
#define _uiBasicAttribute_h_
#include <util/Types/uTypes.h>
#include <util/List/uCons.h>
#include "ui/abstract/uiBasicPipe.h"
class uiBasicDS;
class uiBasicDSList;
/* : CLASS uiBasicAttribute
*
* :DESC This class provides basic functionality for all Attributes.
* It is inherited by all other Attribute classes. There is no limit
* to the number of run-time instances that may exist for this
* class.
*/
class uiBasicAttribute {
public:
uiBasicAttribute (uiBasicDS *parentDS)
virtual -uiBasicAttribute ();
void HotLinkOff ();
void HotLinkOn ();
void Lock ( );
void Unlock ();
int RegisterObserver (uiBasicPipe *pipe);
void UnregisterObserver (uiBasicPipe *pipe);
void SortObservers ( );
void TickleOthers (uiBasicPipe *skipPipe);
void Tickle ( );
void SiphonOthers (uiBasicPipe *skipPipe);
void Siphon ();
void ValueAltered (uiBasicPipe *ρipe = (uiBasicPipe*) 0L) , uBoolean hotLink ;
uBoolean changeLock;
uiBasicPipeList observers;
uiBasicDS *parent;
/* :FUNC uiBasicAttribute: :uiBasicAttribute (uiBasicDS *parentDS)
*
* :DESC Constructor for this class. Class attributes are initialized to * default values: changeLock = uFalse and hotLink uTrue.
*
* : INPUT parentDS Typically it points to the Data Source object in which
* this Attribute is contained. parentDS' must be a valid uiBasicDS pointer
* or NULL.
*/
inline
uiBasicAttribute: : uiBasicAttribute (uiBasicDS *parentDS)
{ parent = parentDS;
hotLink = uTrue;
changeLock = uFalse;
}
/* :FUNC uiBasicAttribute: :-uiBasicAttribute(void)
*
* :DESC Destructor for this class. Cleans up the list of observers by * breaking the link to each Pipe object interested in the Attribute.
*/
/* :FUNC uiBasicAttribute: :HotLinkOff(void)
*
* :DESC This member function works in conjunction with the ValueAltered * function to control the automatic propagation of Attribute data values * through Pipes. After calling this member function the attribute will not * propogate changes when the SetValue () member function is called.
*/
inline void
uiBasicAttribute: :HotLinkOff ()
{
hotLink = uFalse;
}
/* :FUNC uiBasicAttribute: :HotLinkOn (void)
*
* :DESC This member function works in conjunction with the ValueAltered * function to control the automatic propagation of Attribute data values * through Pipes. After calling this member function the attribute will * propogate changes when the SetValue () member function is called.
*/
inline void
uiBasicAttribute: :HotLinkOn()
{
hotLink = uTrue;
}
/* :FUNC uiBasicAttribute: :Lock (void) and Unlock (void)
*
* :DESC These methods set and unset the Attributes 'changeLock' flag which * are used to keep value changes from being made to the object. Derived * classes should check the value of this lock before proceeding with * SetValue() calls. Lock () will set the 'changeLock' flag to uTrue and * Unlock() will set 'changeLock' to uFalse.
*/
inline void
uiBasicAttribute: :Lock()
{
changeLock = uTrue;
}
inline void
uiBasicAttribute: :Unlock ()
{
changeLock = uFalse;
}
/* :FUNC uiBasicAttribute: :RegisterObserver (uiBasicPipe *pipe)
*
* :DESC This member function is utilized by Pipes when establishing a * connection between two Attribute objects. The pipe is placed on a * list of observers that will be notified in the event that the attribute's * value changes. 'pipe' must be a valid uiBasicPipe or must be of a class * that inherits from uiBasicPipe.
*
* :INPUT Bipe The pipe to register as an observer.
*
* :OUTPUT . Returns the result of the uCons: :Insert () member function. 0 * indicates success and -1 indicates failure.
*/
inline int
uiBasicAttribute: :RegisterObserver (uiBasicPipe *pipe)
{
return (observers. Insert (pipe, ComparePipePriority));
}
/* :FUNC uiBasicAttribute: :UnregisterObserver(uiBasicPipe *pipe)
*
* :DESC This function is called by a Pipe when the pipe that is observing * the attribute is deleted. It removes the pipe from the list of observer * in the attribute.
*
* : INPUT pipe The pipe to unregister as an observer.
*/
inline void
uiBasicAttribute: : UnregisterObserver (uiBasicPipe *pipe)
{
observers.Delete (pipe);
}
/* :FUNC uiBasicAttribute: :SortObservers (void)
*
* :DESC If the priority of one of the pipes observing the attribute is * changed then the pipes observing the attribute must be re-sorted. This * assures that the pipes observing the attribute are notified of changes in * the correct order . Pipes are responsible for calling this member
* function when thier priority is changed.
*/
inline void
uiBasicAttribute: :SortObservers ()
{
observers.Sort (ComparePipePriority);
}
/* :FUNC uiBasicAttribute: :Tickle (void)
*
* :DESC This causes the attribute value to be propogated through any * observing pipes to other attributes. The Tickle ( ) function calls * uiBasicPipe ::SubjectChanged () for each observing pipe with a pointer to * itself as the argument.
*
* :A At first it would appear as if Tickle () should just use an optional * argument, with the default being 0L as the uiBasicPipe. This doesn't * work when trying to use the Mapc () member function if we want to Tickle () * a list of objects. To avoid this problem. Tickle () calls TickleOthers () * with a 0L argument.
*/
inline void
uiBasicAttribute : :Tickle ( )
{
TickleOthers ( (uiBasicPipe*) 0L);
}
/* :FUNC uiBasicAttribute: :TickleOthers (uiBasicPipe *skipPipe)
*
* :DESC This causes the attribute value to be propogated through any * observing pipes, except for the 'skipPipe' to other attributes. The * Tickle () function calls uiBasicPipe: : SubjectChanged () for each observing * pipe, except 'skipPipe' with a pointer to itself as the argument. In * effect this causes the Attribute's data value to be propagated through * each Pipe to the connecting Attribute at other end.
*
* : INPUT skipPipe Pipe object to be skipped during the propogation process. * 'skipPipe' must be a valid uiBasicPipe or NULL.
* / /* :FUNC uiBasicAttribute::Siphon (void)
*
* :DESC This member function is the inverse of the Tickle() member
* function. Instead of causing the Attributes data value to be propagated * through the attached Pipes, it draws the values in from the Attributes * attached to the other end of the observing Pipes . The Siphon () function * calls uiBasicPipe: :UpdateSubject () for each observing pipe with a pointer * to itself as the argument.
*/
inline void
uiBasicAttribute::Siphon()
{
SiphonOthers ( (uiBasicPipe*) 0L);
}
/* :FUNC uiBasicAttribute: :SiphonOthers(uiBasicPipe *skipPipe)
*
* rDESC The Siphon () function calls uiBasicPipe: :UpdateSubject() for each * observing pipe, except the one pointed to by 'skipPipe', with a pointer * to itself as the argument.
*
* :INPUT skipPipe Pipe object to be skipped during the propogation process. * 'skipPipe' must be a valid uiBasicPipe or NULL.
*/
/* :FUNC uiBasicAttribute: :ValueAltered(uiBasicPipe *pipe)
*
* :DESC Controls the propagation of data values from the Attribute object. * If automatic propogation is active (HotLinkOn () member function called) * then the TickleOthers () member function is called with the 'pipe' as an * argument to the function. This member function is usually called only by * an Instance of an attribute class after the SetValue() member function is * called. Typically it is only called by the Instance itself. However * there is no restriction to calling it from outside the class.
*
* :INPUT pipe The pipe that is calling the member function or NULL if not * called from a pipe.
*/
inline void
uiBasicAttribute: : ValueAltered (uiBasicPipe *pipe)
{
if (uTrue = = hotLink) {
TickleOthers(pipe);
}
}
/* :VAR uiBasicAttribute: :changeLock
*
* :DESC A flag to store the lock status.
*/
/* :CLASS uiBasicAttributeList
*
* :DESC This class defines behavior for a list of uiBasicAttribute objects. * This class is defined using the uDECLARE_OBJECT_POINTER_LIST class * definition macro defined in uCons.h.
*/
/* :CLASS uiBasicAttributeCons
*
* :DESC This class defines behavior for a Cons cell for a uiBasicAttribute * objects. This class is defined using the uDECLARE_OBJECT_POINTER_LIST * class definition macro defined in uCons.h.
*/
uDECLARE_OBJECT_POINTER_LIST (uiBasicAttributeList,
uiBasicAttributeCons,
uiBasicAttribute) ;
#endif /* _uiBasicAttribute_ h_ */ uiBasicAttribute.C
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*
*/
#ifndef SABER
static char sccsInfo[ ] = "SCCS Info: @(#) uiBasicAttribute.C integration_cfgCore : :0:0 plastic";
#endif /* ! SABER */
/* uiBasicAttribute.C */
#include <util/List/uConsImp.h>
#include "ui/abstract/uiBasicPipe.h"
#include "ui/abstract/uiBasicAttribute.h"
uDEFINE_OBJECT_POINTER_LIST (uiBasicAttributeList,
uiBasicAttributeCons,
uiBasicAttribute); /*
* :N uiBasicAttribute::TickleOthers
*
* :A The list of observers is iterated over and each pipe, except the
* skipPipe is called with the SubjectChanged() member function. If this
* function returns a positive value then the iteration stops. This allows
* the SubjectChanged() function to eventually delete the Attribute without
* ending up with a stale reference.
*/
void
uiBasicAttribute: : TickleOthers (uiBasicPipe *skipPipe)
{
register uiBasicPipeCons *cp;
register uiBasicPipe *pipe;
uDolist (pipe, cp, observers) {
if (skipPipe != pipe) {
if (0 < pipe->SubjectChanged (this) ) {
break;
}
}
}
}
/*
* :N uiBasicAttribute: :-uiBasicAttribute
*
* :A There are some dependencies here. We can not walk down the observer
* list an call BreakLink() on each pipe since the pipe will then try to
* remove itself from the observer list. Once it is removed the Cons cell
* that would be used to find the next item on the list wiil be gone and we
* will be left with a stale reference. To avoid this we just take the top
* pipe off the list and Break the link with it until the list is empty.
*/
uiBasicAttribute : : ~uiBasicAttribute ( )
{
uiBasicPipe *pipe; /*
* BreakLink() removes the pipe from the list so a uDolist() or Mapc * can not be used.
*/
while ((uiBasicPipe*) 0L != (pipe = observers.Pop ()) ) {
pipe->BreakLink ();
}
}
/*
* :N uiBasicAttribute: :SiphonOthers
*
* :A Note that it doesn't make much sense to call this if there is more than * two pipes since one will over write the other.
*/
void
uiBasicAttribute::SiphonOthers (uiBasicPipe *skipPipe)
{
register uiBasicPipeCons *cp;
register uiBasicPipe *pipe;
if ( ! changeLock) {
uDolist (pipe, cp, observers) {
if (skipPipe ! = pipe) {
if (0 < pipe->UpdateSubject(this) ) {
break;
}
}
}
}
}
uiBasicPipe.h
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*/
/* SCCS Info: @(#) uiBasicPipe.h integration_cfgCore::0:0 plastic */
#ifndef _uiBasicPipe_h_
#define _uiBasicPipe_h_
#include <util/Types/uTypes.h>
#include <util/List/uCons.h>
class uiBasicAttribute;
class uiBasicAttributeList;
/* :CLASS uiBasicPipe
*
* :DESC This class provides basic functionality for all Pipes. It is * inherited by all other Pipe classes. Functionality includes the ability * to propagate values from one end of a Pipe to the other and locking to * enable or disable propagation of data through the Pipe. This class * defines virtual functions for TranslateAtoB() and TranslateBtoA().
* These functions handle the actual data type transformations which take * place when data values are propagated through the Pipes. These functions * are defined in concrete Pipe classes as needed.
*/
class uiBasicPipe {
public:
uiBasicPipe();
virtual ~uiBasicPipe ();
int EstablishLink (uiBasicAttribute *a,
uiBasicAttribute *b);
void BreakLink();
int PropagateAtoB();
int PropagateBtoA();
virtual int SubjectChanged(uiBasicAttribute *observer); virtual int UpdateSubject (uiBasicAttribute *observer); virtual int TranslateAtoB () = 0;
virtual int TranslateBtoA() = 0;
void SetPriority (int p);
int GetPriority ();
uBoolean changeLockA;
uBoolean changeLockB;
uiBasicAttribute *endA;
uiBasicAttribute *endB;
private:
int _priority;
};
/* :VAR uiBasicAttribute: : changeLockA
*
* :DESC The lock status of end A of the Pipe. This data member is uFalse for * unlocked, and uTrue for locked.
* / /*
* :VAR uiBasicAttribute: :changeLockB
*
* :DESC The lock status of end B of the Pipe. This data member is uFalse for * unlocked, and uTrue for locked.
*/
/* :VAR uiBasicAttribute: :endA
*
* :DESC A pointer to the Attribute object attached to logical end A of the * Pipe.
*/
/* :VAR uiBasicAttribute: :endB
*
* :DESC A pointer to the Attribute object attached to logical end B of the * Pipe.
*/
/* :VAR uiBasicAttribute: :_priority
*
* :DESC Indicates the _priority of the Pipe when used in the context of the * Pipes on an Attribute's observer list. This value is used for
* notification to determine order.
*
* This is private to assure that when the _priority changes the
* SetPriority() member function is called. This function causes the
* Attributes at the ends of the pipes to resort their observers.
*/
/* :FUNC uiBasicPipe::uiBasicPipe(void)
*
* :DESC Constructor for BasicPipe class. Data members are initialized:
* changLockA and ChangeLockB are set to uFalse, endA and endB are set to * NULL. Initially no objects are connected to the Pipe ends.
*/
inline
uiBasicPipe::uiBasicPipe()
{
_priority = 0;
changeLockA = ChangeLockB = uFalse;
endA = endB = (uiBasicAttribute*) 0L;
}
/* :FUNC uiBasicPipe::~uiBasicPipe(void)
*
* :DESC The destructor breaks the link between the Pipe and any Attributes * it is connected to.
*/
inline
uiBasicPipe: :~uiBasicPipe()
{
BreakLink ();
}
/* :FUNC uiBasicPipe::EstablishLink (uiBasicAttribute *a, uiBasicAttribute * *b)
*
* :DESC This member function establishes a Pipe connection between the two * Attributes identified by 'a' and 'b'. The public data members {'endA' and * 'endB') which identify the Pipe ends are set to 'a' and 'b'. Finally * this Pipe object is registered as an observer with each of the two
* connecting Attribute objects by calling the
* uiBasicAttribute::RegisterObserver() member function.
*
* :INPUT a Attribute object pointer to set to the logical end A.
*
* :INPUT b Attribute object pointer to set to the logical end B. *
* :OUTPUT 0 for success and -1 for failure. The return value is -1 if * either of the results of the uiBasicAttribute: :RegisterObserver () member * function calls is -1.
*/
/* :FUNC uiBasicPipe: :BreakLink (void)
*
* :DESC This member function is the inverse of EstablishLink (). It
* disconnects a Pipe between two Attributes. The data members 'endA' and * 'endB' are set to NULL. The Pipe is unregistered with the connecting * Attributes, by calling uiBasicAttribute: :UnregisterObserver (), causing * the Pipe to be removed from the Attribute's observer lists.
*/
/* :FUNC uiBasicPipe: :PropagateAtoB (void)
*
* :DESC This member function causes the data member stored in the Attribute * at logical end A to be propagated to the Attribute at logical end B. In * the process the data value is translated from Attribute A type to * Attribute B type using the TranslateAtoB () member function for the * specific Pipe subclass . Data propagation takes place only if the Pipes * 'ChangeLockB' for end A is uFalse. If 'ChangeLockB' is uTrue no data * propagation takes place and a success value of 0 is returned.
*
* :OUTPUT 0 for success and -1 for failure. If the 'ChangeLockB' is uFalse * then the return value of the TranslateAtoB () is returned. The success of * the TranslateAtoB () member function is dependent on the subclass
* implementation of that member function.
*/
inline int
uiBasicPipe: :PropagateAtoB()
{
return (ChangeLockB) ? 0 : TranslateAtoB ();
}
/* :FUNC uiBasicPipe: :PropagateBtoA(void)
* :DESC This member function causes the data member stored in the Attribute * at logical end B to be propagated to the Attribute at logical end A. In * the process the data value is translated from Attribute B type to * Attribute A type using the TranslateBtoA() member function for the * specific Pipe subclass. Data propagation takes place only if the Pipes * 'changeLockA' for end A is uFalse. If 'changeLockA' is uTrue no data * propagation takes place and a success value of 0 is returned.
*
* :OUTPUT 0 for success and -1 for failure. If the 'changeLockA' is uFalse * then the return value of the TranslateBtoA() is returned. The success of * the TranslateBtoA() member function is dependent on the subclass
* implementation of that member function.
*/
inline int
uiBasicPipe: :PropagateBtoA ()
{
return (changeLockA) ? 0 : TranslateBtoA();
)
/* :FUNC uiBasicPipe: :SubjectChanged (uiBasicAttribute *observer)
*
* :DESC When the value of an Attribute on one end of a pipe changes it * calls SubjectChanged () with itself as the argument to the function. This * function then propagates the value to the Attribute at the other end of * the pipe. The return value of this function determines if the rest of * the pipes in an Attribute's observers list should be tickled during the * uiBasicAttribute: :Tickle() member function execution. To abort the * uiBasicAttribute: :Tickled member function execution the PropagateAtoB () * or PropagateBtoA ( ) should return a vaiue other than 0. * :INPUT observer Attribute object identifier which invoked the method. It * is used to determine which direction the change should be propagated. * Propogation goes from the 'observer' to the Attribute at the other end of * the Pipe.
*
* :OUTPUT 0 or greater for success, -1 for failure. Failure can occur if * either 'endA' equals 'observer' and PropagateAtoB() returns -1 or if * 'endB' equals 'observer' and PropagateBtoA() return a -1 or if the * 'observer' is not the same as either 'endA' or 'endB'. When passed back * to the Attribute that called this function from within the
* uiBasicAttribute: :Tickle () member function, a value of 0 mean continue, a * return value greater then 0 means stop, and a return value less than 0 * indicates an error.
*/
inline int
uiBasicPipe: :SubjectChanged(uiBasicAttribute *observer)
{
return ((observer = = endA) ? PropagateAtoB () :
((observer == endB) ? PropagateBtoA () : -1));
}
/* :FUNC uiBasicPipe: :UpdateSubject(uiBasicAttribute *observer)
*
* :DESC When an Attribute at one end of a pipe needs to be updated it will * call UpdateSubject() for each pipe with itself as the argument to the * function. The return value of this function determines if the rest of the * pipes in an Attribute's observers list should be siphoned during the * uiBasicAttribute::Siphon () member function execution. To abort the * uiBasicAttribute: :Siphon () member function execution the PropagateAtoB () * or PropagateBtoA () should return a value other than 0.
*
* :INPUT observer Attribute object identifier which invoked the method. It * is used to determine which direction the change should be propagated. * Propogation goes to the 'observer' from the Attribute at the other end of * the Pipe.
*
* :OUTPUT 0 or greater for success, -1 for failure. Failure can occur if * either 'endB' equals 'observer' and PropagateAtoB () returns -1 or if * 'endA' equals 'observer' and PropagateBtoA() return a -1 or if the * 'observer' is not the same as either 'endA' or 'endB'. When passed back * to the Attribute that called this function from within the
* uiBasicAttribute: :Siphon() member function, a value of 0 mean continue, a * return value greater then 0 means stop, and a return value less than 0 * indicates an error.
*/
inline int
uiBasicPipe: :UpdateSubject (uiBasicAttribute *observer)
{
return ((observer == endB) ? PropagateAtoB () :
((observer == endA) ? PropagateBtoA() : -1));
}
/* :FUNC uiBasicPipe::TranslateAtoB (void) and
* uiBasicPipe: :TranslateBtoA(void)
*
* :DESC These function are pure virtual functions and must be added by the * classes derived from the uiBasicPipe class. They should read the value * from one end of the pipe and perform what ever conversion are needed * before setting the value of the Attribute at the other end of the pipe. *
* :OUTPUT These functions should return -1 if a error occurs, 0 for a * normal completion, and a value greater than 0 to halt further updates or * translations when called from the uiBasicAttribute: :Tickle () or
* uiBasicAttribute::Siphon () member functions.
*/
/* :FUNC uiBasicYPipe: :SetPriority (int p)
* * :DESC This member function sets the Pipe's internal _priority value. In
* addition, this function also instructs each Attribute attached to the
* Pipe to resort its observer list. This is necessary since Attributes keep * track of the Pipes (i.e. observers) they are attached to in _priority
* sorted order.
*
* : INPUT p The new _priority for the pipe.
*/
/* :FUNC uiBasicPipe: :GetPriority(void)
* :DESC This member function returns the Pipe's private data member
* '_priority'.
*
* :OUTPUT Returns the pipe _priority.
*/
inline int
uiBasicPipe: :GetPriority ()
{
return priority;
}
/* The ComparePipePriority is used for sorting pipes in an Attributes
* observer list.
*/
uBoolean ComparePipePriority (uiBasicPipe *pl, uiBasicPipe *p2);
/* :CLASS uiBasicPipeList
*
* :DESC This class defines behavior for a list of uiBasicPipe objects. This * class is defined using the uDECLARE_OBJECT_POINTER_LIST class definition * macro defined in uCons.h.
*/
/* :CLASS uiBasicPipeCons
*
* :DESC This class defines behavior for a Cons cell for a uiBasicPipe
* objects. This class is defined using the uDECLARE_OBJECT_POINTER_LIST
* class definition macro defined in uCons.h.
*/
uDECLARE_OBJECT_POINTER_LIST ( uiBasicPipeList, uiBasicPipeCons, uiBasicPipe ); #endif /* _uiBasicPipe_h_ */
uiBasicPipe.C
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*/
#ifndef SABER
static char sccsInfo [ ] = "SCCS Info: @(#) uiBasicPipe.C integration_cfgCore: :0: 0 plastic"; #endif /* !SABER */
/* uiBasicPipe.C */
#include <util/List/uConsImp.h>
#include " ui/abstract/uiBasicPipe.h"
#include "ui/abstract/uiBasicAttribute.h"
uDEFINE_OBJECT_POINTER_LIST ( uiBasicPipeList, uiBasicPipeCons, uiBasicPipe ) ;
/*
* :N uiBasicPipe: :EstablishLink
*
* :A A link is established by setting the values of <endA> and <endB> and by
* registering the pipe with the Attributes at each end of the pipe.
*/
int
uiBasicPipe: :EstablishLink (uiBasicAttribute *a,
uiBasicAttribute *b)
{
int result = 0;
endA = a;
endB = b;
if ({uiBasicAttribute*) 0L != endA) {
result I= endA->RegisterObserver(this);
}
if ( (uiBasicAttribute*) 0L != endB) {
result l= endB->RegisterObserver(this);
}
return result;
}
/*
* :N uiBasicPipe: :BreakLink
*
* :A BreakLink() is the inverse of the EstablishLink () function, A link is
* broken by unregistering the pipe with the Attributes at each end of the
* pipe and setting the values of <endA> and <endB> to NULL.
*/
void
uiBasicPipe: :BreakLink ()
{
if ( (uiBasicAttribute*) 0L != endA) {
endA->UnregisterObserver(this);
}
if ( (uiBasicAttribute*) 0L != endB) {
endB->UnregisterObserver(this);
}
endA = (uiBasicAttribute*) 0L;
endB = (uiBasicAttribute*) 0L;
} /*
* :N uiBasicPipe: :SetPriority
*
* :A Since the pipes are stored in sorted lists on each Attribute, when the * _priority of the pipe changes the list must be resorted.
*/
void
uiBasicPipe: :SetPriority (int p)
{
_priority = p;
if ((uiBasicAttribute*) 0L \= endA) {
endA->SortObservers ();
}
if ((uiBasicAttribute*) 0L != endB) {
endB->SortObservers ();
}
}
uBoolean
ComparePipePriority (uiBasicPipe *pl, uiBasicPipe *p2)
{
return ( (p1->GetPriority () < p2->GetPriority () ) ? uTrue : uFalse); }
uilntAttribute.h
/*
* Copyright (c) 1991 Teknekron Communications Systems
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*/
/* SCCS Info: @(#) uiIntAttribute.h integration_cfgCore:chkincs.242:1:1 01/09/92 */ #ifndef _uiIntAttribute_h_
#define _uiIntAttribute_h_
#include "ui/abstract/uiBasicAttribute.h"
/* :CLASS uiIntAttribute
*
* :DESC This subclass of uiBasicAttribute provides functionality for the
* use of int Attributes. These Attributes can have any integer value. There * is no limit to the number of instances that may exist for this class.
* Objects of this class can be contained by Data Sources.
*/
class uilntAttribute : public uiBasicAttribute {
public:
uilntAttribute(uiBasicDS *parentDS, int v = 0);
virtual ~uilntAttribute ();
virtual int GetValue();
virtual void InitValue (int v);
virtual void SetValue(int v, uiBasicPipe *pipe = (uiBasicPipe*) 0L); protected:
int value;
} ;
/* :FDNC uilntAttribute::IntAttribute (uiBasicDS *parentDS, int v = 0)
*
* :DESC The constructor calls the uiBasicAttribute: :uiBasicAttribute ()
* constructor and then calls the InitValue () member function with 'v' as its * argument.
*
* :INPUT parentDS Typically a pointer uiBasicDS which contains the
* attribute although any valid uiBasicDS is acceptable.
*
* :INPUT v.Value to assign to the 'value' data member.
*/
inline
uilntAttribute::uilntAttribute (uiBasicDS *parentDS, int v) :
uiBasicAttribute (parentDS)
{
value = v;
}
/* :FUNC uilntAttribute: :GetValue(void)
*
* :DESC. Returns the value of the 'value' data member.
*
* :OUTPUT The value of the 'value' data member.
*/
inline int
uilntAttribute::GetValue()
{
return value; }
/* :FUNC uilntAttribute: : InitValue (int v)
*
* :DESC Initializes the data member 'value' to 'v' regardless of the lock * state. This does not cause a value propogation through any attached * Pipes.
*
* :INPUT v Int value to assign this attribute.
*/
inline void
uilntAttribute::InitValue (int v)
{
value = v;
}
/* :FUNC uilntAttribute: :SetValue (int v, uiBasicPipe *pipe)
*
* :DESC This member function sets the 'value' data member of this attribute * if the 'changeLock' is uFalse. Any attached pipes on the observers list * is notified of the change by calling uiBasicAttribute: :ValueAltered () * member function.
*
* : INPUT v uBoolean value to assign to the 'value' data member.
*
* :INPUT pipe The pipe that is calling this member function to set the new * value or else NULL if not called from a pipe.
*/
inline void
uilntAttribute: :SetValue (int v,
uiBasicPipe *pipe)
{
if (! changeLock) {
value = v;
ValueAltered(pipe);
}
}
#endif /* uilntAttribute_h_ */
uiIntAttribute.C
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*
*/
#ifndef SABER
static char sccslnfo[ ] = "SCCS Info: @(#) uilntAttribute.C integration_cfgCore: : 0:0 plastic";
#endif /* !SABER */
#include "ui/attr/uilntAttribute.h" uilntAttribute : : ~uilntAttribute ( )
{
}
uiBooleanStrPipe.h
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*/
/* SCCS Info: @(#) uiBooleanStrPipe.h integration_cfgCore: :0:0 plastic */ #ifndef _uiBooleanStrPipe_h_
#define _uiBooleanStrPipe_h_
#include "ui/abstract/uiBasicPipe.h"
#include "ui/attr/uiBooleanAttribute.h"
#include "ui/attr/uiStringAttribute.h"
/* :CLASS uiBooleanStrPipe
*
* :DESC This subclass of uiBasicPipe provides functionality for linking a * BooleanAttribute and a StringAttribute. Conversion from one Attribute * value to the other is provided with a direct mapping of each uBoolean * value with a single string value as described in the translation member * functions. There is no limit to the number of instances that may exist * for this class. Objects of this class can be contained by Data Sources. */
class uiBooleanStrPipe : public uiBasicPipe {
public:
uiBooleanStrPipe ();
virtual ~uiBooleanStrPipe ();
int EstablishLinktuiBooleanAttribute *a, uiStringAttribute *b); int TranslateAtoB ();
int TranslateBtoA();
char *uTrueString;
char *falseString;
};
/* :VAR uiBooleanStrPipe: :uTrueString
*
* :DESC String which represents the uBoolean value for uTrue.
*/
/* :VAR uiBooleanStrPipe: : falseString
*
* :DESC String which represents the uBoolean value for uFalse.
*/
/* :FUNC uiBooleanStrPipe: :UiBooleanStrPipe (void)
*
* :DESC This constructor initializes the 'uTrueString' and 'falseString' to * NULL.
*/
inline
uiBooleanStrPipe: :uiBooleanStrPipe ( )
{
uTrueString = (char *) 0L;
falseString = (char *) 0L;
}
/* :FUNC uiBooleanStrPipe: :-uiBooleanStrPipe (void)
*
* :DESC This is a virtual destructor for uiBooleanStrPipe class. */
/* :FUNC uiBooleanStrPipe: :EstablishLink(uiBooleanAttribute *a,
* uiStringAttribute *b)
*
* :DESC This member function calls the uiBasicPipe: :EstablishLink () member
* function with the input arguments 'a' and 'b' cast to uiBasicAttribute
* pointers. The purpose of this member functions is only to provide a type * safe interface to the uiBasicPipe: :EstablishLink() member function.
* :INPUT a Pointer to the Attribute to become the end A of the Pipe.
* :INPUT b Pointer to the Attribute to become the end B of the Pipe.
* :OUTPUT Returns the result of uiBasicPipe: :EstablishLink () member
* function which is 0 for success and -1 for failure.
*/
inline int
uiBooleanStrPipe: :EstablishLink(uiBooleanAttribute *a,
uiStringAttribute *b)
{
return (uiBasicPipe: :EstablishLink (a, b));
}
/* :FUNC uiBooleanStrPipe: :TranslateAtoB (void)
*
* :DESC This member function calls the uiStringAttribute: :SetValue() member * function for the Attribute at end B of the Pipe with either the value of
* 'uTrueString' or 'falseString' depending on the result of a a call to the * uiBooleanAttribute: :GetValued member function for the Attribute at end A * of the Pipe. If the result of the uiBooleanAttribute: :GetValue() member * function call is uTrue then the 'uTrueString' is provided as input to the * uiStringAttribute: :SetValue() member function. If the result is uFalse
* then the 'falseString' is provided as the input.
*
* :OUTPUT Always returns 0.
*/
/* :FUNC uiBooleanStrPipe: :TranslateBtoA (void)
*
* :DESC This member function calls the uiBooleanAttribute::SetValue()
* member function for the Attribute at end A of the Pipe with either uTrue
* or uFalse depending on the result of a a call to the
* uiStringAttribute::GetValue() member function for the Attribute at end A
* of the Pipe. If the result of the uiStringAttribute: :GetValue() member * function call matchs 'uTrueString' using strcmp() then uTrue is provided as * input to the uiBooleanAttribute::SetValue() member function. If the * result matchs 'falseString' then uFalse is provided as the input. If the * result does not match either one then no change is made on the
* uiBooleanAttribute at end A. If the result is NULL then uFalse is used as * the input argument.
*
* :OUTPUT Always returns 0.
*/
#endif /* _uiBooleanStrPipe_h_ */ uiBooleanStrPipe.C
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*/
#ifndef SABER
static char sccslnfo[ ] = "SCCS Info: @( #) uiBooleanStrPipe.C integration_cfgCore: :0:0 plastic";
#endif /* ! SABER */
#include <stream.h>
#include <string.h>
#include "ui/pipes/uiBooleanStrPipe.h" uiBooleanStrPipe: :-uiBooleanStrPipe ()
{
}
int
uiBooleanStrPipe: :TranslateAtoB ( )
{
uBoolean uTruefalse;
char *str;
uTruefalse = ((uiBooleanAttribute *) endA) ->GetValue ();
str = (uTruefalse == uTrue) ? uTrueString : falseString;
((uiStringAttribute *) endB) ->SetValue(str, this);
return (0);
}
int
uiBooleanStrPipe: :TranslateBtoA ()
{
char *str;
str = ((uiStringAttribute *) endB) ->GetValue ();
if ((char*) 0L == str I I 0 == strcmρ(str, falseString)) {
((uiBooleanAttribute *) endA) ->SetValue (uFalse, this);
} else if (0 == strcmptstr, uTrueString)) {
((uiBooleanAttribute *) endA) ->SetValue (uTrue, this);
}
return (0);
} uiBasicForm.h
/*
* Cooyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*/
/* SCCS Info: @(#) uiBasicForm.h integration_cfgCore:chkincs.49:1:1 09/26/91 */ #ifndef _uiBasicForm_h_
#define _uiBasicForm_h_
#ifndef XTFUNCPROTO
#define XTFUNCPROTO
#endif /* !XTFUNCPROTO */
extern "C" {
#include <X11/Intrinsic.h>
#include <Mrm/MrmPublic.h>
);
#include <util/List/uCons.h>
#include "ui/abstract/uiBasicDS.h"
#include "ui/abstract/uiWECMixin.h"
/* This macro replaces the uiBasicDS macro so that the attribute can be put * on both the attributeList and the wecList.
*/
#undef PushMember // undef the PushMember () macro form BasicDS
#define PushMember (attr) { \
wecList.Push ( (uiWECMixin*) & (attr) ); \
attributeList.Push { (uiBasicAttribute*) & (attr) ); \ }
/* It may seem really ugly to have to create a type just so to be able to * declare a function with that type of return value, but C++ seems to have * problems with some of the more complex casts that would make this
* unnecessary.
*/
typedef Widget (*WidgetFunction) (Widget) ;
class uiBasicFormList;
/* :CLASS uiBasicForm
*
* :DESC The BasicForm class is inherited by all Forms. It sets up the basic * functionality of the Forms. This includes support for creating a Widget * hierarchy from either a .uid file or a Widget defining function. The * BasicForm will create a shell for the Widgets that are loaded from a .uid * file and will map the window. It also includes place holders to virtual * functions that should provide access to static variable for Widget names * and .uid file name. The last argument 'transientshell' is a widget id * which can be passed from the derived class's shell create function; for * example, a DialogForm passes a DialogShell to this argument, so the
* DialogShell can be used instead of the TopLevelShell. When the
* 'transientshell' argument is not used, the shell' data member is created * as a Xt topLevelShellWidget by default.
*/
class uiBasicForm : public uiBasicDS {
public:
uiBasicForm ();
uiBasicForm(const char *name, WidgetFunction widgetCreateFunc,
Widget transientshell = (Widget) 0L);
uiBasicForm (const char *name,
const char **widgetNames, int numWidgets, const char **uidFileNames, int numUidFiles,
Widget transientshell = (Widget) 0L);
uiBasicForm (const char *name,
const char *widgetName, const char **uidFileNames, int numUidFiles,
Widget transientshell = (Widget) 0L);
uiBasicForm (const char *name,
const char *widgetName, const char *uidFileName, Widget transientshell = (Widget) 0L);
virtual -uiBasicForm ();
int LoadWidget ();
int LoadWidget (const char **widgetNames,
int numWidgets, const char **uidFileNames, int numUidFiles);
int LoadWidget (WidgetFunction widgetCreateFunc); void CloseHierarchy ( );
void Map();
void Unmap ();
void SensitiveWECs ();
void InsensitiveWECs ();
char *GetTitle();
void SetTitle(char *title);
virtual const char **GetWidgetNames ();
virtual int GetNumWidgets ();
virtual const char **GetUidFileNames ();
virtual int GetNumUidFiles ();
virtual WidgetFunction GetMakeWidgetFunc ();
Widget shell;
Widget widget;
static MrmHierarchy hierlD;
const char *title;
static uiBasicFormList *instances;
uiWECMixinList wecList;
private:
int _CreateShell ( );
uBoolean _titleOwner;
uBoolean _shellOwner;
};
/* :FUNC uiBasicForm: :uiBasicForm (void)
*
* :DESC All forms of the uiBasicForm constructor push the new Form onto the
* static data member 'instances' and register a dummy callback with the * Motif library so that .uid files with "WEC" create callbacks can be * loaded. This form of the constructor creates a Form without loading any
* Widgets. Generally this would only be used if a derived class were going
* to replace the Form initialization functionality with its own.
*/ /* :FUNC uiBasicForm: :uiBasicForm(const char *name, WidgetFunction
* widgetCreateFunc, Widget transientshell)
*
* :DESC This form of the constructor sets the title of the Form to be the * 'name' input argument and calls the LoadWidget () member function with the * 'widgetCreateFunc' argument.
*
* :I name This argument is passed on to the uiBasicDS constructor and used * to set the 'title' of the Form. It can be any valid pointer.
*
* :I widgetCreateFunc This argument must point to a function that takes a * shell widget as argument, creates a Widget hierarchy and then returns a * pointer to that hierarchy. The Widget hierarchy created must contain all * the Widgets that the WECs contained in the Form will look for.
*
* :I transientshell This argument is a Widget id to an application shell. * uiBasicForm creates one for you if none is specified.
*/
/* :FUNC uiBasicForm: :uiBasicForm(const char *name, const char
* **widgetNames, int numWidgets, const char **uidFileNames, int
* numUidFiles, Widget transientshell)
*
* :DESC The third form of the uiBasicForm constructor sets the title of the * Form to be the 'name' input argument and calls the LoadWidget () member * function with the 'widgetNames', 'numWidgets', 'uidFileNames' and * 'numUidFiles'.
*
* :I name This argument is passed on to the uiBasicDS constructor and used * to set the 'title' of the Form. It can be any valid pointer.
*
* :I widgetNames This argument is an array of Widgets names to be fetched. * The Widgets names in the array are loaded from the first to the last. The * first Widget's parent is the shell and the subsequent Widgets' parent is * the Widget loaded just before them. All names must be valid Widget names * in one of the 'uidFileNames' files.
*
* :I numWidgets This argument specifies the size of the 'widgetNames' array * or the number of widgets to be fetched. It must be less than or equal to * the number a valid Widget names in the 'widgetNames' array.
*
* :I uidFileNames These are the names of the .uid files that contain the * Widget hierachy for the Form. They must all be valid .uid files.
*
* :I numUidFiles This argument specifies the size of the 'uidFileNames' * array or the number of .uid files to be loaded. It must be less than or * equal to the number a valid .uid file names in the 'uidFileNames' array. *
* :I transientshell This argument is a Widget id to an application shell. * uiBasicForm creates one for you if none is specified.
*/
/* :FUNC uiBasicForm: :uiBasicForm(const char *name, const char *widgetName, * const char **uidFileNames, int numUidFiles, Widget transientshell) *
* :DESC This form of the uiBasicForm constructor sets the 'title' of the * Form to be the 'name' input argument and calls the LoadWidget () member * function with the 'widgetName', 'uidFileNames' and 'numUidFiles' input * arguments.
*
* :I name This argument is passed on to the uiBasicDS constructor and used * to set the 'title' of the Form. It can be any valid pointer.
*
* :I widgetName This argument is the name of the top level widget in the * .uid file Widget hierarchy. It must be a valid Widget name in the .uid * file.
* * :I uidFileNames These are the names of the .uid files that contain the * Widget hierachy for the Form. They must all be valid .uid files.
*
* :I numUidFiles This argument specifies the size of the 'uidFileNames' * array or the number of .uid files to be loaded. It must be less than or * equal to the number a valid .uid file names in the 'uidFileNames' array. *
* :I transientshell This argument is a Widget id to an application shell. * uiBasicForm creates one for you if none is specified.
*/
/* :FUNC uiBasicForm: : uiBasicForm(const char *name, const char *widgetName, * const char *uidFileName, Widget transientshell);
*
* :DESC This form of the constructor is a convenience function and behaves * the same as the previous form except that only a single .uid file is * specified.
*
* :I name This argument is passed on to the uiBasicDS constructor and used * to set the 'title' of the Form. It can be any valid pointer.
*
* : I widgetName This argument is the name of the top level widget in the * .uid file Widget hierarchy. It must be a valid Widget name in the .uid * file.
*
* :I uidFileNames This is the name of the .uid files that contain the * Widget hierachy for the Form. It must all be valid .uid files.
*
* :I transientshell This argument is a Widget id to an application shell. * uiBasicForm creates one for you if none is specified.
*/
/* :FUNC uiBasicForm: :~uiBasicForm (void)
*
* :DESC The destructor unmaps and destroys the Form's 'widget' and 'shell'. * It also removes the Form from the 'instances' list before destroying the * 'shell', it removes the destroy callback for the shell to avoid a loop * condition that would call the callback when the Form had already been * deleted.
*/
/* :FUNC uiBasicForm: :GetTitle()
* :DESC The function returns the title currently displayed on the form. *
* :R . The function returns the title string displayed on the form. If * there is no shell associated with the form, a NULL pointer is returned. */
/* :FUNC uiBasicForm: :SetTitle (char *aTitle)
*
* :DESC The function sets the title of the current form.
*
* :I aTitle A character pointer points to a string to be the title of the * form. If there is no shell associated with the form, the error handler * prints an error message to notify users that an error has occurred. The * 'title' data member is set to 'aTitle'.
*/
/* :FUNC uiBasicForm: :LoadWidget (void)
*
* :DESC The LoadWidget () functions attempt to load in a Widget hierarchy * and set the <widget> data member.
*
* The first form of the LoadWidget () function takes no arguments, but * attempts to call the other two forms of LoadWidget ( ) with values supplied * by the GetWidgetName ( ), GetUidFileName ( ), and GetMakeWidgetFunc () func* tions. The LoadWidget ( ) that takes a .uid file name as an argument is * attempted first. Note that since these functions are virtual functions * this form can not be used from the constructor unless it is called from * the constructor of the class of the instance and not one of the inherited * classes.
*
* :OUTPUT Returns 0 if successful and -1 if not. The function can fail if * the GetWidgetNames (), GetNumWidgets (), GetUidFileNames (),
* GetNumUidFiles (), or GetMakeWidgetFunc() functions fail to provide valid * correct return values. Failures are accompanied by an error message * displayed using the standard uCoreError.
*/
/* :FUNC uiBasicForm: :LoadWidget (const char **widgetNames, int numWidgets, * const char **uidFileNames, int numUidFiles)
*
* :DESC This form of the LoadWidget () function opens the .uid file
* specified by the 'uidFileName' argument and fetches the Widgets defined * in the file. It then creates a shell for the Widget hierarchy, registers * a destroy callback for the shell, and maps the shell.
*
* :I widgetNames This argument is an array of Widgets names to be fetched. * The Widgets names in the array are loaded from the first to the last. The * first Widget's parent is the shell and the subsequent Widgets' parent is * the Widget loaded just before them. All names must be valid Widget names * in one of the 'uidFileNames' files.
*
* :I numWidgets This argument specifies the size of the 'widgetNames' array * or the number of widgets to be fetched. It must be less than or equal to * the number a valid Widget names in the 'widgetNames' array.
*
* :I uidFileNames These are the names of the .uid files that contain the * Widget hierachy for the Form. They must all be valid .uid files.
*
* :I numUidFiles This argument specifies the size of the 'uidFileNames' * array or the number of .uid files to be loaded. It must be less than or * equal to the number a valid .uid file names in the 'uidFileNames' array. *
* :OUTPUT Returns 0 if successful and -1 if not. The function can fail if * any of the input arguments are invalid or if an error occurs in the Motif * library. Failures are accompanied by an error message displayed using the * standard uCoreError.
*/
/* :FUNC uiBasicForm: :LoadWidget (WidgetFunction widgetCreateFunc)
*
* :DESC This form of the LoadWidget () function creates a shell and then * calls the 'widgetCreateFunc' to create a Widget hierarchy. It then * registers a destroy callback with the shell and maps the shell.
*
* :I widgetCreateFunc This argument must point to a function that takes a * shell widget as argument, creates a Widget hierarchy and then returns a * pointer to that hierarchy. The Widget hierarchy created must contain all * the Widgets that the WECs contained in the Form will look for.
*
* :OUTPUT Returns 0 if successful and -1 if not. The function can fail if * any of the input arguments is invalid or if an error occurs in the Motif * library. Failures are accompanied by an error message displayed using the * standard uCoreError.
*/
/* :FUNC uiBasicForm: :CloseHierarchy (void)
*
* :DESC This function should be called in the constructor for each
* specialized Form after all the constructors for MenuWECs have fired. It * closes the UID file used by the Form. Failure to call this function will * result in one file descriptor being in use. This function does not have * to be called if the Widgets in the Form were created using a function and * not a UID file. */
/* :FUNC uiBasicForm: :Map (void)
*
* :DESC This function maps the Form's 'shell' and 'widget' on the display. * This has the effect of making the window visible.
*/
inline void
uiBasicForm: :Map ()
{
if ((Widget) 0L !- shell) {
XtMapWidget (shell);
}
}
/* :FUNC uiBasicForm: :Unmap(void)
*
* :DESC This function unmaps the Form's 'shell' and 'widget' on the * display. This has the effect of making the window invisible.
*/
inline void
uiBasicForm: :Unmap()
(
if ((Widget) 0L !-= shell) {
XtUnmapWidget (shell);
}
}
/* :FUNC uiBasicForm: :SensitiveWECs (void)
*
* :DESC This function calls the member function uiWECMixin: :Sensitive () on * each WEC contained by the Form.
*/
/* :FUNC uiBasicForm: :InsensitiveWECs (void)
*
* :DESC This function calls the member function uiWECMixin :: Insensitive () * on each WEC contained by the Form.
*/
/* :FUNC uiBasicForm: :GetWidgetNames (void)
*
* :DESC This function should return the names of the 'widgets' for the * derived Form classes. The function should be redefined for derived * classes.
*
* :OUTPUT The default in this class returns a NULL.
*/
inline const char**
uiBasicForm: :GetWidgetNames ()
{
return (const char**) 0L;
}
/* :FUNC uiBasicForm: :GetNumWidgets (void)
*
* :DESC This function works with the GetWidgetNames function. It should * return the size of the array returned by the GetWidgetNames () function. * The function should be redefined for derived classes.
*
* :OUTPUT It returns the size of array returned by the function
* GetWidgetNames (), which, for the default case is 0.
*/
inline int
uiBasicForm: :GetNumWidgets ()
{
return (0);
} /* :FUNC uiBasicForm: :GetUidFileNames (void)
*
* :DESC This function should return the .uid file names for the files that * define the derived Form classes Widget hierarchy. The function should be * redefined for derived classes.
*
* :OUTPUT The default in this class returns a NULL.
*/
inline const char**
uiBasicForm::GetUidFileNames ()
{
return (const char**) 0L;
}
/* :FUNC uiBasicForm: :GetNumUidFiles (void)
*
* :DESC This function works with the GetUidFileNames function. It should * return the size of the array returned by the GetUidFileNames () function. * The function should be redefined for derived classes.
*
* :OUTPUT It returns the size of 'array returned by the function
* GetUidFileNames () which for the default case is 0.
*/
inline int
uiBasicForm: iGetNumUidFiles ()
{
return (0);
}
/* :FDNC uiBasicForm::GetMakeWidgetFunc(void)
*
* :DESC This function should return the pointer to the function that * defines the derived Form classes Widget hierarchy. The function should be * redefined for derived classes.
*
* :ODTPUT The default in this class returns a NULL.
*/
inline WidgetFunction
uiBasicForm: :GetMakeWidgetFunc()
{
WidgetFunction func = 0L;
return func;
}
/* :VAR uiBasicForm: :shell
*
* :DESC Pointer to the shell widget that is generally referred to as the * window for the Form.
*/
/* :VAR uiBasicForm: :widget
*
* :DESC Pointer to the top level Widget in the shell. It is created from a * Motif .uid file or from a Widget creation function.
*/
/* :VAR uiBasicForm: :title
*
* :DESC Pointer to the title string that appears on the Form's window. */
/* :GLOBAA uiBasicForm::instances
*
* :DESC BasicFormList pointer to the list of all Form Instances in the * system.
*/ /* : CLASS uiBasicFormList
*
* :DESC This class defines behavior for a list of uiBasicForm objects. This * class is defined using the uDECLARE_OBJECT_POINTER_LIST class definition * macro defined in uCons.h.
*/
/* :CLASS uiBasicFormCons
*
* :DESC This class defines behavior for a Cons cell for a uiBasicForm * object. This class is defined using the uDECLARE_OBJECT_POINTER_LIST * class definition macro defined in uCons.h.
*/
uDECLARE_OBJECT_POINTER_LIST (uiBasicFormList, uiBasicFormCons, uiBasicForm) #endif /* uiBasicForm_h_ */
uiBasicForm.C
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*
*/
#ifndef SABER
static char sccsInfo[ ] = "SCCS Info: @(#) uiBasicForm.C integration_cfgCore:chkincs.49:1:1 09/26/91";
#endif /* !SABER */
/* uiBasicForm.C */
#include <string.h>
#include <malloc.h>
#define XTFUNCPROTO
extern "C" {
#include <Xm/Xm.h>
#include <X11/X.h>
#include <X11/Intrinsic.h>
#include <X11/Shell.h>
#include <X11/StringDefs.h>
#include <Mrm/MrmPublic.h>
#include <Mrm/MrmDecls.h>
} ;
/*
* Keep the uiUI.h file first since it undefs the skel uDolist () and uCORE_ERROR( () )
* macros.
*/
#include <util/List/uConsImp.h>
#include "ui/support/uiUI.h"
#include "ui/support/uiSupport.h"
#include "ui/abstract/uiBasicAttribute.h"
#include "ui/abstract/uiWECMixin.h"
#include "ui/abstract/uiBasicForm.h"
uDEFINE_OBJECT_POINTER_LIST (uiBasicFormList, uiBasicFormCons, uiBasicForm)
static void DestroyForm(Widget, uiBasicForm *form, XmAnyCallbackStruct*);
void WEC(Widget, caddr_t, XmAnyCallbackStruct*) ;
static void RegDummyWECCallback (void);
uiBasicFormList *uiBasicForm: :instances = new uiBasicFormList;
/*
* :N uiBasicForm: :uiBasicForm
*
* :A All of the constructor forms call the uiBasicDS constructor, register a
* dummy "WEC" callback, and push themselves onto the static instances list.
* If a widget is to be created then the LoadWidget () function is called.
*/
uiBasicForm: :uiBasicForm() :
uiBasicDS()
{
RegDummyWECCallback ();
instances->Push (this);
_shellOwner = uFalse;
_titleOwner = uFalse;
title = (char *) 0L; }
uiBasicForm: :uiBasicForm(const char *name,
WidgetFunction widgetCreateFunc,
Widget transientshell) :
uiBasicDS (name)
{
shell = transientshell;
RegDummyWECCallback ();
instances->Push(this);
_shellOwner = uFalse;
_titleOwner = uFalse;
title = (char *) 0L;
(void) LoadWidget (widgetCreateFunc);
GetTitle(); // this sets the title data member
}
uiBasicForm: :uiBasicForm (const char *name,
const char **widgetNames,
int numWidgets,
const char **uidFileNames,
int numUidFiles,
Widget transientshell) :
uiBasicDS (name)
{
char *str;
_shellOwner = uFalse;
shell = transientshell;
RegDummyWECCallback ();
instances->Push(this);
if ((const char*) 0 != *widgetNames & &
(char*) 0 !=
(str = (char*) malloc(sizeof (char) * strlen (*widgetNames) + 6))) {
_titleOwner = uTrue;
sprintffstr, "%sShell", *widgetNames);
title = (const char*) str;
} else {
_titleOwner - uFalse;
title = (const char*) 0L;
}
(void) LoadWidget (widgetNames, numWidgets, uidFileNames, numUidFiles);
}
uiBasicForm: : uiBasicForm(const char •name,
const char "widgetName,
const char **uidFileNames,
int numUidFiles,
Widget transientshell)
uiBasicDS (name)
{
char *str;
_shellOwner = uFalse;
shell = transientshell;
RegDummyWECCallback ();
instances->Push (this);
if ( (const char*) 0 != widgetName & &
(char*) 0 !=
(str = (char*) malloc(sizeof (char) * strlen (widgetName) + 6))) { _titleOwner = uTrue;
sprintflstr, "%sShell", widgetName);
title = (const char*) str;
} else {
titleOwner = uFalse; title = (const char*) 0L;
}
(void) LoadWidget (twidgetName, 1, uidFileNames, numUidFiles);
}
uiBasicForm: :uiBasicForm(const char *name,
const char *widgetName,
const char *uidFileName,
Widget transientshell) :
uiBasicDS (name)
{
char *str;
_shellOwner = uFalse;
shell = transientshell;
RegDummyWECCallback ();
instances->Push(this);
if ((const char*) 0 != widgetName & &
(char*) 0 !=
(str = (char*) malloctsizeof (char) * strlen (widgetName) + 6))) { _titleOwner = uTrue;
sprintf (str, "%sShell", widgetName);
title = (const char*) str;
} else {
_titleOwner = uFalse;
title = (const char*) 0L;
}
(void) LoadWidget UwidgetName, 1, tuidFileName, 1) ;
}
/*
* :N uiBasicForm: :~uiBasicForm
*
* :A The destructor cleans up after the Form. The Form can be killed in one * of two ways; from C++ or from Motif. If the Form is destroyed from C++ * then the destructor fires first and the XmNdestroyCallback is removed * before it is called. If the user initiates the removal of the Form then * the DestroyForm() function will be called first through the
* XmNdestroyCallback. The DestroyForm() function sets the <shell> to NULL * so that this destructor does not try to remove the callback and destroy * the widget again.
*
* The last act that always occurs is that the Form deletes itself from the * <instances> list.
*/
uiBasicForm: :-uiBasicForm ()
{
if ( (MrmHierarchy) 0L != hierlD)
CloseHierarchy();
if ((Widget) 0L != shell) {
XtRemoveCallback (shell, XmNdestroyCallback,
(XtCallbackProc) DestroyForm, (XtPointer) this) ;
if (uTrue == _shellOwner) {
XtDestroyWidget (shell) ;
}
}
if (uTrue == _titleOwner) {
free((void*) title);
}
instances->DeleteFirstMatch (this);
}
int
uiBasicForm: :LoadWidget ()
{
if (LoadWidget (GetWidgetNames () , GetNumWidgets (), GetUidFileNames () , GetNumUidFiles ( ) ) && LoadWidget (GetMakeWidgetFunc ()) ) { uCORE_ERROR( (uecInternalError,
"Failed to make the widget for the %s Form.",
((const char*) 0 == title) ? "NULL" : title)); return -1;
}
return 0;
}
/*
* :N uiBasicForm:: CreateShell
*
* :A This private function simply creates a shell for the Form.
*/
int
uiBasicForm: :_CreateShell()
{
if ((Widget) 0L ! = shell) {
return (0);
}
if ( (Widget) 0L ==
(shell = XtAppCreateShellUchar*) title,
(char*) title,
topLevelShellWidgetClass,
uiUI : :GetDisplay ( ),
(ArgList) 0L, (Cardinal) 0) ) ) { uCORE_ERROR( (uecInternalError, "Can't create a shell widget.")); return -1;
}
_shellOwner = uTrue;
return (0);
}
/*
* :N uiBasicForm: : LoadWidget
*
* :A Creating a Widget hierarchy from .uid files involves creating a shell, * opening .uid files, and then fetching the Widgets defined in the files. * The hierarchy (or files) is closed after the fetch to avoid having many * open files in the system and running out of file descriptors. If these * steps succeed then a destroy callback is registered. Next the <widget> is * managed. This must be done before the <shell> is realized to that the * geometry is calculated correctly.
*/
int
uiBasicForm: : LoadWidget (const char **widgetName,
int numWidgets ,
const char **uidFileNames ,
int numUidFiles )
{
MrmType widgetClass;
Cardinal err; // used only for inspecting returned values Widget parent;
Widget *widgetp;
Widget subwidget;
int i;
if ((const char-*) 0L == uidFileNames || numUidFiles <= 0 | |
(const char**) 0L == widgetName | | numWidgets <= 0) {
return -1;
}
if (_CreateShell() ) {
return -1;
}
err = MrmOpenHierarchy ( (MrmCount) numUidFiles, (String*) UidFileNames,
(MrmOsOpenParamPtr*) 0L, ShierlD);
if (MrmSUCCESS ! = err) { shell = (Widget) 0L;
_shellOwner = uFalse;
widget = (Widget) 0L;
return -1;
}
parent = shell;
widgetp = &widget;
for (i = 0; i < numWidgets,- i++) {
*widgetp = (Widget) 0L;
err = MrmFetchWidget (hierlD, (String) widgetName [i] , parent, widgetp, twidgetClass);
if (MrmSUCCESS != err) {
XtDestroyWidget (shell);
shell = (Widget) 0L;
_shellOwner = uFalse;
widget = (Widget) 0L;
break;
}
XtManageChild(*widgetp);
parent = *widgetp;
widgetp = &subwidget;
}
if ((Widget) 0L == widget) {
uCORE_ERROR( (uecInternalError, "Can't create widget"));
return -1;
} else {
XtAddCallback (shell, XmNdestroyCallback,
(XtCallbackProc) DestroyForm, (XtPointer) this); XtRealizeWidget (shell) ;
uiUI::Elush();
}
return 0;
}
/*
* :N uiBasicForm: :LoadWidget
*
* :A Creating a Widget hierarchy from a function is similar to reading one * from a .uid file except that instead of opening the .uid file the a * function is called.
*/
int
uiBasicForm: rLoadWidget (WidgetFunction widgetCreateFunc)
{
if {0L == widgetCreateFunc) {
uCORE_ERROR{ (uecInternalError,
. "No widget creation function provided."));
return -1;
}
hierlD = (MrmHierarchy) 0L;
if (_CreateShell () ) {
return -1;
}
widget = (*widgetCreateFunc) (shell) ;
//// attach widget to shell
if ((Widget) 0L == widget) {
uCORE_ERROR( (uecInternalError, "Can't create widget"));
return -1;
} else {
XtAddCallback (shell, XmNdestroyCallback,
(XtCallbackProc) DestroyForm, (XtPointer) this); XtManageChild(widget);
XtRealizeWidget (shell);
uiUI::Flush () ;
}
return 0; }
void
uiBasicForm: :SensitiveWECs ()
{
uiWECMixinCons *cp;
uiWECMixin *wec;
uDolist(wec, cp, wecList) {
wec->Sensitive ();
}
}
void
uiBasicForm: :InsensitiveWECs ()
{
uiWECMixinCons *cp;
uiWECMixin *wec;
uDolist (wee, cp, wecList) {
wec->Insensitive ();
}
}
void
uiBasicForm: :CloseHierarchy ( )
{
if ( (MrmHierarchy) 0L != hierlD &&
MrmSDCCESS ! = MrmCloseHierarchy (hierlD) ) {
uCORE_ERROR( (uecInternalError, "Can't close the hierarchy")); }
hierlD = (MrmHierarchy) 0L;
}
char *
uiBasicForm::GetTitle ()
{
if ((Widget) 0L == shell)
return ((char *) 0L);
uiGetWidgetVar (shell, XmNtitle, title);
return (char*) title;
}
void
uiBasicForm: :SetTitle(char *aTitle)
{
if ({Widget) 0L == shell) {
uCORE_ERROR( (uecInternalError, "Can't set title; no shell!")); return;
}
if (uTrue == _titleOwner) {
free ((void*) title);
}
_titleOwner = uFalse;
title = aTitle;
uiSetWidgetVar (shell, XmNtitle, title);
} /*
* :N DestroyForm
*
* :A This function is registered as the XmNdestroyCallback for every Form. * It sets the shell to NULL since the shell has already been destroyed by * the time this function is entered. If it is not set to NULL, the Form * destructor will try to destroy the shell again. This would cause an * error.
*/
static void
DestroyForm(Widget, uiBasicForm *form, XmAnyCallbackStruct*)
{
form->shell = (Widget) 0L;
delete form;
}
/*
* :N WEC
*
* :A This function exists only to allow a "WEC" callback to be specified in * the .uil files. It does nothing.
*/
void
WEC(Widget, caddr_t, XmAnyCallbackStruct*)
{
}
/*
* :N RegDummyWECCallback
*
* :A This function registers the dummy callback with Motif if it has not * already been registered. Unfortunately, Motif is not C++ clean and in * order to register a callback in a MRMRegisterArg structure a function * pointer must be cast to a caddr_t. This cause the C++ compiler to * complain about a function pointer being used as a not function pointer. * This warning can be ignored unless we move to a system where this causes a * problem.
*/
static void
RegDummyWECCallback ()
{
/* SUPPRESS 689 */
static MRMRegisterArg mrmWECRegArg = {"WEC", (caddr_t) WEC } ;
static int inited = 0;
if (inited == 0) {
inited = 1;
MrmRegisterNames (&mrmWECRegArg, 1) ;
}
}
uiWECMixin.h
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*/
/* SCCS Info: @(#) uiWECMixin. h integration_cfgCore : : 0 : 0 plastic */
#ifndef _uiWECMixin_h_
#define _uiWECMixin_h_
#ifndef XTFUNCPROTO
#define XTFUNCPROTO
#endif /* !XTFUNCPROTO */
extern "C" {
#include <X11/Intrinsic.h>
};
#include <util/Types/uTypes.h>
#include <util/List/uCons.h>
class uiBasicForm;
/* :CLASS uiWECMixin
*
* :DESC The uiWECMixin class is inherited by all WECs. It sets up the basic * functionality of the WECs. This includes support for finding Widgets, * mapping widgets, and controlling Widget sensitivity.
*/
class uiWECMixin {
public:
uiWECMixin (uiBasicForm *parentForm,
const char *widgetName);
virtual ~uiWECMixin ();
virtual void Map();
virtual void Unmap();
virtual void Manage();
virtual void Unmanage();
virtual void UpdateDisplay();
virtual uBoolean Issensitive();
virtual void Sensitive();
virtual void Insensitive();
Widget widget;
};
/* :VAR uiWECMixin: :widget
*
* :DESC widget is the Motif widget associated with the WEC.
*/
/* :FUNC uiWECMixin: :uiWECMixin (uiBasicForm *parentForm, const char
* *widgetName)
*
* :DESC The constructor for the WEC attempts to find the Widget in the * parent Form's Widget hierarchy. It sets the 'widget' data member to the * Widget found. Before this constructor is called, the 'parentForm' must * have loaded a Widget hierarchy that contains a Widget with a name that is * the same as 'widgetName'. Failure to do so will create an error which * will be displayed by the uCoreError.
* * :INPUT parentForm A pointer to the Form in which this WEC is contained. * 'parentForm' must be a valid uiBasicForm pointer.
*
* :INPUT widgetName The name of a Widget in the 'parentForm' Widget
* hierarchy. If the name is not found in the Widget hierarchy then an error * is displayed by the UCoreError.
*/
/* :FUNC uiWECMixin: :-uiWECMixin (void)
*
* :DESC The destructor does nothing.
*/
/* :FUNC uiWECMixin::Map (void)
*
* :DESC This function maps the WEC's widget on the display, or in more * elemental terms, it makes it visible if the parent Widget is mapped. It * makes use of the Xlib function call XtMapWindow ().
*/
/* :FUNC uiWECMixin: :Unmap(void)
*
* :DESC This function unmaps the WEC's widget on the display, or in more * elemental terms, it makes it invisible. It makes use of the Xlib function * call XtUnmapWindow().
*/
/* :FUNC uiWECMixin: rManage (void)
*
* :DESC This function manages the WEC's widget on the display. It makes use * of the Xlib function call XtManageChild() .
*/
/* :FUNC uiWECMixin: :Unmanage(void)
*
* :DESC This function unmanages the WEC's widget on the display. It makes * use of the Xlib function call XtUnmanageChild ().
*/
/* :FUNC uiWECMixin: :UpdateDisplay (void)
*
* :DESC This is a place holder for derived classes to attach functions.
* The attached functions should redraw the 'widget' of the object.
*/
/* :FDNC uiWECMixin: :Issensitive (void)
*
* tDESC This function provides the capability for determining if a WEC's * 'widget' is sensitive. If it is and if the Widget for the WEC is of a * type that can accept user input then the WEC is capable of accepting user * input.
*
* :OOU UT Returns uTrue if the 'widget' is sensitive and uFalse if it is not. * It works the same way that the Xlib function XtlsSensitive() works except * that it return a uBoolean instead of a Boolean.
*/
/* :FUNC uiWECMixin: :Sensitive (void)
*
* :DESC Make a WEC's 'widget' sensitive by calling the Xlib function call * call XtSetSensitive () with the 'widget' and a Boolean TRUE as the second * argument.
*/
/* :FUNC uiWECMixin::Insensitive(void)
*
* :DESC Make a WEC's 'widget' in-sensitive by calling the Xlib function * call XtSetSensitive() with the 'widget' and a Boolean FALSE as the second * argument.
*/
/* : CLASS uiWECMixinList
*
* :DESC This class defines behavior for a list of uiWECMixin objects. This * class is defined using the uDECLARE_OBJECT_POINTER_LIST class definition * macro defined in uCons.h.
*/
/* :CLASS uiWECMixinCons
*
* :DESC This class defines behavior for a Cons cell for a uiWECMixin * object. This class is defined using the uDECLARE_OBJECT_POINTER_LIST * class definition macro defined in uCons.h.
*/
uDECLARE_OBJECT_POINTER_LIST (uiWECMixinList, uiWECMixinCons, uiWECMixin); #endif /* _uiWECMixin_h_ */
uiWECMixin.C
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*
*/
#ifndef SABER
static char sccslnfo'l = "SCCS Info: @(#) uiWECMixin.C integration_cfgCore: :0:0 plastic"; #endif /* !SABER */
/* BasicWEC.C */
#include <util/List/uConsImp.h>
^include <util/CoreError/uCoreError.h>
#include "ui/support/uiSupport.h"
#include "ui/abstract/uiWECMixin.h"
#include "ui/abstract/uiBasicForm.h"
uDEFINE_OBJECT_POINTER_LIST(uiWECMixinList, uiWECMixinCons, uiWECMixin);
/*
* :N uiWECMixin::uiWECMixin
*
* :A The contructor can only proceed if the parent or Form's widget exists.
* If it does no then there is no way that the WEC will be able to find the
* Widget it is associated with. Note that the motif call to find a Widget
* fails if the Widget is not at the top level. The uiFindMotifWidget ()
* function is used instead.
*/
uiWECMixin: ruiWECMixin (uiBasicForm *parentForm, const char *widgetName)
{
if { (Widget) 0L == parentForm->widget | | NULL == widgetName ) {
widget = (Widget) 0L;
return;
}
if ((Widget) 0L ==
(widget = uiFindMotifWidget (parentForm->widget, widgetName) ) ) {
uCORE_ERROR( ("Can't find the %s widget.", widgetName));
}
uiSetWidgetVar(widget, XmNuserData, this);
}
uiWECMixin::~uiWECMixin ()
{
if ((Widget) 0L != widget) {
XtDestroyWidget (widget);
}
}
void
uiWECMixin: :Map()
{
XMapWindow(XtDisplay(widget), XtWindow(widget) );
}
void
uiWECMixin: :Unmap()
{
XUnmapWindow(XtDisplay(widget), XtWindow(widget) ); }
void
uiWECMixin : :Manage ( )
{
XtManageChild (widget);
}
void
uiWECMixin : :Unmanage ()
{
XtUnmanageChild (widget);
}
void
uiWECMixin: :UpdateDisplay ( )
{
}
uBoolean
uiWECMixin : : Issensitive ( )
{
return (TRUE == XtlsSensitive (widget) ) ? uTrue : uFalse;
}
void
uiWECMixin: :Sensitive ()
{
XtSetSensitive (widget, TRUE);
}
void
uiWECMixin: : Insensitive ( )
{
XtSetSensitive (widget, FALSE);
}
uiLabelWECh
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*/
/* SCCS Info: @(#) uiLabelWEC.h integration_cfgCore::0:0 plastic */
#ifndef _uiLabelWEC_h_
#define _uiLabelWEC
/*
* The XTFUNCPROTO forces a complete prototype of the X functions so that we
* don't get complaints from the compilers.
*/
#ifndef XTFUNCPROTO
#define XTFUNCPROTO
#endif /* !XTFUNCPROTO */
extern "C" {
#include <X11/Intrinsic.h>
#include <Xm/Xm.h>
};
#include "ui/support/uisupport.h"
#include "ui/abstract/uiWECMixin.h"
#include "ui/attr/uiXmStringAttribute.h"
class uiBasicForm;
/* :CLASS uiLabelWEC
*
* :DESC The uiLabelWEC class provides a C++ interface to Motif Label
* widgets .
*/
class uiLabelWEC public uiWECMixin, public uiXmStringAttribute {
public:
uiLabelWEC(uiBasicForm *parentForm,
const char *widgetName,
XmString v = (XmString) 0L,
uBoolean makeOwner = uFalse);
virtual -uiLabelWEC ();
void SetValue (XmString v,
uiBasicPipe *pipe = (uiBasicPipe*) 0L, uBoolean makeOwner = uFalse);
virtual void HelpCB (XmAnyCallbackStruct *);
Pixel GetForegroundColor();
void SetForegroundColor (Pixel pixel),
Pixel GetBackgroundColor ();
void SetBackgroundColor (Pixel pixel),
);
/ *
* ******************************************************************************
* inline member functions
*/
/*
* * :FCN Callback Virtual Functions
*
* :FCD Callback virtual functions are used to allow the class to be
* specialized and take advantage of the callbacks without having to be aware * that they are initiated from X.
*/
/* :FUNC uiLabelWEC: :HelpCB(XmAnyCallbackStruct *cbs)
*
* :FC Callback Virtual Functions
* :DESC This member function serves as a placeholder stub for the
* Help callback.
*
* :I cbs Pointer to a XmAnyCallbackStruct structure passed by the Motif * library when the callback is invoked.
*/
/*
*
* :FCN Widget Variable Change Functions
*
* :FCD Not all the widget variables can be changed by these functions but * some variables that are more likely to be changed are included. If more * need to be changed then the calls can be made directly using the
* uiSetWidgetVar () macro on the widget or else new accessor functions can be * written in a specialized class.
*
*/
/*
*
* :FUNC uiLabelWEC: :GetForegroundColor()
*
* :FC Widget Variable Change Functions
*
* :DESC This member function returns the widget foreground color as a pixel * indication for a WEC object.
*
* :R _foregroundColor WEC's foreground color pixel value.
*/
inline Pixel
uiLabelWEC: :GetForegroundColor ( )
{
Pixel foregroundColor;
uiGetWidgetVar (widget, XmNforeground, foregroundColor);
return foregroundColor;
}
/* :FUNC uiLabelWEC : :SetForegroundColor (Pixel pixel)
*
* :FC Widget Variable Change Functions
*
* :DESC This member function sets the widget's foreground color to the Pixel * value passed in the arguement list.
*
* :I pixel Pixel value to use in setting the WEC's foreground color. It * should be a valid pixel value.
*/
inline void
uiLabelWEC: :SetForegroundColor (Pixel pixel)
{
uiSetWidgetVar (widget, XmNforeground, pixel);
}
/* :FUNC uiLabelWEC: :GetBackgroundColor () *
* :FC Widget Variable Change Functions
*
* :DESC This member function returns the widget background color as a pixel * indication for a WEC object.
*
* :R _backgroundColor WEC's background color pixel value
*/
inline Pixel
uiLabelWEC: :GetBackgroundColor()
{
Pixel backgroundColor;
uiGetWidgetVar(widget, XmNbackground, backgroundColor);
return backgroundColor;
}
/* :FUNC uiLabelWEC: :SetBackgroundColor(Pixel pixel)
*
* :FC Widget Variable Change Functions
*
* :DESC This member function sets the widget's background color to the Pixel * value passed in the arguement list.
*
* :I pixel Pixel value to use in setting the WEC's background color. It
* should be a valid pixel value.
*/
inline void
uiLabelWEC: :SetBackgroundColor (Pixel pixel)
{
uiSetWidgetVar(widget, XmNbackground, pixel);
}
/* :FUNC uiLabelWEC: :uiLabelWEC(uiBasicForm *parentForm,
* const char *widgetName,
* XmString v = (XmString) 0L,
* uBoolean makeOwner = uFalse)
* :DESC The constructor for the LabelWEC class initializes the base classes * (XmStringAttribute and WECMixin) , verifies that the widget exists, and if * it does, initializes the callbacks.
* :INPUT parentForm A pointer to the Form in which this WEC is contained.
* 'parentForm' must be a valid uiBasicForm pointer.
* :INPUT widgetName The name of a Widget in the 'parentForm' Widget
* hierarchy. If the name is not found in the Widget hierarchy then an error * is displayed by the uCoreError. The named widget should be a Motif
* Label widget.
* :I v XmString value to use for the label of the WEC. It must be a valid * XmString or NULL if it is not defined during creation time.
* :I makeOwner Ownership flag for the value. If set to uTrue, the pointer * 'V is freed when it is no longer reference by the WEC.
*/
/* :FUNC uiLabelWEC: :SetValue (XmString v,
* uiBasicPipe *pipe = (uiBasicPipe*) 0L,
* uBoolean makeOwner = uFalse);
*
* :DESC The SetValue member function in the uiLabelWEC installs the
* XmString "v" as the label string for the widget.
*
* :I v new XmString string to be used for the label. It must be a valid
* XmString. *
* :I pipe The pipe that is calling this member function to set the new value * or else NULL if not called from a pipe.
*
* :I makeOwner Ownership flag for the value. If set to uTrue, the pointer * 'v' is freed when it is no longer reference by the WEC.
*/
/*
*
* :FCN Callback Functions
*
* :FCD The callback functions are not member functions since X expects a 4 * byte function pointer, not a member function pointer. There is one * callback for every possible callback for the widget except the create and * destroy callback. These are not needed since the creation and destruction * of the widget cooresponds to the constructor and destructor of the object. *
*/
#endif /* _uiLabelWEC_h_ */
uiLabelWECC
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
* BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
* TEKNEKRON COMMUNICATIONS SYSTEMS INC.
*
*/
#ifndef SABER
static char sccsInfo[ ] = "SCCS Info: @(#) uiLabelWEC.C integration_cfgCore: :0:0 plastic"; #endif /* !SABER */
/* uiLabelWEC.C */
extern "C" {
#include <X11/StringDefs.h>
};
#include "ui/wecs/uiLabelWEC.h"
/*
* ***************************************************************************
* Prototypes
*/
static void _Help(Widget, uiLabelWEC *wec, XmAnyCallbackStruct *cbs);
/*
*
* :N uiLabelWEC::LabelWEC
*
* :A Initialize the base classes (uiXmStringAttribute and uiWECMixin),
* verify that the widget exists, and if it does, the callbacks are added and
* the XmNlabelString is initialized.
*
*/
uiLabelWEC: :uiLabelWEC(uiBasicForm *parentForm,
const char *widgetName,
XmString v,
uBoolean makeOwner) :
uiXmStringAttribute((uiBasicDS*) parentForm, v, makeOwner),
uiWECMixin (parentForm, widgetName)
{
if ((Widget) 0L == widget) {
uCORE_ERROR( (uecInternalError,
"Can't instantiate uiLabelWEC \"%s\".",
widgetName) );
return;
}
uiSetWidgetVar(widget, XmNlabelString, v);
XtAddCallback (widget, XmNhelpCallback, (XtCallbackProc) _Help,
(XtPointer) this);
} uiLabelWEC: :~uiLabelWEC()
{
}
/*
*
* :N uiLabelWEC::SetValue
*
* :A Install the XmString "v" as the label string for the widget by calling * uiSetWidgetVar with the string.
*
*/
void
uiLabelWEC: :SetValue (XmString v,
uiBasicPipe *pipe,
uBoolean makeOwner)
{
if (! changeLock) {
uiXmStringAttribute: :SetValue (v, pipe, makeOwner); if ((Widget) 0L == widget) {
return;
}
uiSetWidgetVar (widget, XmNlabelString, v);
}
}
void
uiLabelWEC: :HelpCB (XmAnyCallbackStruct*)
{
}
/*
* ******************************************************************************* * callback functions
*
*
* The callback functions are not member functions since X expects a 4 byte * function pointer, not a member function pointer. There is one callback * for every possible callback for the widget except the create and destroy * callback. These are not needed since the creation and destruction of the * widget cooresponds to the constructor and destructor of the object.
*/
/*
*
* :N _Help
*
* :A This member function calls the HelpCB function of the WEC referenced in * the argument list.
*
*/
static void
_Help (Widget, uiLabelWEC *wec, XmAnyCallbackStruct *cbs)
{
wec->HelpCB(cbs);
}
BridgeForm.h
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT BE USED OR
* DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF TEKNEKRON COMMUNICATIONS
* SYSTEMS INC.
*
* SCCS Info: @(#) BridgeForm.h 1.2 11/11/91
*/
/* BridgeForm.h */
#ifndef _BridgeForm_h_ // FORM 1
#define _BridgeForm_h_ // FORM 2
#include <Value/valOid.h> // FORM 3
#include <ui/abstract/uiBasicForm.h> // FORM 4
/*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>=
* WEC includes
#include <ui/wecs/uiDrawnButtonWEC.h> // uiDrawnButtonWEC #include <ui/wecs/uiIntLabelWEC.h> // uilntLabelWEC #include <ui/wecs/uiIntTextWEC.h> // uilntTextWEC #include <ui/wecs/uiLabelWEC.h> // uiLabelWEC
#include <ui/wecs/uiTextWEC.h> // uiTextWEC
/*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>=
* WEC Pipe includes
*/
#include <bs/pipes/bsBasicBSIntActPipe.h> // bsBasicBSIntActPipe #include <ui/pipes/uiIntDirectPipe.h> // uilntDirectPipe #include <ui/pipes/uiXmStringEnumPipe.h> // UiXmStringEnumPipe #include <ui/pipes/uiStringDirectPipe.h> // uiStringDirectPipe /*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>=
* Form class declaration
*/
* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+--+-
* Class declaration
*/
class BridgeFormList; // FORM 1
class BridgeBS; // FORM 2
class BridgeForm : public uiBasicForm { // FORM 3
public: // FORM 4
BridgeForm (valOid *ID); // FORM 5
virtual ~BridgeForm (); // FORM 6
BridgeBS *FindDS(); // FORM 7
inline const char *GetWidgetName() ; // FORM 8 inline const char *GetUidFileName (); // FORM 9 static BridgeForm *FindInstance (valOid *ID), // FORM 10
BridgeBS *ds; // FORM 11 /*
* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+--+- * WEC data members
*/ uiDrawnButtonWEC refreshButtonWE; // refreshButton uiDrawnButtonWEC editButtonWE; // editButton uiDrawnButtonWEC setButtonWE; // setButton uiDrawnButtonWEC createButtonWE; // createButton uilntLabelWEC rxCtWE; // rxCt uilntLabelWEC txCtWE; // txCt uilntLabelWEC lostCtWE; // lostCt uilntLabelWEC notCopiedCtWE; // notCopiedCt uilntLabelWEC errorCtWE; // errorCt uilntTextWEC frameCtWE; // frameCt uiLabelWEC opStateWE; // opState uiTextWEC systemlDWE; // systemID
/*
* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+--+-
* WEC Pipe data members
*/
bsBasicBSIntActPipe refreshButtonPipe; // refreshButton bsBasicBSIntActPipe editButtonPipe; // editButton bsBasicBSIntActPipe setButtonPipe; // setButton bsBasicBSIntActPipe createButtonPipe; // createButton uilntDirectPipe rxCtPipe; // rxCt uilntDirectPipe txCtPipe; // txCt uilntDirectPipe lostCtPipe; // lostCt uilntDirectPipe notCopiedCtPipe; // notCopiedCt uilntDirectPipe errorCtPipe; // errorCt uilntDirectPipe frameCtPipe; // frameCt uiXmStringEnumPipe opStatePipe; // opState uiStringDirectPipe systemlDPipe; // systemID
/*
* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+--+-
* Private Part
*/
private: // FORM 1
static const char *widgetName; // FORM 2 static const char *uidFileName; // FORM 3 static BridgeFormList *instances; // FORM 4
}i // FORM 5
/*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>=
* Get Widget and UID name functions
*/
inline const char*
BridgeForm: :GetWidgetName ()
{
return widgetName;
}
inline const char*
BridgeForm: :GetUidFileName ()
{
return uidFileName; #endif /* _BridgeForm_h_ */ // FORM 5 BridgeForm.C
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT BE USED OR
* DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF TEKNEKRON COMMUNICATIONS
* SYSTEMS INC.
*/
#ifndef SABER
static char sccslnfo[ ] = " @ (#) BridgeForm.C 1.3 11/11/91";
#endif /* !SABER */
/* BridgeForm.C */
#include <util/CoreError/uCoreError.h> // FORM 1
#include <util/List/uCons.h> // FORM2
#include <util/List/uConsImp.h> // FORM 3
#include "BridgeBS.h" // FORM 4
#include "BridgeForm.h" // FORM 5
uDECLARE_OBJECT_POINTER_LIST(BridgeFormList, BridgeFormCons, BridgeForm)// FORM 6 uDEFINE_OBJECT_POINTER_LIST(BridgeFormList, BridgeFormCons, BridgeForm)// FORM 7
/*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>=
* Static data member initialization
*/
const char *BridgeForm: :widgetName = "bridge"; // Form 1
const char *BridgeForm::uidFileName = "Bridge/Bridge.uid";// Form 2
BridgeFormList *BridgeForm::instances = new BridgeFormList;// Form 3
static uiXmStringEnum* XmStrEnumChoices (char *str); // uiXmStringEnum static uiXmStringEnum *opStateChoices = (uiXmStringEnum*) 0L;// opState
/*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>= * Form class declaration
*/
BridgeForm::BridgeForm(valOid *ID) : // FORM 1
uiBasicForm( (const char *)ID, widgetName, uidFileName) // FORM 2
/*
* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+--+- * WEC constructors
*/
, refreshButtonWE(this, "refreshButton") // refreshButton
, frameCtWEtthis, "frameCt") // frameCt
, editButtonWE(this, "editButton") // editButton
, setButtonWE (this, "setButton") // setButton
, createButtonWE (this, "createButton") // createButton
, opStateWE(this, "opState") // opState
, rxCtWE(this, "rxCt") // rxCt
, txCtWE(this, "txCt") // txCt
, lostCtWEtthis, "lostCt") // lostCt
, notCopiedCtWE(this, "notCopiedCt") // notCopiedCt
, errorCtWE(this, "errorCt") // errorCt
, systemlDWE (this, "systemID") // systemID
, ds((BridgeBS*) 0L) // FORM 3
// FORM 4
if ( (uiXmStringEnum*) 0L == opStateChoices) { // opState opStateChoices XmStrEnumChoices ("#O Inactive#1 Normals Degraded#3
Broken"); // opState
} // opState
/*
* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+--+- * Push the WECs onto the attribute and wees list
*/
PushMember (refreshButtonWE); // refreshButton
PushMember (frameCtWE); // frameCt
PushMember (editButtonWE); // editButton
PushMember (setButtonWE); // setButton
PushMember (createButtonWE); // createButton
PushMember (opStateWE); // opState
PushMember (rxCtWE); // rxCt
PushMember (txCtWE); // txCt
PushMember (lostCtWE); // lostCt
PushMember (notCopiedCtWE); // notCopiedCt
PushMember (errorCtWE); // errorCt
PushMember (systemlDWE); // systemID
/*
* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+--+-
* Find the BS
*/
if ((BridgeBS*) 0L == (ds = FindDS () ) && // FORM 1
(BridgeBS*) 0L == (ds = new BridgeBS ( (valOid*lid) ) ) {// FORM 2
uCORE_ERROR( ("Failed to find or create a BridgeBS."));// FORM 3
return; // FORM 4
} // FORM 5
ds->RegisterObserver(this); // FORM 6
/*
* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+--+-
* Set up the pipes
*/
refreshButtonPipe.object = (bsBasicBS*)ds; // refreshButton 1
refreshButtonPipe.SetAction0(bsBasicBS: :GetA11); // refreshButton 2
refreshButtonPipe.EstablishLink (&refreshButtonWE); // refreshButton 3
editButtonPipe.object = (bsBasicBS*)ds; // editButton 1
editButtonPipe.SetAction0(bsBasicBS::WriteLockMO); // editButton 2
editButtonPipe.EstablishLink (&editButtonWE); // editButton 3
setButtonPipe.object = (bsBasicBS*)ds; // setButton 1
setButtonPipe.SetActionO(bsBasicBS::SetChangedData);// setButton 2
setButtonPipe.EstablishLink (&setButtonWE); // setButton 3
createButtonPipe.object = (bsBasicBS*)ds; // createButton 1
createButtonPipe.SetAction0 (bsBasicBS: :CreateMO); // createButton 2
createButtonPipe.EstablishLink (&createButtonWE); // createButton 3
rxCtPipe.EstablishLink (&rxCtWE, & (ds->rxCtBSA) ); // rxCt
txCtPipe.EstablishLink (&txCtWE, & (ds->txCtBSA) ); // txCt
lostCtPipe.EstablishLink (&lostCtWE, & (ds->lostCtBSA) ); // lostCt
notCopiedCtPipe.EstablishLink ( &notCopiedCtWE, & (ds->notCopiedCtBSA) ); // notCopiedCt errorCtPipe.EstablishLink(&errorCtWE, & (ds->errorCtBSA) );// errorCt
frameCtPipe.EstablishLink (fiframeCtWE, & (ds->frameCtBSA) ); // frameCt
opStatePipe. choices = opStateChoices; // opState 1
opStatePipe.EstablishLink (topStateWE, & (ds->opStateBSA) ); // opState 2
systemlDPipe.EstablishLink (SsystemlDWE, & (ds->systemIDBSA) );// systemID
instances->Push(this), // FORM 5
SiphonPipes (); // FORM 6
CloseHierarchy (); // FORM 7
Map ( ); // FORM 8
// FORM 9
/*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>=
* Destructor
*/
BridgeForm: : ~BridgeForm ( ) // Form 1 { // Form 2 if ( (bsBasicBS*) 0L !-= ds) { // Form 3
ds->RemoveObserver (this); // Form 4
} // Form 5 instances->DeleteFirstMatch(this); // Form 6
} // Form 7
/*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>=
* Data Source find function
*/
BridgeBS* // FORM 1
BridgeForm: :FindDS () // FORM 2 { // FORM 3
return BridgeBS: sFindlnstance ( (valOid*) id); // FORM 4
} // FORM 5 /*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>=
* Class find instance function
*/
BridgeForm* // FORM 1 BridgeForm: :FindInstance (valOid *ID) // FORM 2
// FORM 3
BridgeForm *obj; // FORM 4
BridgeFormCons *cp; // FORM 5 uDolist{obj, cp, *instances) { // FORM 6
if -(0 == valOidCmp(ID, (valOid*) obj- >id)) { // FORM 7
return obj; // FORM 8
} // FORM 9
} // FORM 10 return (BridgeForm*) 0L; // FORM 11
// FORM 12 static uiXmStringEnum*
XmStrEnumChoices (char *str)
{
int i, len;
char *c, choice[300];
uiXmStringEnum *choices;
for (len = 0, c = str; '\0' != *c; c++) {
if ('#' == *c) {
len++;
}
}
if ((uiXmStringEnum*) 0L == (choices = new uiXmStringEnum[len + 1])) { return choices;
}
while ('\0' l= *str && '#' != *str) {
str++;
}
for (i = 0; '\0' != *str && i < len; i++) {
if ('\0' == *str) {
break;
}
str++;
choices[i].n = 0;
while ('\0' != *str && '0' <= *str && '9' >= *str) {
choices[i].n = choices[i] .n * 10 + (*str++ - '0');
}
while ( ' ' == *str || '\t' == *str) {
str++;
}
for (c = choice; '\0' != *str && '#' ! = *str; C++, str++) { *c = *str; }
*c = '\0';
choices [i] .value = XmStringCreate (choice,
XmSTRING_ DEFAULT_CHARSET);
}
choices [i] .n = 0;
choices [i] .value = (XmString) 0L;
return choices;
}
BridgeBS.h
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT BE USED OR
* DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF TEKNEKRON COMMUNICATIONS
* SYSTEMS INC.
*
* SCCS Info: @ (#) BridgeBS.h 1.3 11/11/91
*/
/* BridgeBS.h */
#ifndef _BridgeBS_h_ // BS 1 #define _BridgeBS_h_ // BS 2 #include <bs/abstract/bsBasicBS.h> // BS 3 /*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>=
* BSA includes
#include <bs/bsa/bsIntBSA.h> // bsIntBSA #include <bs/bsa/bsStringBSA.h> // bsStringBSA /*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>=
* Behavior Support (BS) class declaration
/*
* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+--+-
* Class declaration
*/
class BridgeBSList; // BS 1 class BridgeBS : public bsBasicBS { // BS 2 public: // BS 3
BridgeBS (valOid *ID); // BS 4 virtual ~BridgeBS(); // BS 5 static BridgeBS *FindInstance(valOid *ID); // BS 6
/*
* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+--+-
* BSA data members
*/
bsIntBSA rxCtBSA; // rxCt bsIntBSA txCtBSA; // txCt bsIntBSA lostCtBSA; // lostCt bsIntBSA notCopiedCtBSA; // notCopiedCt bsIntBSA errorCtBSA; // errorCt bsIntBSA frameCtBSA; // frameCt bsIntBSA opStateBSA; // opState bsStringBSA systemlDBSA; // systemID
/*
* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+--+-
* Private Part
*/
private: // BS 1
static BridgeBSList *instances; // BS 2
}; // BS 3 #undef VMS // BS 4 #endif /* _BridgeBS_h_ */ // BS 5 BridgeBS.C
/*
* Copyright (c) 1991 Teknekron Communications Systems
*
* All Rights Reserved
*
* THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT BE USED OR
* DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF TEKNEKRON COMMUNICATIONS
* SYSTEMS INC.
*/
#ifndef SABER
static char sccsInfo[ ] = " @ ( #) BridgeBS.C 1.3 11/11/91";
#endif /* !SABER */
/* BridgeBS.C */
#include <util/CoreError/uCoreError .h> // BS 1 #include <util/List/uCons.h> // BS 2 #include <util/List/uConsImp.h> // BS 3 #include "BridgeBS.h" // BS 4 #include "BridgeMO.h" // BS 5 uDECLARE_OBJECT_POINTER_LIST (BridgeBSList, BridgeBSCons, BridgeBS) // BS 6 uDEFINE_OBJECT_POINTER_LIST (BridgeBSList, BridgeBSCons, BridgeBS)// BS 7
BridgeBSList *BridgeBS: :instances = new BridgeBSList; // BS 8 extern aecConnEndpoint *theMibConn; // BS 9
/*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>=
* Behavior Support (BS) class declaration
*/
BridgeBS : :BridgeBS (valOid ID) : // BS 1
bsBasicBS(ID) // BS 2
/*
* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+--+- * BSA constructors
*/
, rxCtBSA(this, rxCt_ ) // rxCt
, txCtBSA(this, txCt_) // txCt
, lostCtBSA(this, lostCt_) // lostCt
, notCopiedCtBSA (this, notCopiedCt_) // notCopiedCt
, errorCtBSA(this, errorCt_) // errorCt
, frameCtBSA(this, frameCt_) // frameCt
, opStateBSA(this, opState_) // opState
, systemIDBSA(this, systemID_) // systemID
// BS 3 bsBasicBS: :moClass = (valOidClass) idBridgeMO; // BS 4 mibConn = theMibConn; // BS 5
/*
* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+---+--+-
* Push the BSAs onto the attribute list
*/
PushMember (rxCtBSA); // rxCt
PushMember (txCtBSA); // txCt
PushMember (lostCtBSA); // lostCt PushMember (notCopiedCtBSA); // notCopiedCt PushMember (errorCtBSA); // errorCt PushMember (frameCtBSA); // frameCt PushMember (opStateBSA); // opState PushMember (systemlDBSA); // systemID instances->Push (this); // BS 6 if (RegisterMO()) { // BS 7 uCORE_ERROR(("Failed to register an MO %d for the BridgeBS class.", (NULL == ID) ? 0 : ID->GetInst ()) ); // BS 8
} // BS 9
} // BS 10
/*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>=
* Destructor
*/
BridgeBS: :~BridgeBS () // BS 1
{ // BS 2
DeregisterMO (); // BS 3
instances->DeleteFirstMatch (this); // BS 4
} // BS 5
/*
* =<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>==<>=
* Class find instance function
*/
BridgeBS* // BS ; 1
BridgeBS: :FindInstance (valOid *ID) // BS ; 2
{ // BS 3
BridgeBS *obj; // BS 4
BridgeBSCons *cp; // BS 5
uDolist(obj, cp, *instances) { // BS 6
if (0 == valOidCmp(ID, (valOid*) obj->id) ) { // BS 7
return obj; // BS 8
} // BS 9
} // BS 10
return (BridgeBS*) 0L; // BS 11
} // BS 12

Claims

WHAT IS CLAIMED IS:
1. A method of converting by a computer program operating under a digital computer, a first
collection of data having a plurality of attributes to a second collection of data, for display on a display device, having a plurality of attributes, said method comprising:
(a) identifying by said computer a
plurality of relationships with each
relationship being an attribute of the data of the first collection to be converted to an attribute of the data of the second collection;
(b) forming a plurality of independent conversion routines, each conversion routine corresponding to one of said relationships;
(c) transforming the data of said first collection to the data of said second
collection; and
(d) displaying said second collection of data on said display device.
2. A method of changing the conversion from a first collection of data having a plurality of attributes to a second collection of data having a plurality of attributes to a conversion from the first collection to a third collection of data having a plurality of attributes, with some of the
attributes of said third collection being the same as some of the attributes of said second collection, said method performed by a computer program operating under the control of a digital computer, said method comprising:
(a) converting the first collection to the second collection by: (i) identifying by said computer a plurality of first relationships with each first relationship being an attribute of the data of the first collection to be converted to an attribute of the data of the second collection;
(ii) forming a plurality of independent first conversion routines, each first conversion routine corresponding to one of said first relationships;
(iii) transforming the data of said first collection to the data of the second collection by said first conversion
routines;
(b) changing the conversion from the first collection to the third collection by:
(iv) identifying by said computer a plurality of second relationships with each second relationship being an attribute of the data of the first collection to be converted to an attribute of the data of the third collection;
(v) forming a plurality of independent second conversion routines, each second conversion routine
corresponding to one of said second
relationships, not in common with the first relationships between the first collection and the second collection; and
(vi) transforming the data of said first collection to the data of the third collection by said first and second conversion routines.
3. A method of converting a first collection of data with a plurality of first data elements to a second collection of data with a plurality of second data elements comprising:
creating a plurality of first objects, one for each of said first data elements, each of said first objects having an attribute;
creating a plurality of second objects, one for each of said second data elements, each of said second objects having an attribute;
creating a plurality of translation
objects, with each translation object having address pointer attribute and translation behavior; and
attaching a select translation object to a first object whose attribute is the source of the conversion to a second object whose
attribute is the attribute to which the first object is to be converted.
PCT/US1993/003274 1992-04-14 1993-04-07 Method for converting a first data collection to a second data collection WO1993021591A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US86847892A 1992-04-14 1992-04-14
US07/868,478 1992-04-14

Publications (1)

Publication Number Publication Date
WO1993021591A1 true WO1993021591A1 (en) 1993-10-28

Family

ID=25351767

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US1993/003274 WO1993021591A1 (en) 1992-04-14 1993-04-07 Method for converting a first data collection to a second data collection

Country Status (2)

Country Link
AU (1) AU3975493A (en)
WO (1) WO1993021591A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1995020198A1 (en) * 1994-01-21 1995-07-27 Taligent, Inc. Number formatting framework
EP1168201A2 (en) * 2000-06-30 2002-01-02 Requisite Technology Inc. Method and apparatus for mapping one catalog into another catalog
US7657558B2 (en) * 1997-03-19 2010-02-02 Microsoft Corporation Establishing relationships between objects based on object interfaces
CN117055949A (en) * 2023-10-11 2023-11-14 中博信息技术研究院有限公司 Method and system for automatically generating vite configuration

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4785349A (en) * 1987-10-05 1988-11-15 Technology Inc. 64 Digital video decompression system
US4868570A (en) * 1988-01-15 1989-09-19 Arthur D. Little, Inc. Method and system for storing and retrieving compressed data
US4958301A (en) * 1988-03-30 1990-09-18 Kabushiki Kaisha Toshiba Method of and apparatus for converting attributes of display data into desired colors in accordance with relation
US5003539A (en) * 1986-04-11 1991-03-26 Ampex Corporation Apparatus and method for encoding and decoding attribute data into error checking symbols of main data
US5185655A (en) * 1991-10-02 1993-02-09 Tandy Corporation Method and apparatus for encoding full color video data signals and protocol for encoding same
US5206951A (en) * 1987-08-21 1993-04-27 Wang Laboratories, Inc. Integration of data between typed objects by mutual, direct invocation between object managers corresponding to object types

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5003539A (en) * 1986-04-11 1991-03-26 Ampex Corporation Apparatus and method for encoding and decoding attribute data into error checking symbols of main data
US5206951A (en) * 1987-08-21 1993-04-27 Wang Laboratories, Inc. Integration of data between typed objects by mutual, direct invocation between object managers corresponding to object types
US4785349A (en) * 1987-10-05 1988-11-15 Technology Inc. 64 Digital video decompression system
US4868570A (en) * 1988-01-15 1989-09-19 Arthur D. Little, Inc. Method and system for storing and retrieving compressed data
US4958301A (en) * 1988-03-30 1990-09-18 Kabushiki Kaisha Toshiba Method of and apparatus for converting attributes of display data into desired colors in accordance with relation
US5185655A (en) * 1991-10-02 1993-02-09 Tandy Corporation Method and apparatus for encoding full color video data signals and protocol for encoding same

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1995020198A1 (en) * 1994-01-21 1995-07-27 Taligent, Inc. Number formatting framework
US5657259A (en) * 1994-01-21 1997-08-12 Object Technology Licensing Corp. Number formatting framework
US7657558B2 (en) * 1997-03-19 2010-02-02 Microsoft Corporation Establishing relationships between objects based on object interfaces
EP1168201A2 (en) * 2000-06-30 2002-01-02 Requisite Technology Inc. Method and apparatus for mapping one catalog into another catalog
EP1168201A3 (en) * 2000-06-30 2003-11-19 Requisite Technology Inc. Method and apparatus for mapping one catalog into another catalog
US7752238B2 (en) 2000-06-30 2010-07-06 Requisite Software Inc. Method and apparatus for mapping one catalog into another catalog
EP2204751A1 (en) * 2000-06-30 2010-07-07 Requisite Technology Inc. Method and apparatus for mapping one catalog into another catalog
CN117055949A (en) * 2023-10-11 2023-11-14 中博信息技术研究院有限公司 Method and system for automatically generating vite configuration
CN117055949B (en) * 2023-10-11 2024-02-09 中博信息技术研究院有限公司 Method and system for automatically generating vite configuration

Also Published As

Publication number Publication date
AU3975493A (en) 1993-11-18

Similar Documents

Publication Publication Date Title
US7207002B2 (en) Serialization and preservation of objects
US6993759B2 (en) Diagrammatic control of software in a version control system
US6002867A (en) Development system with methods providing visual form inheritance
US5740440A (en) Dynamic object visualization and browsing system
US5890176A (en) Object-oriented document version tracking method and apparatus
US5761510A (en) Method for error identification in a program interface
US5519866A (en) Method and apparatus of incrementally linking components of a modeled computer program
JP3595340B2 (en) Recoverable proxy objects in an object-oriented environment
US5325533A (en) Engineering system for modeling computer programs
US6182277B1 (en) Methods and apparatus for declarative programming techniques in an object oriented environment
US6272521B1 (en) Apparatus and method for allowing object-oriented programs created with different framework versions to communicate
US5896532A (en) Objects with run-time classes and methods of making them
JPH10116185A (en) Resource file builder tool and computer readable code
CA2077189A1 (en) Computer-assisted software engineering for cooperative processing
KR101137070B1 (en) Priority binding
US6779172B1 (en) Bean scripting framework
US9311111B2 (en) Programming environment with support for handle and non-handle user-created classes
Serrano Wide classes
US6085034A (en) Constructor based object initialization with overrides
US7219341B2 (en) Code analysis for selective runtime data processing
KR20040077410A (en) System and method for defining and using subclasses declaratively within markup
WO1993021591A1 (en) Method for converting a first data collection to a second data collection
US8375355B2 (en) Conversion of a class oriented data flow program to a structure oriented data flow program
US8356290B2 (en) Conversion of a class oriented data flow program with inheritance to a structure oriented data flow program
US7526752B1 (en) Introspection support for generic types

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AU CA JP KR

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH DE DK ES FR GB GR IE IT LU MC NL PT SE

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
122 Ep: pct application non-entry in european phase
NENP Non-entry into the national phase

Ref country code: CA