BDE 4.14.0 Production release
Loading...
Searching...
No Matches
s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 > Class Template Reference

#include <s_baltst_testsequence.h>

Public Types

enum  { k_HAS_ATTRIBUTE_0 , k_HAS_ATTRIBUTE_1 , k_HAS_ATTRIBUTE_2 = !bslmf::IsSame<TestNilValue, Attribute2Type>::value }
 
typedef TYPED_ATTRIBUTE_0::Type Attribute0Type
 
typedef TYPED_ATTRIBUTE_0::Attribute Attribute0
 
typedef TYPED_ATTRIBUTE_1::Type Attribute1Type
 
typedef TYPED_ATTRIBUTE_1::Attribute Attribute1
 
typedef TYPED_ATTRIBUTE_2::Type Attribute2Type
 
typedef TYPED_ATTRIBUTE_2::Attribute Attribute2
 

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (TestSequence, bslma::UsesBslmaAllocator)
 
 TestSequence ()
 
 TestSequence (bslma::Allocator *basicAllocator)
 
 TestSequence (const Attribute0Type attribute0, bslma::Allocator *basicAllocator=0)
 
 TestSequence (const Attribute0Type attribute0, const Attribute1Type attribute1, bslma::Allocator *basicAllocator=0)
 
 TestSequence (const Attribute0Type attribute0, const Attribute1Type attribute1, const Attribute2Type attribute2, bslma::Allocator *basicAllocator=0)
 
 TestSequence (const TestSequence &original, bslma::Allocator *basicAllocator=0)
 
TestSequenceoperator= (const TestSequence &original)
 
template<class MANIPULATOR >
int manipulateAttribute (MANIPULATOR &manipulator, const char *attributeName, int attributeNameLength)
 
template<class MANIPULATOR >
int manipulateAttribute (MANIPULATOR &manipulator, int attributeId)
 
template<class MANIPULATOR >
int manipulateAttributes (MANIPULATOR &manipulator)
 
void reset ()
 
template<class ACCESSOR >
int accessAttribute (ACCESSOR &accessor, const char *attributeName, int attributeNameLength) const
 
template<class ACCESSOR >
int accessAttribute (ACCESSOR &accessor, int attributeId) const
 
template<class ACCESSOR >
int accessAttributes (ACCESSOR &accessor) const
 
const char * className () const
 
bool hasAttribute (const char *attributeName, int attributeNameLength) const
 
bool hasAttribute (int attributeId) const
 
const Attribute0Type attribute0 () const
 
const Attribute1Type attribute1 () const
 
const Attribute2Type attribute2 () const
 

Static Public Member Functions

static bool areEqual (const TestSequence &lhs, const TestSequence &rhs)
 

Detailed Description

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
class s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >

This in-core value-semantic class provides a basic implementation of the concept defined by the bdlat Sequence type category. The template parameters TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, and TYPED_ATTRIBUTE_2 must all satisfy the following requirements:

  • The type must have two member type definitions, Type and Attribute.
  • Type must meet the requirements of an in-core value-semantic type.
  • Type must meet the requirements of exactly one of the bdlat value categories.
  • Attribute must be a specialization of the TestAttribute type. Further, each TestAttribute member type definition of a template argument must return values for TestAttribute::id() and TestAttribute::name() that are different from all others within this TestSequence specialization.

Additionally, the Type of any template argument may be TestNilValue if all Type member type definitions of subsequent template arguments are also TestNilValue.

The Type and Attribute member type definitions of the template arguments define the type and bdlat_AttributeInfo of the attributes of the bdlat Selection implementation provided by this class. A template argument having a TestNilValue Type indicates that the corresponding attribute does not exist.

See s_baltst_testsequence

Member Typedef Documentation

◆ Attribute0

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
typedef TYPED_ATTRIBUTE_0::Attribute s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::Attribute0

◆ Attribute0Type

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
typedef TYPED_ATTRIBUTE_0::Type s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::Attribute0Type

◆ Attribute1

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
typedef TYPED_ATTRIBUTE_1::Attribute s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::Attribute1

◆ Attribute1Type

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
typedef TYPED_ATTRIBUTE_1::Type s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::Attribute1Type

◆ Attribute2

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
typedef TYPED_ATTRIBUTE_2::Attribute s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::Attribute2

◆ Attribute2Type

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
typedef TYPED_ATTRIBUTE_2::Type s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::Attribute2Type

Member Enumeration Documentation

◆ anonymous enum

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
anonymous enum
Enumerator
k_HAS_ATTRIBUTE_0 
k_HAS_ATTRIBUTE_1 
k_HAS_ATTRIBUTE_2 

Constructor & Destructor Documentation

◆ TestSequence() [1/6]

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::TestSequence ( )
inline

◆ TestSequence() [2/6]

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::TestSequence ( bslma::Allocator basicAllocator)
inlineexplicit

