Loading...
Searching...
No Matches
ListItem< T > Class Template Reference

`#include <ftmpl_list.h>`

## Public Member Functions

| ListItem (const ListItem< T > &)
| ListItem (const T &, ListItem< T > *, ListItem< T > *)
| ListItem (T *, ListItem< T > *, ListItem< T > *)
| ~ListItem ()
ListItem< T > & | operator= (const ListItem< T > &)
ListItem< T > * | getNext ()
ListItem< T > * | getPrev ()
T & | getItem ()
void | print (OSTREAM &)

## Private Attributes

ListItem * | next
ListItem * | prev
T * | item

## Friends

class | ListIterator< T >
class | List< T >

## Detailed Description

template<class T>
class ListItem< T >

Definition at line 28 of file ftmpl_list.h.

## Constructor & Destructor Documentation

## ListItem() [1/3]

template<class T>

ListItem< T >::ListItem | ( | const ListItem< T > & | i | ) |

Definition at line 6 of file ftmpl_list.cc.

{
next = i.next;
prev = i.prev;
item = i.item;
}
ListItem
Definition ftmpl_list.h:29
ListItem::next
ListItem * next
Definition ftmpl_list.h:31
ListItem::prev
ListItem * prev
Definition ftmpl_list.h:32
ListItem::item
T * item
Definition ftmpl_list.h:33

## ListItem() [2/3]

template<class T>

ListItem< T >::ListItem | ( | const T & | t,
|  | ListItem< T > * | n,
|  | ListItem< T > * | p )

Definition at line 15 of file ftmpl_list.cc.

{
next = n;
prev = p;
item = new T( t );
}
T
STATIC_VAR jList * T
Definition janet.cc:30

## ListItem() [3/3]

template<class T>

ListItem< T >::ListItem | ( | T * | t,
|  | ListItem< T > * | n,
|  | ListItem< T > * | p )

Definition at line 24 of file ftmpl_list.cc.

{
next = n;
prev = p;
item = t;
}

## ~ListItem()

template<class T>

ListItem< T >::~ListItem | ( |  | ) |

Definition at line 33 of file ftmpl_list.cc.

{
delete item;
}

## Member Function Documentation

## getItem()

template<class T>

T & ListItem< T >::getItem | ( |  | ) |

Definition at line 67 of file ftmpl_list.cc.

{
return *item;
}

## getNext()

template<class T>

ListItem< T > * ListItem< T >::getNext | ( |  | ) |

Definition at line 53 of file ftmpl_list.cc.

{
return next;
}

## getPrev()

template<class T>

ListItem< T > * ListItem< T >::getPrev | ( |  | ) |

Definition at line 60 of file ftmpl_list.cc.

{
return prev;
}

## operator=()

template<class T>

ListItem< T > & ListItem< T >::operator= | ( | const ListItem< T > & | i | ) |

Definition at line 40 of file ftmpl_list.cc.

{
if ( this != &i )
{
next = i.next;
prev = i.prev;
item = i.item;
}
return *this;
}

## print()

template<class T>

void ListItem< T >::print | ( | OSTREAM & | os | ) |

Definition at line 74 of file ftmpl_list.cc.

{
if ( item )
os << *item;
else
os << "(no item)";
}

## Friends And Related Symbol Documentation

## List< T >

template<class T>

friend class List< T >

friend

Definition at line 44 of file ftmpl_list.h.

## ListIterator< T >

template<class T>

friend class ListIterator< T >

friend

Definition at line 44 of file ftmpl_list.h.

## Field Documentation

## item

template<class T>

T* ListItem< T >::item

private

Definition at line 33 of file ftmpl_list.h.

## next

template<class T>

ListItem* ListItem< T >::next

private

Definition at line 31 of file ftmpl_list.h.

## prev

template<class T>

ListItem* ListItem< T >::prev

private

Definition at line 32 of file ftmpl_list.h.

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

- factory/include/factory/templates/ftmpl_list.h
- factory/templates/ftmpl_list.cc