|
|
Base class for deriving classes to represent relationships in which the child Item(s) store the selectors of one or more parent Item(s) as part of its Attributes.
Subclasses provide the Attribute's key in the constructors. The ParentAttrAssoc class monitors the parent and child Item(s), keeps the list of child Item(s) current and notifies listeners of changes to the list of child Item(s).
ParentAttrAssoc can determine the Item(s) of child category that belong to this Association in two ways depending on the constructor that is used. One constructor is used when there is a 1-to-1 relationship from a child Item to Item(s) of the parent Category. Subclasses specify the attribute key of the child Item that holds the parent Item selector. Another constructor is used when there is a 1-to-n relationship from a child Item to Item(s) of the parent Category. This is based on the format for arrays of values specified in Item.h. Subclasses specify the value of the key of the child Item that holds the number of parent Item selectors and the base name of the attribute keys which hold the selectors themselves.
For example, if ClustersAssocWithMachine is a relationship where an Item of type ClusterCategory has an array of selectors of Item(s) of MachineCategory, NUM_MACHINES could be the key of ClusterCategory Item(s) that holds number of values in the array. The base name of the attribute keys could be MACHINE. ParentAttrAssoc will monitor Item(s) corresponding to the list of selectors in Attributes of the child ClusterCategory Item(s) with keys CLUSTER0, CLUSTER1, ... CLUSTER<NUM_CLUSTERS - 1>.
ChildAttrAssoc keeps the list of child Item(s) up-to-date based on parent/child changes.
Typically, subclasses only need to call the ChildAttrAssoc constructor with the application specific values of the Attribute keys and do not need to override any methods.
static const char* |
For logging.
|
Constructor. This version is used for 1-to-n relationships and takes two attribute names. "childAttrNumKeys" is the attribute key which holds the number of parent Item selectors, and "childAttrKey" is the base name of the attribute keys which hold the selectors themselves.
|
Constructor. This version is used for 1-to-1 relationships and takes one attribute name which is the attribute key holding the parent Item selector.
~ |
[virtual]
Destructor
void |
[virtual]
Called when parentItem is changed Overrides ComputedAssoc behavior to do nothing on parentChanged()
Reimplemented from ComputedAssoc.
bool |
[virtual]
Returns true if the selector of the parent Item exists in Attributes with key(s) holding the selectors of the parent Item(s).
Reimplemented from ComputedAssoc.
Generated by: rusty@irem on Mon Sep 18 18:07:52 2000, using kdoc 2.0a36. |