LNodeInfo

Description Data associated to nodes of a graph
Header file LNodeInfo.h
Author Stefano Emiliozzi, Camil Demetrescu
Created Jan 17, 2003
Last updated Sep 26, 2003

 

Contents


Introduction

The component LNodeInfo is used to associate data to nodes of a graph; each graph is represented using component LGraph and can have multiple LNodeInfo associated, but a LNodeInfo can be associated only to one LGraph.


Interface

Constants

LNodeInfo_ID
LNodeInfo_BASE_TYPE_MISMATCH

Types

LNodeInfo
void (*LNodeInfo_THandler)(LNodeInfo* This, LGraph_TNode* inNode)

Functions

LNodeInfo*  LNodeInfo_New                   (LGraph* inGraph, LType_TType inType)
LNodeInfo* LNodeInfo_NewCustom (LGraph* inGraph, ui4 inItemSize)
void LNodeInfo_Delete (LNodeInfo** ThisA)
void LNodeInfo_AssignItemAt (LNodeInfo* This, LGraph_TNode* inNode, const void* inItem)
Bool LNodeInfo_FetchItemAt (LNodeInfo* This, LGraph_TNode* inNode, void* outItem)
void LNodeInfo_InstallDelNodeHandler (LNodeInfo* This, LNodeInfo_THandler inDealloc)
void LNodeInfo_InstallNewNodeHandler (LNodeInfo* This, LNodeInfo_THandler inAlloc)
LType_TType LNodeInfo_GetBaseType (LNodeInfo* This)
ui4 LNodeInfo_GetUsedMem (LNodeInfo* This)

Macros

LNodeInfo_UI1At     (LNodeInfo* This, LGraph_TNode* inNode)
LNodeInfo_UI2At     (LNodeInfo* This, LGraph_TNode* inNode)
LNodeInfo_UI4At     (LNodeInfo* This, LGraph_TNode* inNode)
LNodeInfo_I1At      (LNodeInfo* This, LGraph_TNode* inNode)
LNodeInfo_I2At      (LNodeInfo* This, LGraph_TNode* inNode)
LNodeInfo_I4At      (LNodeInfo* This, LGraph_TNode* inNode)
LNodeInfo_F4At      (LNodeInfo* This, LGraph_TNode* inNode)
LNodeInfo_F8At      (LNodeInfo* This, LGraph_TNode* inNode)
LNodeInfo_BoolAt    (LNodeInfo* This, LGraph_TNode* inNode)
LNodeInfo_PointerAt (LNodeInfo* This, LGraph_TNode* inNode)


API Reference

Macro Arguments Description
UI1At
LNodeInfo* This, LGraph_TNode* inNode ui1 lvalue associated to node inNode
UI2At
LNodeInfo* This, LGraph_TNode* inNode ui2 lvalue associated to node inNode
UI4At
LNodeInfo* This, LGraph_TNode* inNode ui4 lvalue associated to node inNode
I1At
LNodeInfo* This, LGraph_TNode* inNode i1 lvalue associated to node inNode
I2At
LNodeInfo* This, LGraph_TNode* inNode i2 lvalue associated to node inNode
I4At
LNodeInfo* This, LGraph_TNode* inNode i4 lvalue associated to node inNode
F4At
LNodeInfo* This, LGraph_TNode* inNode f4 lvalue associated to node inNode
F8At
LNodeInfo* This, LGraph_TNode* inNode f8 lvalue associated to node inNode
BoolAt
LNodeInfo* This, LGraph_TNode* inNode Bool lvalue associated to node inNode
PointerAt
LNodeInfo* This, LGraph_TNode* inNode void* lvalue associated to node inNode

Function Arguments Description Returns Throws
New
LGraph*      inGraph
LType_TType* inType
Creates an object containing a nodeinfo associated to inGraph. The base type of the information is given by the value of inType. The constructor makes room for all the node of the graph. Caller is responsible of dellocating the created object using LNodeInfo_Delete.

LNodeInfo*

pointer to the newly created object

-
NewCustom
LGraph* inGraph
ui4     inItemSize
Creates an object containing a nodeinfo associated to inGraph. The base type size of the information is given by the value of inItemSize. The constructor makes room for all the nodes of the graph. Caller is responsible of dellocating the created object using LNodeInfo_Delete.

LNodeInfo*

pointer to the newly created object

-
Delete LNodeInfo** ThisA Releases object *ThisA. *ThisA is set to NULL. void -
AssignItemAt
LNodeInfo*    This
LGraph_TNode* inNode
const void*   inItem
Assigns the data pointed by inItem to the node inNode void -
FetchItemAt
LNodeInfo*    This
LGraph_TNode* inNode
void*         outItem
Puts the data associated to node inNode to the memory pointed by outItem. It returns TRUE is the data in outItem are valid, FALSE otherwise Bool -
InstallDelNodeHandler
LNodeInfo*         This
LNodeInfo_THandler inDealloc
Installs a handler that is executed whenever a node is removed from the graph associated with This. The handler is called before removing the node. - -
InstallNewNodeHandler
LNodeInfo*         This
LNodeInfo_THandler inAlloc
Installs a handler that is executed whenever a new node is added to the graph associated with This. The handler is called after the node has been inserted. - -
GetBaseType LNodeInfo* This Returns the base type of the LNodeInfo LType_TType -
GetUsedMem LNodeInfo* This Returns the total memory usage the object. ui4 -


Revision history