Coconut Framework
beta
|
Go to the source code of this file.
Classes | |
struct | CNNode |
Node of the direct acyclic graph. More... | |
struct | CNNodeMethods |
Methods for CNNode. More... | |
Typedefs | |
typedef void(* | CNPrintNodeFuncRef )(struct CNText *buf, const struct CNNode *src) |
Functions | |
struct CNNode * | CNAllocateNode (struct CNGraph *parent, size_t size, const struct CNNodeMethods *methods) |
Allocate CNNode. More... | |
static void | CNRetainNode (struct CNNode *dst) |
Retrain the resource for the CNNode. More... | |
static void | CNReleaseNode (struct CNNode *dst) |
Release the resource for the CNNode. More... | |
static struct CNResource * | CNResourceOfNode (struct CNNode *src) |
Get resource of the CNNode. More... | |
static struct CNObject * | CNObjectOfNode (struct CNNode *src) |
Get object of the node. More... | |
static void | CNDestroyContextOfNode (struct CNNode *dst) |
Release the contex of the node. More... | |
static size_t | CNCountOfProducerEdges (const struct CNNode *src) |
Get number of producers of the node. More... | |
static struct CNListItem * | CNFirstProducerEdgeInNode (const struct CNNode *src) |
Get first producer node of the source node. More... | |
static struct CNListItem * | CNCentinelProducerEdgeInNode (const struct CNNode *src) |
Get centinel producer node of the source node. More... | |
static size_t | CNCountOfConsumerEdges (const struct CNNode *src) |
Get number of consumers of the node. More... | |
static struct CNListItem * | CNFirstConsumerEdgeInNode (const struct CNNode *src) |
Get first consumer node of the source node. More... | |
static struct CNListItem * | CNCentinelConsumerEdgeInNode (const struct CNNode *src) |
Get centinel consumer node of the source node. More... | |
static void | CNPrintNode (struct CNText *buf, const struct CNNode *src) |
Print the context of node. More... | |
void | CNLinkNode (struct CNEdge *edge, struct CNNode *producer, struct CNNode *consumer) |
Link 2 nodes. More... | |
CNBoolean | CNUnlinkNode (struct CNGraph *graph, struct CNNode *producer, struct CNNode *consumer) |
Unlink 2 nodes. More... | |
CNBoolean | CNIsolateNode (struct CNGraph *graph, struct CNNode *dst) |
Unlink all for the node. More... | |
Define CNNode class.
Function to dump the context of CNNode
struct CNNode* CNAllocateNode | ( | struct CNGraph * | parent, |
size_t | size, | ||
const struct CNNodeMethods * | methods | ||
) |
|
inlinestatic |
Retrain the resource for the CNNode.
dst | Destination node |
References CNRetainObject(), and CNNode::superClass.
|
inlinestatic |
Release the resource for the CNNode.
dst | Destination node |
References CNReleaseObject(), and CNNode::superClass.
|
static |
Get resource of the CNNode.
src | Source node |
References CNResourceOfObject(), and CNNode::superClass.
|
inlinestatic |
Release the contex of the node.
dst | Destination node |
References CNDestroyObjectList(), CNNode::consumerEdges, and CNNode::producerEdges.
|
inlinestatic |
Get number of producers of the node.
src | Source node |
References CNCountOfObjectsInList(), and CNNode::producerEdges.
|
static |
Get first producer node of the source node.
src | Source node |
References CNFirstListObject(), and CNNode::producerEdges.
|
static |
Get centinel producer node of the source node.
src | Source node |
References CNCentinelListObject(), and CNNode::producerEdges.
|
inlinestatic |
Get number of consumers of the node.
src | Source node |
References CNCountOfObjectsInList(), and CNNode::consumerEdges.
|
static |
Get first consumer node of the source node.
src | Source node |
References CNFirstListObject(), and CNNode::consumerEdges.
|
static |
Get centinel consumer node of the source node.
src | Source node |
References CNCentinelListObject(), and CNNode::consumerEdges.
Print the context of node.
buf | Text buffer |
src | Source node |
References CNMethodsOfObject(), CNNodeMethods::printNode, and CNNode::superClass.
Link 2 nodes.
edge | Edge to link the edge |
producer | Producer node |
consumer | Consumer node |
CNBoolean CNUnlinkNode | ( | struct CNGraph * | graph, |
struct CNNode * | producer, | ||
struct CNNode * | consumer | ||
) |
Unlink 2 nodes.
CNTrue | Successed to unlink |
CNFalse | Failed to unlink |
graph | Parent graph for nodes |
producer | Producer node |
consumer | Consumer node |