8#ifndef INCLUDED_S_BALTST_MYINTENUMERATION
9#define INCLUDED_S_BALTST_MYINTENUMERATION
43#include <bslalg_typetraits.h>
57#include <bsl_iosfwd.h>
58#include <bsl_limits.h>
62namespace s_baltst {
class MyIntEnumeration; }
63namespace s_baltst {
class MyIntEnumerationRecord; }
100#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
101 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
120#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
121 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
150 bsl::ostream&
print(bsl::ostream& stream,
152 int spacesPerLevel = 4)
const;
155 const int&
toInt()
const;
245#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
246 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
262#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
263 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
280 template <
typename t_MANIPULATOR>
289 template <
typename t_MANIPULATOR>
298 template <
typename t_MANIPULATOR>
321 bsl::ostream&
print(bsl::ostream& stream,
323 int spacesPerLevel = 4)
const;
331 template <
typename t_ACCESSOR>
339 template <
typename t_ACCESSOR>
348 template <
typename t_ACCESSOR>
351 int nameLength)
const;
403: d_value(original.d_value)
423 d_value = rhs.d_value;
448 int spacesPerLevel)
const
467template <
typename t_MANIPULATOR>
480template <
typename t_MANIPULATOR>
483 enum { NOT_FOUND = -1 };
494template <
typename t_MANIPULATOR>
496 t_MANIPULATOR& manipulator,
500 enum { NOT_FOUND = -1 };
504 if (0 == attributeInfo) {
518template <
typename t_ACCESSOR>
531template <
typename t_ACCESSOR>
534 enum { NOT_FOUND = -1 };
545template <
typename t_ACCESSOR>
547 t_ACCESSOR& accessor,
549 int nameLength)
const
551 enum { NOT_FOUND = -1 };
555 if (0 == attributeInfo) {
577 return lhs.d_value == rhs.d_value;
585 return lhs.d_value !=
rhs.d_value;
590 bsl::ostream& stream,
593 return rhs.print(stream, 0, -1);
601 return lhs.value() ==
rhs.value();
614 bsl::ostream& stream,
617 return rhs.print(stream, 0, -1);
Definition s_baltst_myintenumeration.h:197
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
@ NUM_ATTRIBUTES
Definition s_baltst_myintenumeration.h:209
static const char CLASS_NAME[]
Definition s_baltst_myintenumeration.h:217
int manipulateAttributes(t_MANIPULATOR &manipulator)
Definition s_baltst_myintenumeration.h:468
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_myintenumeration.h:219
MyIntEnumeration & value()
Definition s_baltst_myintenumeration.h:512
int manipulateAttribute(t_MANIPULATOR &manipulator, int id)
Definition s_baltst_myintenumeration.h:481
MyIntEnumerationRecord & operator=(const MyIntEnumerationRecord &rhs)
Assign to this object the value of the specified rhs object.
~MyIntEnumerationRecord()
Destroy this object.
@ ATTRIBUTE_ID_VALUE
Definition s_baltst_myintenumeration.h:205
int accessAttributes(t_ACCESSOR &accessor) const
Definition s_baltst_myintenumeration.h:519
@ ATTRIBUTE_INDEX_VALUE
Definition s_baltst_myintenumeration.h:213
MyIntEnumerationRecord(const MyIntEnumerationRecord &original)
int accessAttribute(t_ACCESSOR &accessor, int id) const
Definition s_baltst_myintenumeration.h:532
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
Definition s_baltst_myintenumeration.h:70
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition s_baltst_myintenumeration.h:446
friend bool operator==(const MyIntEnumeration &lhs, const MyIntEnumeration &rhs)
static const char CLASS_NAME[]
Definition s_baltst_myintenumeration.h:84
const int & toInt() const
Convert this value to int.
Definition s_baltst_myintenumeration.h:454
static int checkRestrictions(const int &value)
friend bool operator!=(const MyIntEnumeration &lhs, const MyIntEnumeration &rhs)
~MyIntEnumeration()
Destroy this object.
Definition s_baltst_myintenumeration.h:415
int fromInt(const int &value)
Definition s_baltst_myintenumeration.h:434
MyIntEnumeration & operator=(const MyIntEnumeration &rhs)
Assign to this object the value of the specified rhs object.
Definition s_baltst_myintenumeration.h:421
void reset()
Definition s_baltst_myintenumeration.h:428
int BaseType
Definition s_baltst_myintenumeration.h:81
MyIntEnumeration()
Definition s_baltst_myintenumeration.h:396
static const int VALUE1
Definition s_baltst_myintenumeration.h:86
static const int VALUE2
Definition s_baltst_myintenumeration.h:88
#define BDLAT_DECL_CUSTOMIZEDTYPE_WITH_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:344
#define BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:294
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT_RCSID(tag, str)
BSLS_IDENT_RCSID() - insert ident str (specific to platform/compiler)
Definition bsls_ident.h:244
#define BSLS_IDENT_PRAGMA_ONCE
BSLS_IDENT_PRAGMA_ONCE - macro to avoid multiple inclusion
Definition bsls_ident.h:263
void reset(TYPE *object)
Reset the value of the specified object to its default value.
bsl::ostream & print(bsl::ostream &stream, const TYPE &object, int level=0, int spacesPerLevel=4)
Definition bdlb_printmethods.h:725
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
Definition s_baltst_address.h:66
bsl::ostream & operator<<(bsl::ostream &stream, const BasicSchemaAnnotationElement &rhs)
bool operator==(const BasicSchemaAnnotationElement &lhs, const BasicSchemaAnnotationElement &rhs)
bool operator!=(const BasicSchemaAnnotationElement &lhs, const BasicSchemaAnnotationElement &rhs)
Definition bdlat_attributeinfo.h:139
int d_id
Definition bdlat_attributeinfo.h:142