Scippy

SoPlex

Sequential object-oriented simPlex

IdElement< T > Class Template Reference

Elements for IdLists. More...

#include <idlist.h>

Public Member Functions

Successors and predecessors
IdElement< T > *& next ()
 returns the next element in the IdList (writeable). More...
 
IdElement< T > *const & next () const
 returns the next element in the IdList. More...
 
IdElement< T > *& prev ()
 returns the previous element in the IdList (writeable). More...
 
IdElement< T > *const & prev () const
 returns the previous element in the IdList. More...
 
Construction / destruction
 IdElement ()
 default constructor. More...
 
 IdElement (const T &old)
 copy constructor. More...
 

Private Attributes

Data
IdElement< T > * theprev
 pointer to previous element in the IdList More...
 
IdElement< T > * thenext
 pointer to next element in the IdList More...
 

Detailed Description

template<class T>
class soplex::IdElement< T >

Elements for IdLists.

IdElements are derived from the template parameter class T and can hence be used as such. The additional methods next() and prev() provide access to the links for the list. They may freely be used by the programmer as long as an IdElement is not member of a IdList. In this case, the IdList controls members next() and prev(). However, IdList should provide enough functionality for the user not to require any modification to these members.

Definition at line 61 of file idlist.h.

Constructor & Destructor Documentation

◆ IdElement() [1/2]

IdElement ( )

default constructor.

Definition at line 102 of file idlist.h.

◆ IdElement() [2/2]

IdElement ( const T &  old)

copy constructor.

Only the element itself is copied, while the links to the previous and the next list element are set to zero pointers.

Definition at line 111 of file idlist.h.

Member Function Documentation

◆ next() [1/2]

IdElement< T > *& next ( )

returns the next element in the IdList (writeable).

Definition at line 76 of file idlist.h.

References IdElement< T >::thenext.

◆ next() [2/2]

IdElement< T > *const & next ( ) const

returns the next element in the IdList.

Definition at line 81 of file idlist.h.

References IdElement< T >::thenext.

◆ prev() [1/2]

IdElement< T > *& prev ( )

returns the previous element in the IdList (writeable).

Definition at line 87 of file idlist.h.

References IdElement< T >::theprev.

◆ prev() [2/2]

IdElement< T > *const & prev ( ) const

returns the previous element in the IdList.

Definition at line 92 of file idlist.h.

References IdElement< T >::theprev.

Member Data Documentation

◆ thenext

IdElement<T>* thenext
private

pointer to next element in the IdList

Definition at line 67 of file idlist.h.

Referenced by IdElement< T >::next().

◆ theprev

IdElement<T>* theprev
private

pointer to previous element in the IdList

Definition at line 66 of file idlist.h.

Referenced by IdElement< T >::prev().