8#ifndef INCLUDED_S_BALTST_EMPLOYEE
9#define INCLUDED_S_BALTST_EMPLOYEE
43#include <bslalg_typetraits.h>
57#include <bsl_string.h>
61#include <bsl_iosfwd.h>
62#include <bsl_limits.h>
66namespace bslma {
class Allocator; }
68namespace s_baltst {
class Employee; }
134#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
135 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
159#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
160 && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
177 template <
typename t_MANIPULATOR>
186 template <
typename t_MANIPULATOR>
195 template <
typename t_MANIPULATOR>
225 bsl::ostream&
print(bsl::ostream& stream,
227 int spacesPerLevel = 4)
const;
235 template <
typename t_ACCESSOR>
243 template <
typename t_ACCESSOR>
252 template <
typename t_ACCESSOR>
255 int nameLength)
const;
275 return lhs.name() == rhs.name() &&
276 lhs.homeAddress() == rhs.homeAddress() &&
277 lhs.age() == rhs.age();
283 return !(lhs == rhs);
290 return rhs.print(stream, 0, -1);
314template <
typename t_MANIPULATOR>
337template <
typename t_MANIPULATOR>
340 enum { NOT_FOUND = -1 };
357template <
typename t_MANIPULATOR>
359 t_MANIPULATOR& manipulator,
363 enum { NOT_FOUND = -1 };
367 if (0 == attributeInfo) {
383 return d_homeAddress;
393template <
typename t_ACCESSOR>
416template <
typename t_ACCESSOR>
419 enum { NOT_FOUND = -1 };
436template <
typename t_ACCESSOR>
438 t_ACCESSOR& accessor,
440 int nameLength)
const
442 enum { NOT_FOUND = -1 };
446 if (0 == attributeInfo) {
462 return d_homeAddress;
Definition bslstl_string.h:1252
Definition bslma_allocator.h:545
Definition s_baltst_address.h:73
Definition s_baltst_employee.h:75
int & age()
Return a reference to the modifiable "Age" attribute of this object.
Definition s_baltst_employee.h:387
Employee(const Employee &original, bslma::Allocator *basicAllocator=0)
friend bool operator!=(const Employee &lhs, const Employee &rhs)
Returns !(lhs == rhs)
Definition s_baltst_employee.h:281
static const char CLASS_NAME[]
Definition s_baltst_employee.h:101
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
@ ATTRIBUTE_INDEX_AGE
Definition s_baltst_employee.h:97
@ ATTRIBUTE_INDEX_HOME_ADDRESS
Definition s_baltst_employee.h:96
@ ATTRIBUTE_INDEX_NAME
Definition s_baltst_employee.h:95
int accessAttribute(t_ACCESSOR &accessor, int id) const
Definition s_baltst_employee.h:417
static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]
Definition s_baltst_employee.h:103
int manipulateAttributes(t_MANIPULATOR &manipulator)
Definition s_baltst_employee.h:315
static const bdlat_AttributeInfo * lookupAttributeInfo(const char *name, int nameLength)
static const bdlat_AttributeInfo * lookupAttributeInfo(int id)
Employee(bslma::Allocator *basicAllocator=0)
Employee & operator=(const Employee &rhs)
Assign to this object the value of the specified rhs object.
~Employee()
Destroy this object.
friend bool operator==(const Employee &lhs, const Employee &rhs)
Definition s_baltst_employee.h:273
int accessAttributes(t_ACCESSOR &accessor) const
Definition s_baltst_employee.h:394
@ NUM_ATTRIBUTES
Definition s_baltst_employee.h:91
@ ATTRIBUTE_ID_AGE
Definition s_baltst_employee.h:87
@ ATTRIBUTE_ID_NAME
Definition s_baltst_employee.h:85
@ ATTRIBUTE_ID_HOME_ADDRESS
Definition s_baltst_employee.h:86
s_baltst::Address & homeAddress()
Definition s_baltst_employee.h:381
bsl::string & name()
Definition s_baltst_employee.h:375
int manipulateAttribute(t_MANIPULATOR &manipulator, int id)
Definition s_baltst_employee.h:338
friend bsl::ostream & operator<<(bsl::ostream &stream, const Employee &rhs)
Definition s_baltst_employee.h:288
#define BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(ClassName)
Definition bdlat_typetraits.h:301
#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
Definition baljsn_encoder_testtypes.h:76
Definition s_baltst_address.h:66
Definition bdlat_attributeinfo.h:139
int d_id
Definition bdlat_attributeinfo.h:142
Definition bdlat_typetraits.h:146