text
stringlengths
0
2.2M
e_REVERSE_END = 64,
e_CONST_REVERSE_END = 128,
e_SIZE = 256,
};
// DATA
int d_array[2]; // storage of the container
mutable int d_functionCalled; //
public:
// PUBLIC TYPES
typedef int *iterator;
typedef int const *const_iterator;
typedef bsl::reverse_iterator<iterator> reverse_iterator;
typedef bsl::reverse_iterator<const_iterator> const_reverse_iterator;
// CREATORS
AccessTestContainer();
// Create a 'AccessTestContainer' object.
// MANIPULATORS
iterator begin();
// Return the basic iterator providing modifiable access to the
// first valid element of this object.
iterator end();
// Return the basic iterator providing modifiable access to the
// position one after the last valid element of this object.
reverse_iterator rbegin();
// Return the reverse iterator providing modifiable access to the
// last valid element of this object.
reverse_iterator rend();
// Return the reverse iterator providing modifiable access to the
// position one before the first valid element of this object.
// ACCESSORS
const_iterator begin() const;
// Return the basic iterator providing non-modifiable access to the
// first valid element of this object.
const_iterator end() const;
// Return the basic iterator providing non-modifiable access to the
// position one after the last valid element of this object.
const_reverse_iterator rbegin() const;
// Return the reverse iterator providing non-modifiable access to
// the last valid element of this object.
const_reverse_iterator rend() const;
// Return the reverse iterator providing non-modifiable access to
// the position one before the first valid element of this object.
size_t size() const;
// Return the length of this container.
int functionCalled() const;
bool beginCalled() const;
bool constBeginCalled() const;
bool reverseBeginCalled() const;
bool constReverseBeginCalled() const;
bool endCalled() const;
bool constEndCalled() const;
bool reverseEndCalled() const;
bool constReverseEndCalled() const;
bool sizeCalled() const;
};
// -------------------
// AccessTestContainer
// -------------------
// CREATORS
AccessTestContainer::AccessTestContainer()
: d_functionCalled(0)
{
d_array[0] = 0;
d_array[1] = 1;
}
// MANIPULATORS
AccessTestContainer::iterator
AccessTestContainer::begin()
{
d_functionCalled |= e_BEGIN;
return d_array;
}
AccessTestContainer::iterator
AccessTestContainer::end()
{
d_functionCalled |= e_END;
return d_array + 1;
}
AccessTestContainer::reverse_iterator
AccessTestContainer::rbegin()
{
d_functionCalled |= e_REVERSE_BEGIN;