Quick Links:

bal | bbl | bdl | bsl

Namespaces

Component ball_managedattributeset
[Package ball]

Provide a container for managed attributes. More...

Namespaces

namespace  ball

Detailed Description

Outline
Purpose:
Provide a container for managed attributes.
Classes:
ball::ManagedAttributeSet a container for managed attributes
See also:
Component ball_managedattribute, Component ball_rule
Description:
This component implements a value-semantic container class, ball::ManagedAttributeSet, that manages a set of ball::ManagedAttribute objects.
This component participates in the implementation of "Rule-Based Logging". For more information on how to use that feature, please see the package-level documentation and usage examples for "Rule-Based Logging".
Usage:
In this section we show intended usage of this component.
Example 1: Basic Properties of ball::ManagedAttributeSet:
This example shows basic operations on a managed attribute set.
First, we create an empty attribute set: Then, we add two attributes to the attribute set:
  ball::ManagedAttribute p1("uuid", 4044457);
  assert(attributeSet.addAttribute(p1));
  assert(attributeSet.addAttribute(ball::ManagedAttribute("uuid", 3133246)));
Next, we look up (by value) via the isMember method:
  assert(attributeSet.isMember(p1));
  assert(attributeSet.isMember(ball::ManagedAttribute("uuid", 3133246)));
Then, we add duplicated value and observe the status of the operation:
  assert(!attributeSet.addAttribute(ball::ManagedAttribute("uuid",
                                                           3133246)));
Finally, we remove an attribute and check that it is not a member of the attribute set:
  assert(attributeSet.removeAttribute(p1));
  assert(!attributeSet.isMember(p1));