...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
B | is a type that models Buffer. |
T | is the value type of B. |
t | is an object of type T. |
Member | Description |
value_type | The type of object stored in the Buffer. The value type must be Assignable. |
size_type | An unsigned integral type for representing the number of objects in the Buffer. |
void push(const T& t) | Inserts t into the Buffer. size() will be incremented by one. |
void pop() | Removes an object from the Buffer. size() will be decremented by one. Precondition: empty() is false. |
T& top() | Returns a mutable reference to some object in the Buffer. Precondition: empty() is false. |
const T& top() const | Returns a const reference to some object in the Buffer. Precondition: empty() is false. |
size_type size() const | Returns the number of objects in the Buffer. Invariant: size() >= 0. |
bool empty() const | Equivalent to b.size() == 0. |
Copyright © 2000-2001 | Jeremy Siek, Indiana University and C++ Library & Compiler Group/SGI (jsiek@engr.sgi.com) |