BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlt::DayOfWeekSet_Iter Class Reference

#include <bdlt_dayofweekset.h>

Public Types

typedef bsl::bidirectional_iterator_tag iterator_category
 
typedef DayOfWeek::Enum value_type
 
typedef bsl::ptrdiff_t difference_type
 
typedef const DayOfWeek::Enumpointer
 
typedef const DayOfWeek::Enumreference
 

Public Member Functions

 DayOfWeekSet_Iter ()
 Create a default (invalid) iterator.
 
 DayOfWeekSet_Iter (int data, int index)
 
 DayOfWeekSet_Iter (const DayOfWeekSet_Iter &original)
 
 ~DayOfWeekSet_Iter ()
 Destroy this iterator.
 
DayOfWeekSet_Iteroperator= (const DayOfWeekSet_Iter &rhs)
 
DayOfWeekSet_Iteroperator++ ()
 
DayOfWeekSet_Iter operator++ (int)
 
DayOfWeekSet_Iteroperator-- ()
 
DayOfWeekSet_Iter operator-- (int)
 
const DayOfWeek::Enumoperator* () const
 

Public Attributes

unsigned char d_data
 
signed char d_index
 

Static Public Attributes

static const DayOfWeek::Enum s_dayOfWeekArray [9]
 

Friends

bool operator== (const DayOfWeekSet_Iter &, const DayOfWeekSet_Iter &)
 

Detailed Description

Implementation of standard bidirectional iterator for DayOfWeekSet. Any modification of a DayOfWeekSet will invalidate any iterators referring to that DayOfWeekSet.

Member Typedef Documentation

◆ difference_type

◆ iterator_category

typedef bsl::bidirectional_iterator_tag bdlt::DayOfWeekSet_Iter::iterator_category

◆ pointer

◆ reference

◆ value_type

Constructor & Destructor Documentation

◆ DayOfWeekSet_Iter() [1/3]

bdlt::DayOfWeekSet_Iter::DayOfWeekSet_Iter ( )
inline

◆ DayOfWeekSet_Iter() [2/3]

bdlt::DayOfWeekSet_Iter::DayOfWeekSet_Iter ( int  data,
int  index 
)

Create an iterator using the specified data and index. If index is 1, this iterator references the first valid element of data; if index is 8, then this iterator references one past the last possible element in data. The behavior is undefined unless 0 == (data & 1), index >= 0, and index <= 8.

◆ DayOfWeekSet_Iter() [3/3]

bdlt::DayOfWeekSet_Iter::DayOfWeekSet_Iter ( const DayOfWeekSet_Iter original)
inline

Create an iterator having the value of the specified original iterator.

◆ ~DayOfWeekSet_Iter()

bdlt::DayOfWeekSet_Iter::~DayOfWeekSet_Iter ( )
inline

Member Function Documentation

◆ operator*()

const DayOfWeek::Enum & bdlt::DayOfWeekSet_Iter::operator* ( ) const
inline

Return a reference providing non-modifiable access to the day of week value referenced by this iterator. The behavior is undefined unless the iterator refers to a valid day of the week, specifically, the behavior is undefined if *this == end().

◆ operator++() [1/2]

DayOfWeekSet_Iter & bdlt::DayOfWeekSet_Iter::operator++ ( )

Advance this iterator to the next valid data element, and return a reference providing modifiable access to this iterator. If there is no next valid data element, this iterator will be set equal to end().

◆ operator++() [2/2]

DayOfWeekSet_Iter bdlt::DayOfWeekSet_Iter::operator++ ( int  )
inline

Advance this iterator to the next valid data element, and return by value the value of this iterator before it was incremented. If there is no next valid data element, this iterator will be set equal to end().

◆ operator--() [1/2]

DayOfWeekSet_Iter & bdlt::DayOfWeekSet_Iter::operator-- ( )

Regress this iterator to the previous valid data element, and return a reference providing modifiable access to this iterator. If there is no preceding data element, the value of reverse_iterator(*this) will be rend().

◆ operator--() [2/2]

DayOfWeekSet_Iter bdlt::DayOfWeekSet_Iter::operator-- ( int  )
inline

Regress this iterator to the previous valid data element, and return by value the value of this iterator before it was decremented. If there is no preceding data element, the value of reverse_iterator(*this) will be rend().

◆ operator=()

DayOfWeekSet_Iter & bdlt::DayOfWeekSet_Iter::operator= ( const DayOfWeekSet_Iter rhs)
inline

Assign to this iterator the value of the specified rhs iterator, and return a reference providing modifiable access to this iterator.

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const DayOfWeekSet_Iter ,
const DayOfWeekSet_Iter  
)
friend

Return true if the specified lhs and rhs iterators have the same value, and false otherwise. Two iterators have the same value if they refer to data at the same index position. The behavior is undefined unless lhs and rhs both reference into the same set of data.

Member Data Documentation

◆ d_data

unsigned char bdlt::DayOfWeekSet_Iter::d_data

◆ d_index

signed char bdlt::DayOfWeekSet_Iter::d_index

◆ s_dayOfWeekArray

const DayOfWeek::Enum bdlt::DayOfWeekSet_Iter::s_dayOfWeekArray[9]
static

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