Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions

ball::ScopedAttribute_Container Class Reference

#include <ball_scopedattribute.h>

Inheritance diagram for ball::ScopedAttribute_Container:
ball::AttributeContainer

List of all members.

Public Types

typedef bsl::allocator< char > allocator_type

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (ScopedAttribute_Container, bslma::UsesBslmaAllocator)
 ScopedAttribute_Container (const char *name, const bsl::string_view &value, const allocator_type &allocator=allocator_type())
 ScopedAttribute_Container (const char *name, const char *value, const allocator_type &allocator=allocator_type())
 ScopedAttribute_Container (const char *name, int value, const allocator_type &allocator=allocator_type())
 ScopedAttribute_Container (const char *name, long value, const allocator_type &allocator=allocator_type())
 ScopedAttribute_Container (const char *name, long long value, const allocator_type &allocator=allocator_type())
 ScopedAttribute_Container (const char *name, unsigned int value, const allocator_type &allocator=allocator_type())
 ScopedAttribute_Container (const char *name, unsigned long value, const allocator_type &allocator=allocator_type())
 ScopedAttribute_Container (const char *name, unsigned long long value, const allocator_type &allocator=allocator_type())
 ScopedAttribute_Container (const char *name, const void *value, const allocator_type &allocator=allocator_type())
virtual ~ScopedAttribute_Container ()
bool hasValue (const Attribute &attribute) const BSLS_KEYWORD_OVERRIDE
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const BSLS_KEYWORD_OVERRIDE
void visitAttributes (const bsl::function< void(const Attribute &)> &visitor) const BSLS_KEYWORD_OVERRIDE
allocator_type get_allocator () const

Detailed Description

This component-private class is a concrete implementation of the AttributeContainer protocol for a single attribute.

See Component ball_scopedattribute


Member Typedef Documentation


Constructor & Destructor Documentation

ball::ScopedAttribute_Container::ScopedAttribute_Container ( const char *  name,
const bsl::string_view &  value,
const allocator_type allocator = allocator_type() 
)
ball::ScopedAttribute_Container::ScopedAttribute_Container ( const char *  name,
const char *  value,
const allocator_type allocator = allocator_type() 
)
ball::ScopedAttribute_Container::ScopedAttribute_Container ( const char *  name,
int  value,
const allocator_type allocator = allocator_type() 
)
ball::ScopedAttribute_Container::ScopedAttribute_Container ( const char *  name,
long  value,
const allocator_type allocator = allocator_type() 
)
ball::ScopedAttribute_Container::ScopedAttribute_Container ( const char *  name,
long long  value,
const allocator_type allocator = allocator_type() 
)
ball::ScopedAttribute_Container::ScopedAttribute_Container ( const char *  name,
unsigned int  value,
const allocator_type allocator = allocator_type() 
)
ball::ScopedAttribute_Container::ScopedAttribute_Container ( const char *  name,
unsigned long  value,
const allocator_type allocator = allocator_type() 
)
ball::ScopedAttribute_Container::ScopedAttribute_Container ( const char *  name,
unsigned long long  value,
const allocator_type allocator = allocator_type() 
)
ball::ScopedAttribute_Container::ScopedAttribute_Container ( const char *  name,
const void *  value,
const allocator_type allocator = allocator_type() 
)

Create a BALL attribute container holding a single rule, associating the specified name with the specified value. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) to supply memory; otherwise, the default allocator is used.

virtual ball::ScopedAttribute_Container::~ScopedAttribute_Container (  )  [virtual]

Destroy this object;


Member Function Documentation

ball::ScopedAttribute_Container::BSLMF_NESTED_TRAIT_DECLARATION ( ScopedAttribute_Container  ,
bslma::UsesBslmaAllocator   
)
bool ball::ScopedAttribute_Container::hasValue ( const Attribute attribute  )  const [virtual]

Return true if the specified attribute is the same as the value held in this container, and false otherwise.

Implements ball::AttributeContainer.

bsl::ostream& ball::ScopedAttribute_Container::print ( bsl::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const [virtual]

Format this object to the specified output stream at the (absolute value of) the optionally specified indentation level and return a reference to stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect.

Implements ball::AttributeContainer.

void ball::ScopedAttribute_Container::visitAttributes ( const bsl::function< void(const Attribute &)> &  visitor  )  const [virtual]

Invoke the specified visitor function for all attributes in this container.

Implements ball::AttributeContainer.

allocator_type ball::ScopedAttribute_Container::get_allocator (  )  const

Return the allocator used by this object to supply memory. Note that if no allocator was supplied at construction the default allocator in effect at construction is used.


The documentation for this class was generated from the following file: