Itasca C++ Interface
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
itascaxd::LinkType< T > Struct Template Reference

Interface for LinkType<> objects, POD that contain both the pointer to the next object and an index for reference within the next object. A LinkType<> object is used to simplify linked-lists that need to refer both to the destination object and to a reference index within that destination object. The classic example is a list of all Zones connected to a GridPoint, each connection on the list needs to know the index of the GridPoint in the Zone following. More...

#include <ilinktype.h>

Public Member Functions

 LinkType ()
 default constructor
 
 LinkType (T *t, uint32 i)
 contructor takes a pointer /a t /a to the object T and a index /a i /a.
 
template<class C >
 LinkType (const LinkType< C > &l)
 copy constructor
 
template<class C >
const LinkType< T > & operator= (const LinkType< C > &l)
 copy operator
 
bool operator== (const LinkType &l) const
 Equal to operator.
 
bool operator!= (const LinkType &l) const
 Not equal to operator.
 
T * operator-> ()
 returns the T object pointer
 
const T * operator-> () const
 returns the T const object pointer
 
uint32 ind () const
 returns the object index
 
T * pnt ()
 returns the T object pointer, see operator->()
 
const T * pnt () const
 returns the T const object pointer, see operator->()
 
T * ptr ()
 
const T * ptr () const
 

Public Attributes

T * pnt_
 object pointer
 
uint32 ind_
 reference index
 

Detailed Description

template<class T>
struct itascaxd::LinkType< T >

Interface for LinkType<> objects, POD that contain both the pointer to the next object and an index for reference within the next object. A LinkType<> object is used to simplify linked-lists that need to refer both to the destination object and to a reference index within that destination object. The classic example is a list of all Zones connected to a GridPoint, each connection on the list needs to know the index of the GridPoint in the Zone following.


The documentation for this struct was generated from the following file: