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
|
//File: CosStream.idl
//Part of the Externalization Service
// Modified from version 1.0 to include the previous CosCompoundExternalization module
#ifndef _COS_STREAM_IDL_
#define _COS_STREAM_IDL_
// omniORB specific pragmas to insert extra includes into the stub header.
#pragma hh #include "COS_sysdep.h"
#include <CosLifeCycle.idl>
#include <CosObjectIdentity.idl>
#include <CosGraphs.idl>
#pragma prefix "omg.org"
module CosStream {
exception ObjectCreationError{};
exception StreamDataFormatError{};
interface StreamIO;
interface Node;
interface Role;
interface Relationship;
interface Streamable:
CosObjectIdentity::IdentifiableObject {
readonly attribute CosLifeCycle::Key external_form_id;
void externalize_to_stream(
in StreamIO targetStreamIO);
void internalize_from_stream(
in StreamIO sourceStreamIO,
in CosLifeCycle::FactoryFinder there)
raises( CosLifeCycle::NoFactory,
ObjectCreationError,
StreamDataFormatError );
};
interface StreamableFactory {
Streamable create_uninitialized();
};
interface StreamIO {
void write_string(in string aString);
void write_char(in char aChar);
void write_octet(in octet anOctet);
void write_unsigned_long(
in unsigned long anUnsignedLong);
void write_unsigned_short(
in unsigned short anUnsignedShort);
void write_long(in long aLong);
void write_short(in short aShort);
void write_float(in float aFloat);
void write_double(in double aDouble);
void write_boolean(in boolean aBoolean);
void write_object(in Streamable aStreamable);
void write_graph(in Node aNode);
string read_string()
raises(StreamDataFormatError);
char read_char()
raises(StreamDataFormatError );
octet read_octet()
raises(StreamDataFormatError );
unsigned long read_unsigned_long()
raises(StreamDataFormatError );
unsigned short read_unsigned_short()
raises( StreamDataFormatError );
long read_long()
raises(StreamDataFormatError );
short read_short()
raises(StreamDataFormatError );
float read_float()
raises(StreamDataFormatError );
double read_double()
raises(StreamDataFormatError );
boolean read_boolean()
raises(StreamDataFormatError );
Streamable read_object(
in CosLifeCycle::FactoryFinder there,
in Streamable aStreamable)
raises(StreamDataFormatError );
void read_graph(
in Node starting_node,
in CosLifeCycle::FactoryFinder there)
raises(StreamDataFormatError );
};
// the following are required for compound externalization
struct RelationshipHandle {
CosRelationships::Relationship theRelationship;
CosObjectIdentity::ObjectIdentifier constantRandomId;
};
interface Node : CosGraphs::Node, CosStream::Streamable{
void externalize_node (in CosStream::StreamIO sio);
void internalize_node (in CosStream::StreamIO sio,
in CosLifeCycle::FactoryFinder there,
out Roles rolesOfNode)
raises ( CosLifeCycle::NoFactory);
};
interface Role : CosGraphs::Role {
void externalize_role (in CosStream::StreamIO sio);
void internalize_role (in CosStream::StreamIO sio);
CosGraphs::PropagationValue externalize_propagation (
in RelationshipHandle rel,
in CosRelationships::RoleName toRoleName,
out boolean sameForAll);
};
interface Relationship : CosRelationships::Relationship {
void externalize_relationship (
in CosStream::StreamIO sio);
void internalize_relationship(
in CosStream::StreamIO sio,
in CosGraphs::NamedRoles newRoles);
CosGraphs::PropagationValue externalize_propagation (
in CosRelationships::RoleName fromRoleName,
in CosRelationships::RoleName toRoleName,
out boolean sameForAll);
};
interface PropagationCriteriaFactory {
CosGraphs::TraversalCriteria create_for_externalize( );
};
};
#endif /* ifndef _COS_STREAM_IDL_ */
|