Loading...
Searching...
No Matches
CxxTest::Link Class Referenceabstract

`#include <LinkedList.h>`

## Public Member Functions

| 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 Member Functions

| Link (const Link &)
Link & | operator= (const Link &)

## Private Attributes

Link * | _next
Link * | _prev
bool | _active

## Detailed Description

Definition at line 31 of file LinkedList.h.

## Constructor & Destructor Documentation

## Link() [1/2]

CxxTest::Link::Link | ( |  | ) |

Definition at line 82 of file LinkedList.cpp.

:
_next( 0 ),
_prev( 0 ),
_active( true )
{
}
CxxTest::Link::_active
bool _active
Definition LinkedList.h:57
CxxTest::Link::_prev
Link * _prev
Definition LinkedList.h:56
CxxTest::Link::_next
Link * _next
Definition LinkedList.h:55

## ~Link()

CxxTest::Link::~Link | ( |  | ) |

virtual

Definition at line 89 of file LinkedList.cpp.

{
}

## Link() [2/2]

CxxTest::Link::Link | ( | const Link & |  | ) |

private

## Member Function Documentation

## active()

bool CxxTest::Link::active | ( |  | ) | const

Definition at line 93 of file LinkedList.cpp.

{
return _active;
}

## attach()

void CxxTest::Link::attach | ( | List & | l | ) |

Definition at line 145 of file LinkedList.cpp.

{
if ( l._tail )
l._tail->_next = this;
_prev = l._tail;
_next = 0;
if ( l._head == 0 )
l._head = this;
l._tail = this;
}
l
int l
Definition cfEzgcd.cc:100

## detach()

void CxxTest::Link::detach | ( | List & | l | ) |

Definition at line 158 of file LinkedList.cpp.

{
if ( _prev )
_prev->_next = _next;
else
l._head = _next;
if ( _next )
_next->_prev = _prev;
else
l._tail = _prev;
}

## justNext()

Link * CxxTest::Link::justNext | ( |  | ) |

Definition at line 103 of file LinkedList.cpp.

{
return _next;
}

## justPrev()

Link * CxxTest::Link::justPrev | ( |  | ) |

Definition at line 108 of file LinkedList.cpp.

{
return _prev;
}

## next() [1/2]

Link * CxxTest::Link::next | ( |  | ) |

Definition at line 113 of file LinkedList.cpp.

{
Link *l = _next;
while ( l && !l->_active )
l = l->_next;
return l;
}
CxxTest::Link::Link
Link()
Definition LinkedList.cpp:82

## next() [2/2]

const Link * CxxTest::Link::next | ( |  | ) | const

Definition at line 129 of file LinkedList.cpp.

{
Link *l = _next;
while ( l && !l->_active )
l = l->_next;
return l;
}

## operator=()

Link & CxxTest::Link::operator= | ( | const Link & |  | ) |

private

## prev() [1/2]

Link * CxxTest::Link::prev | ( |  | ) |

Definition at line 121 of file LinkedList.cpp.

{
Link *l = _prev;
while ( l && !l->_active )
l = l->_prev;
return l;
}

## prev() [2/2]

const Link * CxxTest::Link::prev | ( |  | ) | const

Definition at line 137 of file LinkedList.cpp.

{
Link *l = _prev;
while ( l && !l->_active )
l = l->_prev;
return l;
}

## setActive()

void CxxTest::Link::setActive | ( | bool | value = true | ) |

Definition at line 98 of file LinkedList.cpp.

{
_active = value;
}

## setUp()

virtual bool CxxTest::Link::setUp | ( |  | ) |

pure virtual

Implemented in CxxTest::DummySuiteDescription, CxxTest::DummyTestDescription, CxxTest::DummyWorldDescription, CxxTest::DynamicSuiteDescription< S >, CxxTest::GlobalFixture, CxxTest::RealTestDescription, CxxTest::RealWorldDescription, CxxTest::StaticSuiteDescription, and GlobalPrintingFixture.

## tearDown()

virtual bool CxxTest::Link::tearDown | ( |  | ) |

pure virtual

Implemented in CxxTest::DummySuiteDescription, CxxTest::DummyTestDescription, CxxTest::DummyWorldDescription, CxxTest::DynamicSuiteDescription< S >, CxxTest::GlobalFixture, CxxTest::RealTestDescription, CxxTest::RealWorldDescription, CxxTest::StaticSuiteDescription, and GlobalPrintingFixture.

## Field Documentation

## _active

bool CxxTest::Link::_active

private

Definition at line 57 of file LinkedList.h.

## _next

Link* CxxTest::Link::_next

private

Definition at line 55 of file LinkedList.h.

## _prev

Link* CxxTest::Link::_prev

private

Definition at line 56 of file LinkedList.h.

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

- libpolys/tests/cxxtest/LinkedList.h
- libpolys/tests/cxxtest/LinkedList.cpp