BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlar::SequenceConstRef Class Reference

#include <bdlar_sequenceref.h>

Public Member Functions

template<class t_SEQUENCE >
 SequenceConstRef (const t_SEQUENCE &sequence, typename bsl::enable_if< IsSequence< t_SEQUENCE >::value >::type *=0)
 
 SequenceConstRef (const void *objectAddress, const SequenceConstVtable *vtable)
 
 SequenceConstRef (const SequenceRef &object)
 
template<class t_ACCESSOR >
int accessAttribute (t_ACCESSOR &accessor, int attributeId) const
 
template<class t_ACCESSOR >
int accessAttribute (t_ACCESSOR &accessor, const char *attributeName, int attributeNameLength) const
 
template<class t_ACCESSOR >
int accessAttributes (t_ACCESSOR &accessor) const
 
const SequenceConstVtablevtable () const
 
bool hasAttribute (int attributeId) const
 
bool hasAttribute (const char *attributeName, int attributeNameLength) const
 
const void * objectAddress () const
 
const char * xsdName (int format) const
 

Constructor & Destructor Documentation

◆ SequenceConstRef() [1/3]

template<class t_SEQUENCE >
bdlar::SequenceConstRef::SequenceConstRef ( const t_SEQUENCE &  sequence,
typename bsl::enable_if< IsSequence< t_SEQUENCE >::value >::type *  = 0 
)
inlineexplicit

Create SequenceConstRef object that type erases the supplied sequence object.

◆ SequenceConstRef() [2/3]

bdlar::SequenceConstRef::SequenceConstRef ( const void *  objectAddress,
const SequenceConstVtable vtable 
)
inline

Create SequenceConstRef object.

Precondition
The behaviour is undefined unless objectAddress and vtable point to the valid objects.

◆ SequenceConstRef() [3/3]

bdlar::SequenceConstRef::SequenceConstRef ( const SequenceRef object)
inline

Create SequenceConstRef object that wraps the same object as the specified object.

Member Function Documentation

◆ accessAttribute() [1/2]

template<class t_ACCESSOR >
int bdlar::SequenceConstRef::accessAttribute ( t_ACCESSOR &  accessor,
const char *  attributeName,
int  attributeNameLength 
) const
inline

Invoke the specified accessor on the (non-modifiable) attribute of the referred sequence object indicated by the specified attributeName and attributeNameLength, supplying accessor with the corresponding attribute information structure. The supplied accessor must be a callable type that can be called as if it had the following signature:

template <class t_INFO>
int accessor(const ATTRIBUTE& refOrValue, const t_INFO& info);

Return non-zero value if the attribute is not found, and the value returned from the invocation of accessor otherwise.

◆ accessAttribute() [2/2]

template<class t_ACCESSOR >
int bdlar::SequenceConstRef::accessAttribute ( t_ACCESSOR &  accessor,
int  attributeId 
) const
inline

Invoke the specified accessor on the (non-modifiable) attribute of the referred sequence object with the given attributeId, supplying accessor with the corresponding attribute information structure. The supplied accessor must be a callable type that can be called as if it had the following signature:

template <class t_INFO>
int accessor(const ATTRIBUTE& refOrValue, const t_INFO& info);

Return non-zero if the attribute is not found, and the value returned from the invocation of accessor otherwise.

◆ accessAttributes()

template<class t_ACCESSOR >
int bdlar::SequenceConstRef::accessAttributes ( t_ACCESSOR &  accessor) const
inline

Invoke the specified accessor sequentially on each attribute, supplying accessor with the corresponding attribute information structure until such invocation returns a non-zero value. The supplied accessor must be a callable type that can be called as if it had the following signature:

template <class t_INFO>
int accessor(const ATTRIBUTE& refOrValue, const t_INFO& info);

Return the value from the last invocation of accessor (i.e., the invocation that terminated the sequence).

◆ hasAttribute() [1/2]

bool bdlar::SequenceConstRef::hasAttribute ( const char *  attributeName,
int  attributeNameLength 
) const
inline

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

◆ hasAttribute() [2/2]

bool bdlar::SequenceConstRef::hasAttribute ( int  attributeId) const
inline

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

◆ objectAddress()

const void * bdlar::SequenceConstRef::objectAddress ( ) const
inline

Return a pointer to the wrapped object.

◆ vtable()

const SequenceConstVtable * bdlar::SequenceConstRef::vtable ( ) const
inline

Return a pointer to the vtable.

◆ xsdName()

const char * bdlar::SequenceConstRef::xsdName ( int  format) const
inline

Return the bdlat_TypeName::xsdName value for the underlying object.


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