Free Electron
|
A view state into an fe::List <> More...
#include <List.h>
Public Member Functions | |
Context (const Context &operand) | |
Copy constructor. More... | |
Context & | operator= (Context &operand) |
Copy state from another context. More... | |
void | init (void) |
Reinitialize state. More... | |
NodeCore * | current (void) |
Get current position on list. More... | |
void | setCurrent (NodeCore *set) |
Set current position on list. More... | |
void | setAtTailNull (BWORD set) |
Set whether context is after the tail. More... | |
BWORD | isAtTailNull (void) const |
Get whether context is after the tail. More... | |
Private Member Functions | |
void | checkValid (void) |
Private Attributes | |
NodeCore * | m_pCurrent |
BWORD | m_at_tail |
A view state into an fe::List <>
Do not access Context members except indirectly through List.
If you like iterators better, use fe::List::Iterator which wraps an fe::List::Context.
Context is similar to an iterator except that it does not contain a pointer to an List<>. All access to an List<> is done directly through List<> member functions with an Context argument. This means that Context is generic and does not need to be templated. The context is very lightweight and has no template instantiation. No special permissions are needed for context to list accesses. Your code always explicitly says which list it is accessing.
|
inline |
Copy constructor.
|
inline |
Get current position on list.
References fe::checkValid().
Referenced by fe::List< fe::sp< fe::Component > >::current(), fe::List< fe::sp< fe::Component > >::deleteCurrent(), fe::ListCore::isAtHeadNull(), fe::ListCore::isAtTailNull(), operator=(), fe::List< fe::sp< fe::Component > >::postDecrement(), fe::List< fe::sp< fe::Component > >::postIncrement(), fe::List< fe::sp< fe::Component > >::removeCurrent(), and fe::List< fe::sp< fe::Component > >::replaceCurrent().
|
inline |
Reinitialize state.
|
inline |
Get whether context is after the tail.
References fe::checkValid().
Referenced by fe::ListCore::isAtHeadNull(), fe::ListCore::isAtTailNull(), and operator=().
Copy state from another context.
References current(), and isAtTailNull().
|
inline |
Set whether context is after the tail.
Referenced by fe::List< fe::sp< fe::Component > >::postDecrement().
|
inline |