|
|
Base class for deriving classes to represent relationships in which the parent Item stores the selectors of one or more child 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 parent Item to Item(s) of the child Category. Subclasses specify the attribute key of the parent Item that holds the child Item selector. Another constructor is used when there is a 1-to-n relationship from a parent Item to Item(s) of the child Category. This is based on the format for arrays of values specified in Item.h. Subclasses specify the value of the key of the parent Item that holds the number of child 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 MachineCategory has an array of selectors of Item(s) of ClusterCategory, NUM_CLUSTERS could be the key of MachineCategory Item(s) that holds number of values in the array. The base name of the attribute keys could be CLUSTER. ParentAttrAssoc will monitor Item(s) corresponding to the list of selectors in Attributes of the parent MachineCategory Item with keys CLUSTER0, CLUSTER1, ... CLUSTER<NUM_CLUSTERS - 1>.
ParentAttrAssoc keeps the list of child Item(s) up-to-date based on parent/child changes.
Typically, subclasses only need to call the ParentAttrAssoc constructor with the application specific values of the Attribute keys and do not need to override any methods.
static const char* |
Used internally for logging.
|
[protected]
Constructor. This version is used for 1-to-n relationships and takes two attribute names. "parentAttrNumKeys" is the attribute key which holds the number of child Item selectors, and "parentAttrKey" is the base name of the attribute keys which hold the selectors themselves.
|
[protected]
Constructor. This version is used for 1-to-1 relationships and takes one attribute name which is the attribute key holding the child Item selector.
~ |
[protected virtual]
Destructor
bool |
[protected virtual]
Returns true if the selector of "potentialChildItem" exists in Attributes with key(s) holding the selectors of the child Item(s).
Reimplemented from ComputedAssoc.
NotificationFilter* |
[protected virtual]
Overrides base class methods to indicate that the Item(s) of child category that must be monitored are those that match the selector(s) in parent Item.
Reimplemented from ComputedAssoc.
NotificationFilter* |
[protected virtual]
Reimplemented from ComputedAssoc.
Generated by: rusty@irem on Mon Sep 18 18:07:52 2000, using kdoc 2.0a36. |