Loading...
Searching...
No Matches
LinkedList.h
Go to the documentation of this file.
#ifndef __cxxtest__LinkedList_h__
#define __cxxtest__LinkedList_h__
#include <cxxtest/Flags.h>
namespace CxxTest
{
struct List;
class Link;
struct List
{
Link *_head;
Link *_tail;
void initialize();
Link *head();
const Link *head() const;
Link *tail();
const Link *tail() const;
bool empty() const;
unsigned size() const;
Link *nth( unsigned n );
void activateAll();
void leaveOnly( const Link &link );
};
class Link
{
public:
Link();
virtual ~Link();
bool active() const;
void setActive( bool value = true );
Link *justNext();
Link *justPrev();
Link *next();
Link *prev();
const Link *next() const;
const Link *prev() const;
virtual bool setUp() = 0;
virtual bool tearDown() = 0;
void attach( List &l );
void detach( List &l );
private:
Link *_next;
Link *_prev;
bool _active;
Link( const Link & );
Link &operator=( const Link & );
};
}
#endif // __cxxtest__LinkedList_h__
Flags.h
l
int l
Definition cfEzgcd.cc:100
CxxTest::Link
Definition LinkedList.h:32
CxxTest::Link::active
bool active() const
Definition LinkedList.cpp:93
CxxTest::Link::next
Link * next()
Definition LinkedList.cpp:113
CxxTest::Link::_active
bool _active
Definition LinkedList.h:57
CxxTest::Link::_prev
Link * _prev
Definition LinkedList.h:56
CxxTest::Link::~Link
virtual ~Link()
Definition LinkedList.cpp:89
CxxTest::Link::setActive
void setActive(bool value=true)
Definition LinkedList.cpp:98
CxxTest::Link::justNext
Link * justNext()
Definition LinkedList.cpp:103
CxxTest::Link::setUp
virtual bool setUp()=0
CxxTest::Link::justPrev
Link * justPrev()
Definition LinkedList.cpp:108
CxxTest::Link::_next
Link * _next
Definition LinkedList.h:55
CxxTest::Link::detach
void detach(List &l)
Definition LinkedList.cpp:158
CxxTest::Link::attach
void attach(List &l)
Definition LinkedList.cpp:145
CxxTest::Link::Link
Link(const Link &)
CxxTest::Link::Link
Link()
Definition LinkedList.cpp:82
CxxTest::Link::prev
Link * prev()
Definition LinkedList.cpp:121
CxxTest::Link::tearDown
virtual bool tearDown()=0
CxxTest::Link::operator=
Link & operator=(const Link &)
CxxTest
Definition Descriptions.cpp:7
CxxTest::List
Definition LinkedList.h:12
CxxTest::List::head
Link * head()
Definition LinkedList.cpp:16
CxxTest::List::size
unsigned size() const
Definition LinkedList.cpp:53
CxxTest::List::leaveOnly
void leaveOnly(const Link &link)
Definition LinkedList.cpp:75
CxxTest::List::empty
bool empty() const
Definition LinkedList.cpp:48
CxxTest::List::initialize
void initialize()
Definition LinkedList.cpp:11
CxxTest::List::activateAll
void activateAll()
Definition LinkedList.cpp:69
CxxTest::List::_head
Link * _head
Definition LinkedList.h:13
CxxTest::List::nth
Link * nth(unsigned n)
Definition LinkedList.cpp:61
CxxTest::List::_tail
Link * _tail
Definition LinkedList.h:14
CxxTest::List::tail
Link * tail()
Definition LinkedList.cpp:32