EGeLink


Detailed Description

This header contains the definition of an embeded link, this simple structure can be used to build trees that only have the information of the parent, and in many other basic structures.
Version:
0.0.1
History:


Files

file  eg_elink.h

Data Structures

struct  EGeLink_t
 Define a simple link structure. More...

Defines

#define EGeLinkIsNull(link_pt)
 test wether the given link is null.
#define EGeLinkIsSelf(link_pt)
 test wether the given link point to itself.
#define EGeLinkReset(link_pt)
 Set to null the given link.
#define EGeLinkSet(link_pt, info)
 Set the given pointer to the given value.
#define EGeLinkSetSelf(link_pt)
 Set the link to point to itself.

Typedefs

typedef EGeLink_t EGeLink_t
 Define a simple link structure.


Define Documentation

#define EGeLinkIsNull link_pt   ) 
 

Value:

({\
  (link_pt)->link ? 0 : 1;})
test wether the given link is null.

Parameters:
link_pt pointer to the link to test.
Returns:
one if the pointer is null, zero otherwise.

Definition at line 74 of file eg_elink.h.

#define EGeLinkIsSelf link_pt   ) 
 

Value:

({\
  EGeLink_t*const __lnk__ = (link_pt);\
  __lnk__->link == __lnk__ ? 1 : 0;})
test wether the given link point to itself.

Parameters:
link_pt pointer to the link to test.
Returns:
one if the link point to itself, zero otherwise.

Definition at line 66 of file eg_elink.h.

#define EGeLinkReset link_pt   ) 
 

Value:

({\
  EGeLink_t*const __lnk__ = (link_pt);\
  __lnk__->link = 0;\
  __lnk__;})
Set to null the given link.

Parameters:
link_pt pointer to the structure to set to NULL.
Returns:
the given link pointer.

Definition at line 49 of file eg_elink.h.

#define EGeLinkSet link_pt,
info   ) 
 

Value:

({\
  EGeLink_t*const __lnk__ = (link_pt);\
  __lnk__->link = (EGeLink_t*)(info);\
  __lnk__;})
Set the given pointer to the given value.

Parameters:
link_pt pointer to the link to set.
info information to store.
Returns:
pointer to the given link structure.
Note:
We don't require the given information to be of type (EGeLink_t)*, but to use that information as a link, it should.

Definition at line 84 of file eg_elink.h.

#define EGeLinkSetSelf link_pt   ) 
 

Value:

({\
  EGeLink_t*const __lnk__ = (link_pt);\
  __lnk__->link = __lnk__;})
Set the link to point to itself.

Parameters:
link_pt pointer to the structure to set.
Returns:
the given pointer.

Definition at line 58 of file eg_elink.h.


Typedef Documentation

typedef struct EGeLink_t EGeLink_t
 

Define a simple link structure.


Generated on Mon Jan 30 08:55:31 2006 for EGlib by  doxygen 1.4.5