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
|
//File: CosRelationships.idl
//Part of the Relationship Service
#ifndef _COS_RELATIONSHIPS_IDL_
#define _COS_RELATIONSHIPS_IDL_
// omniORB specific pragmas to insert extra includes into the stub header.
#pragma hh #include "COS_sysdep.h"
#include <orb.idl>
#if defined(__OMNIIDL__) || defined(__OMNIIDL2__)
#include <ir.idl>
#endif
#include <CosObjectIdentity.idl>
#pragma prefix "omg.org"
module CosRelationships {
interface RoleFactory;
interface RelationshipFactory;
interface Relationship;
interface Role;
interface RelationshipIterator;
typedef Object RelatedObject;
typedef sequence<Role> Roles;
typedef string RoleName;
typedef sequence<RoleName> RoleNames;
struct NamedRole {RoleName name; Role aRole;};
typedef sequence<NamedRole> NamedRoles;
struct RelationshipHandle {
Relationship the_relationship;
CosObjectIdentity::ObjectIdentifier constant_random_id;
};
typedef sequence<RelationshipHandle> RelationshipHandles;
interface RelationshipFactory {
struct NamedRoleType {
RoleName name;
CORBA::InterfaceDef named_role_type;
};
typedef sequence<NamedRoleType> NamedRoleTypes;
readonly attribute CORBA::InterfaceDef relationship_type;
readonly attribute unsigned short degree;
readonly attribute NamedRoleTypes named_role_types;
exception RoleTypeError {NamedRoles culprits;};
exception MaxCardinalityExceeded {
NamedRoles culprits;};
exception DegreeError {unsigned short required_degree;};
exception DuplicateRoleName {NamedRoles culprits;};
exception UnknownRoleName {NamedRoles culprits;};
Relationship create (in NamedRoles named_roles)
raises (RoleTypeError,
MaxCardinalityExceeded,
DegreeError,
DuplicateRoleName,
UnknownRoleName);
};
interface Relationship : CosObjectIdentity::IdentifiableObject {
exception CannotUnlink {
Roles offending_roles;
};
readonly attribute NamedRoles named_roles;
void destroy () raises(CannotUnlink);
};
interface Role {
exception UnknownRoleName {};
exception UnknownRelationship {};
exception RelationshipTypeError {};
exception CannotDestroyRelationship {
RelationshipHandles offenders;
};
exception ParticipatingInRelationship {
RelationshipHandles the_relationships;
};
readonly attribute RelatedObject related_object;
RelatedObject get_other_related_object (
in RelationshipHandle rel,
in RoleName target_name)
raises (UnknownRoleName,
UnknownRelationship);
Role get_other_role (in RelationshipHandle rel,
in RoleName target_name)
raises (UnknownRoleName, UnknownRelationship);
void get_relationships (
in unsigned long how_many,
out RelationshipHandles rels,
out RelationshipIterator iterator);
void destroy_relationships()
raises(CannotDestroyRelationship);
void destroy() raises(ParticipatingInRelationship);
boolean check_minimum_cardinality ();
void link (in RelationshipHandle rel,
in NamedRoles named_roles)
raises( RelationshipFactory::MaxCardinalityExceeded,
RelationshipTypeError);
void unlink (in RelationshipHandle rel)
raises (UnknownRelationship);
};
interface RoleFactory {
exception NilRelatedObject {};
exception RelatedObjectTypeError {};
readonly attribute CORBA::InterfaceDef role_type;
readonly attribute unsigned long max_cardinality;
readonly attribute unsigned long min_cardinality;
typedef sequence<CORBA::InterfaceDef> InterfaceDefs;
readonly attribute InterfaceDefs related_object_types;
Role create_role (in RelatedObject related_object)
raises (NilRelatedObject, RelatedObjectTypeError);
};
interface RelationshipIterator {
boolean next_one (out RelationshipHandle rel);
boolean next_n (in unsigned long how_many,
out RelationshipHandles rels);
void destroy ();
};
};
#endif /* ifndef _COS_RELATIONSHIPS_IDL_ */
|