Provide a wrapper for ball::Attribute
with managed name storage.
More...
Namespaces |
namespace | ball |
Detailed Description
- Outline
-
-
- Purpose:
- Provide a wrapper for
ball::Attribute
with managed name storage.
-
- Classes:
-
- See also:
- Component ball_attribute
-
- Description:
- This component implements a wrapper for
ball::Attribute
, ball::ManagedAttribute
, that manages the lifetime of the attribute name. Note that ball::Attribute
does not manage the lifetime of its name (see ball_attribute
).
-
- Usage:
- In this section we show intended usage of this component.
-
- Example 1: Basic Properties of ball::ManagedAttribute:
- This example creates
ball::ManagedAttribute
objects and shows basic properties of those objects: Finally, we show that ball::ManagedAttribute
manages the storage for the attribute name after construction: char buffer[] = "Hello";
ball::ManagedAttribute p3(buffer, 1);
bsl::strcpy(buffer, "World");
assert("Hello" == p3.key()));