Zero  0.1.0
Public Member Functions | Private Attributes | Friends | List of all members
w_link_t Class Reference

Link structure for membership in any class to be put on a w_list*. More...

#include <w_list.h>

Public Member Functions

 w_link_t ()
 
 ~w_link_t ()
 
 w_link_t (const w_link_t &)
 
w_link_toperator= (const w_link_t &)
 
void attach (w_link_t *prev_link)
 
void check ()
 
w_link_tdetach ()
 remove containing object from the list. More...
 
w_list_base_tmember_of () const
 
w_link_tnext () const
 
w_link_tprev () const
 

Private Attributes

w_list_base_t_list
 
w_link_t_next
 
w_link_t_prev
 

Friends

class w_list_base_t
 

Detailed Description

Link structure for membership in any class to be put on a w_list*.

Classes that will always be on one or more lists may contain a member of type w_link_t. This contains the next and prev pointers for putting the class instance into a doubly-linked list.

Embedding the w_link_t structures in the objects to be linked together into a list avoids heap activity for list insertion and removal.

Constructor & Destructor Documentation

§ w_link_t() [1/2]

w_link_t::w_link_t ( )
inline

§ ~w_link_t()

w_link_t::~w_link_t ( )
inline

§ w_link_t() [2/2]

w_link_t::w_link_t ( const w_link_t )
inline

Member Function Documentation

§ attach()

void w_link_t::attach ( w_link_t prev_link)

insert object containing this link into the list of which prev_link is a member. Insert after prev_link.

§ check()

void w_link_t::check ( )
inline

§ detach()

w_link_t * w_link_t::detach ( )

remove containing object from the list.

§ member_of()

w_list_base_t * w_link_t::member_of ( ) const
inline

§ next()

w_link_t * w_link_t::next ( ) const
inline

§ operator=()

w_link_t & w_link_t::operator= ( const w_link_t )
inline

§ prev()

w_link_t * w_link_t::prev ( ) const
inline

Friends And Related Function Documentation

§ w_list_base_t

friend class w_list_base_t
friend

Member Data Documentation

§ _list

w_list_base_t* w_link_t::_list
private

§ _next

w_link_t* w_link_t::_next
private

§ _prev

w_link_t* w_link_t::_prev
private

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