◆ TestSequence() [3/6]

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::TestSequence ( const Attribute0Type  attribute0,
bslma::Allocator basicAllocator = 0 
)
inlineexplicit

◆ TestSequence() [4/6]

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::TestSequence ( const Attribute0Type  attribute0,
const Attribute1Type  attribute1,
bslma::Allocator basicAllocator = 0 
)
inlineexplicit

◆ TestSequence() [5/6]

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::TestSequence ( const Attribute0Type  attribute0,
const Attribute1Type  attribute1,
const Attribute2Type  attribute2,
bslma::Allocator basicAllocator = 0 
)
inlineexplicit

◆ TestSequence() [6/6]

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::TestSequence ( const TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 > &  original,
bslma::Allocator basicAllocator = 0 
)
inline

Member Function Documentation

◆ accessAttribute() [1/2]

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
template<class ACCESSOR >
int s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::accessAttribute ( ACCESSOR &  accessor,
const char *  attributeName,
int  attributeNameLength 
) const
inline

Invoke the specified accessor on the (non-modifiable) attribute of this object indicated by the specified attributeName and attributeNameLength, supplying accessor with the corresponding attribute information structure. Return a non-zero value if the attribute is not found, and the value returned from the invocation of accessor otherwise.

◆ accessAttribute() [2/2]

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
template<class ACCESSOR >
int s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::accessAttribute ( ACCESSOR &  accessor,
int  attributeId 
) const
inline

Invoke the specified accessor on the attribute of this object with the given attributeId, supplying accessor with the corresponding attribute information structure. Return non-zero if the attribute is not found, and the value returned from the invocation of accessor otherwise.

◆ accessAttributes()

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
template<class ACCESSOR >
int s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::accessAttributes ( ACCESSOR &  accessor) const
inline

Invoke the specified accessor sequentially on each attribute of this object, supplying accessor with the corresponding attribute information structure until such invocation returns a non-zero value. Return the value from the last invocation of accessor.

◆ areEqual()

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
static bool s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::areEqual ( const TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 > &  lhs,
const TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 > &  rhs 
)
inlinestatic

◆ attribute0()

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
const Attribute0Type s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::attribute0 ( ) const
inline

◆ attribute1()

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
const Attribute1Type s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::attribute1 ( ) const
inline

◆ attribute2()

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
const Attribute2Type s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::attribute2 ( ) const
inline

◆ BSLMF_NESTED_TRAIT_DECLARATION()

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::BSLMF_NESTED_TRAIT_DECLARATION ( TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >  ,
bslma::UsesBslmaAllocator   
)

◆ className()

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
const char * s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::className ( ) const
inline

Return a null-terminated string containing the exported name for this class.

◆ hasAttribute() [1/2]

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
bool s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::hasAttribute ( const char *  attributeName,
int  attributeNameLength 
) const
inline

Return true if this object has an attribute with the specified attributeName of the specified attributeNameLength, and false otherwise.

◆ hasAttribute() [2/2]

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
bool s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::hasAttribute ( int  attributeId) const
inline

Return true if this object has an attribute with the specified attributeId, and false otherwise.

◆ manipulateAttribute() [1/2]

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
template<class MANIPULATOR >
int s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::manipulateAttribute ( MANIPULATOR &  manipulator,
const char *  attributeName,
int  attributeNameLength 
)
inline

Invoke the specified manipulator on the address of the (modifiable) attribute indicated by the specified attributeName and attributeNameLength of this object, supplying manipulator with the corresponding attribute information structure. Return a non-zero value if the attribute is not found, and the value returned from the invocation of manipulator otherwise.

◆ manipulateAttribute() [2/2]

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
template<class MANIPULATOR >
int s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::manipulateAttribute ( MANIPULATOR &  manipulator,
int  attributeId 
)
inline

Invoke the specified manipulator on the address of the (modifiable) attribute indicated by the specified attributeId of this object, supplying manipulator with the corresponding attribute information structure. Return a non-zero value if the attribute is not found, and the value returned from the invocation of manipulator otherwise.

◆ manipulateAttributes()

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
template<class MANIPULATOR >
int s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::manipulateAttributes ( MANIPULATOR &  manipulator)
inline

Invoke the specified manipulator sequentially on the address of each (modifiable) attribute of this object, supplying manipulator with the corresponding attribute information structure until such invocation returns a non-zero value. Return the value from the last invocation of manipulator.

◆ operator=()

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
TestSequence & s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::operator= ( const TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 > &  original)
inline

◆ reset()

template<class TYPED_ATTRIBUTE_0 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_1 = TypedTestAttribute<TestNilValue, TestAttribute<0> >, class TYPED_ATTRIBUTE_2 = TypedTestAttribute<TestNilValue, TestAttribute<0> >>
void s_baltst::TestSequence< TYPED_ATTRIBUTE_0, TYPED_ATTRIBUTE_1, TYPED_ATTRIBUTE_2 >::reset ( )
inline

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