Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

LinkNode Class Reference

An object linked bi-directionally to other objects, inheritable. More...

#include <mlinknode.h>

Inheritance diagram for LinkNode:

IndirLinkNode SuspendLinkNodeNotify List of all members.

Public Methods

StsLnNB connect (LinkNode const &other)
StsLnNd reserve (LinkNode const &other)
StsLnNd release (IndLnNd iOther)
StsLnNd disconnect (LinkNode const &other, IndLnNd iOther)
void disconnectAll ()
void releaseAll ()
Bool isConnected (IndLnNd iOther) const
Bool isConnected (ClassName clsName) const
void addProtect ()
void removeProtect ()
NodeLink const * iterConnection (LinkNodeIndex &i) const
NodeLink const * findConnection (LinkNode const &item) const
virtual CPtr getHost (ClassName className) const

Detailed Description

An object linked bi-directionally to other objects, inheritable.

Definition at line 29 of file mlinknode.h.


Member Function Documentation

void addProtect   [inline]
 

Sets the node as protected (actually increments a protection counter).

When the node is protected, no notifications are sent to it.

Definition at line 108 of file mlinknode.h.

Referenced by connect(), disconnect(), disconnectAll(), release(), and reserve().

StsLnNB connect LinkNode const &    other
 

Creates a bi-directional connection between this and the other node.

Definition at line 16 of file mlinknode.cc.

References addProtect(), and removeProtect().

StsLnNd disconnect LinkNode const &    other,
IndLnNd    iOther
 

Disconnects the connection in both directions.

Definition at line 26 of file mlinknode.cc.

References addProtect(), getHost(), and removeProtect().

Referenced by disconnectAll().

void disconnectAll  
 

Disconnects all connections.

Definition at line 87 of file mlinknode.cc.

References addProtect(), disconnect(), iterConnection(), and removeProtect().

Referenced by SuspendLinkNodeNotify::releaseAll().

NodeLink const* findConnection LinkNode const &    item const [inline]
 

Finds and returns the NodeLink object connecting this node to the other given node.

Definition at line 125 of file mlinknode.h.

virtual CPtr getHost ClassName    className const [inline, virtual]
 

Returns the owner object for the node, in case the node is owned as an attribute, not inherited.

If it is inherited, returns pointer to itself.

Reimplemented in IndirLinkNode.

Definition at line 139 of file mlinknode.h.

Referenced by disconnect().

Bool isConnected ClassName    clsName const
 

Is the node connected to any LinkNode belonging to the given class?

Definition at line 104 of file mlinknode.cc.

Bool isConnected IndLnNd    iOther const [inline]
 

Is the node connected to any other LinkNode.

Definition at line 93 of file mlinknode.h.

NodeLink const* iterConnection LinkNodeIndex &    i const [inline]
 

Connection iteration.

Returns NULL when the value is over...

Definition at line 116 of file mlinknode.h.

Referenced by disconnectAll().

StsLnNd release IndLnNd    iOther
 

Releases a reservation, but does not disconnect the other object.

Definition at line 71 of file mlinknode.cc.

References addProtect(), removeProtect(), and setReleasedBy().

void releaseAll  
 

Releases all connections, but does not disconnect them.

Reimplemented in SuspendLinkNodeNotify.

void removeProtect  
 

Removes protection from the node (decrements a protection counter).

Definition at line 262 of file mlinknode.cc.

Referenced by connect(), disconnect(), disconnectAll(), release(), and reserve().

StsLnNd reserve LinkNode const &    other
 

Creates a connection that reserves the other object.

Reservation implies an ownership relation (reserver owns the reservee).

Definition at line 53 of file mlinknode.cc.

References addProtect(), and removeProtect().


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 20:06:43 2005 for LibMagiC by doxygen1.2.18