MIRA
|
Represents the whole computation graph with all known units/authorities and channels within their namespaces. More...
#include <fw/FrameworkGraph.h>
Classes | |
class | AuthorityNode |
Represents a single authority in the framwork computation graph. More... | |
class | ChannelNode |
Represents a single channel in the framwork computation graph. More... | |
class | FrameworkNode |
Represents a framework in the framework computation graph. More... | |
class | NamespaceNode |
Represents a namespace in the framework computation graph within the overall namespace hierarchy. More... | |
class | Node |
Base class for all nodes in the framework computation graph. More... | |
Public Types | |
typedef boost::shared_ptr< Node > | NodePtr |
typedef boost::shared_ptr< ChannelNode > | ChannelNodePtr |
typedef boost::shared_ptr< AuthorityNode > | AuthorityNodePtr |
typedef boost::shared_ptr< NamespaceNode > | NamespaceNodePtr |
typedef boost::shared_ptr< FrameworkNode > | FrameworkNodePtr |
Public Member Functions | |
FrameworkGraph () | |
Creates an emtpy framework graph object. More... | |
bool | discover (boost::function< void()> changeCb=boost::function< void()>()) |
Discovers the whole structure of all connected frameworks with its authorities, channels, services, etc. More... | |
std::list< NodePtr > | getNodes () |
Returns all channel and authority nodes. More... | |
std::list< ChannelNodePtr > & | getChannels () |
Returns all channel nodes. More... | |
template<typename Visitor > | |
void | visitAuthorities (Visitor &&visit) |
visit all authories More... | |
std::list< AuthorityNodePtr > & | getAuthorities () |
Returns all authority nodes. More... | |
std::list< NamespaceNodePtr > & | getNamespaces () |
Returns all namespace nodes. More... | |
std::list< FrameworkNodePtr > & | getFrameworks () |
Returns all framework nodes. More... | |
NamespaceNodePtr | getRootNamespace () |
Returns the root namespace node. More... | |
void | integrateNamespaceNode (NamespaceNodePtr node) |
inserts a new namespace node and reparents the existing namespace nodes, if necessary. More... | |
Protected Member Functions | |
template<typename Container , typename Key > | |
Container::value_type | findPtr (Container &c, const Key &key) |
Protected Attributes | |
boost::mutex | mMutex |
std::list< AuthorityNodePtr > | mAuthorities |
std::list< ChannelNodePtr > | mChannels |
std::list< NamespaceNodePtr > | mNamespaces |
std::list< FrameworkNodePtr > | mFrameworks |
NamespaceNodePtr | mRootNamespace |
bool | mGraphHasChanged |
Represents the whole computation graph with all known units/authorities and channels within their namespaces.
Each such component is represented as graph node. For each such node a separate class is used. For each node class, the user can specify "mixin" classes to add additional members to the nodes. The Mixins are specified as template parameters:
After you created an instance of this FrameworkGraph class, you can call the discover() method to collect all information about the framework computation graph. The discover() method can also be called multiple times to update the graph and the contained nodes.
Note that this class is used to collect the information on the computation network graph only. It is used for visualization purposes and to obtain the overall structure of the computation graph in a "human comprehensible format". This class is NOT intended to store any information that is required by the runtime components! Internally, all the information is distributed in different components.
typedef boost::shared_ptr<ChannelNode> ChannelNodePtr |
typedef boost::shared_ptr<AuthorityNode> AuthorityNodePtr |
typedef boost::shared_ptr<NamespaceNode> NamespaceNodePtr |
typedef boost::shared_ptr<FrameworkNode> FrameworkNodePtr |
|
inline |
Creates an emtpy framework graph object.
|
inline |
Discovers the whole structure of all connected frameworks with its authorities, channels, services, etc.
Returns true, if the graph has changed, otherwise false. The optional parameter allows to specify a callback that is called from time to time during the discovery process, whenever changes in the graph have been observed.
|
inline |
Returns all channel and authority nodes.
|
inline |
Returns all channel nodes.
|
inline |
visit all authories
|
inline |
Returns all authority nodes.
|
inline |
Returns all namespace nodes.
|
inline |
Returns all framework nodes.
|
inline |
Returns the root namespace node.
|
inline |
inserts a new namespace node and reparents the existing namespace nodes, if necessary.
|
inlineprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |