1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
//File: CosGraphs.idl
//Part of the Relationship Service
#ifndef _COS_GRAPHS_IDL_
#define _COS_GRAPHS_IDL_
// omniORB specific pragmas to insert extra includes into the stub header.
#pragma hh #include "COS_sysdep.h"
#include <orb.idl>
#include <CosRelationships.idl>
#include <CosObjectIdentity.idl>
#pragma prefix "omg.org"
module CosGraphs {
interface TraversalFactory;
interface Traversal;
interface TraversalCriteria;
interface Node;
interface NodeFactory;
interface Role;
interface EdgeIterator;
struct NodeHandle {
Node the_node;
CosObjectIdentity::ObjectIdentifier constant_random_id;
};
typedef sequence<NodeHandle> NodeHandles;
struct NamedRole {
Role the_role;
CosRelationships::RoleName the_name;
};
typedef sequence<NamedRole> NamedRoles;
struct EndPoint {
NodeHandle the_node;
NamedRole the_role;
};
typedef sequence<EndPoint> EndPoints;
struct Edge {
EndPoint from;
CosRelationships::RelationshipHandle the_relationship;
EndPoints relatives;
};
typedef sequence<Edge> Edges;
enum PropagationValue {deep, shallow, none, inhibit};
enum Mode {depthFirst, breadthFirst, bestFirst};
interface TraversalFactory {
Traversal create_traversal_on (
in NodeHandle root_node,
in TraversalCriteria the_criteria,
in Mode how);
};
interface Traversal {
typedef unsigned long TraversalScopedId;
struct ScopedEndPoint {
EndPoint point;
TraversalScopedId id;
};
typedef sequence<ScopedEndPoint> ScopedEndPoints;
struct ScopedRelationship {
CosRelationships::RelationshipHandle
scoped_relationship;
TraversalScopedId id;
};
struct ScopedEdge {
ScopedEndPoint from;
ScopedRelationship the_relationship;
ScopedEndPoints relatives;
};
typedef sequence<ScopedEdge> ScopedEdges;
boolean next_one (out ScopedEdge the_edge);
boolean next_n (in short how_many,
out ScopedEdges the_edges);
void destroy ();
};
interface TraversalCriteria {
struct WeightedEdge {
Edge the_edge;
unsigned long weight;
sequence<NodeHandle> next_nodes;
};
typedef sequence<WeightedEdge> WeightedEdges;
void visit_node(in NodeHandle a_node,
in Mode search_mode);
boolean next_one (out WeightedEdge the_edge);
boolean next_n (in short how_many,
out WeightedEdges the_edges);
void destroy();
};
interface Node: CosObjectIdentity::IdentifiableObject {
typedef sequence<Role> Roles;
exception NoSuchRole {};
exception DuplicateRoleType {};
readonly attribute CosRelationships::RelatedObject
related_object;
readonly attribute Roles roles_of_node;
Roles roles_of_type (
in CORBA::InterfaceDef role_type);
void add_role (in Role a_role)
raises (DuplicateRoleType);
void remove_role (in CORBA::InterfaceDef of_type)
raises (NoSuchRole);
};
interface NodeFactory {
Node create_node (in Object related_object);
};
interface Role : CosRelationships::Role {
void get_edges ( in long how_many,
out Edges the_edges,
out EdgeIterator the_rest);
};
interface EdgeIterator {
boolean next_one (out Edge the_edge);
boolean next_n ( in unsigned long how_many,
out Edges the_edges);
void destroy ();
};
};
#endif /* ifndef _COS_GRAPHS_IDL_ */
|