GIOP.pm

filter: Statementstmt 13.1% 8 / 61 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 6.2% 1 / 16 Podpod n/a totaltotal 11.6% 9 / 77 CC 1 SCAR 6.6
CC
1
Cov
13%
Request
2.0
Reply
2.0
CancelRequest
2.0
CRAP 1.9
« IR_types.pm ↑ Summary CORBA/Exception.pm »
1 # $Id: GIOP.pm,v 1.1.1.1 1997/05/17 11:47:05 schuller Exp $
2 # Copyright (c) 1997 Lunatech Research / Bart Schuller <schuller@lunatech.com>
3 # See the file "Artistic" in the distribution for licensing and
4 # (lack of) warranties.
5  
6 3 ▶use COPE::CORBA::ORB;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 # module GIOP
9 package GIOP;
10  
11 # enum MsgType
12 0 ▶sub Request { 0 }
Subroutine Request: not called CC=1 SCAR=6.9
13 0 ▶sub Reply { 1 }
Subroutine Reply: not called CC=1 SCAR=6.9
14 0 ▶sub CancelRequest { 2 }
Subroutine CancelRequest: not called CC=1 SCAR=6.9
15 0 ▶sub LocateRequest { 3 }
Subroutine LocateRequest: not called CC=1 SCAR=6.9
16 0 ▶sub LocateReply { 4 }
Subroutine LocateReply: not called CC=1 SCAR=6.9
17 0 ▶sub CloseConnection { 5 }
Subroutine CloseConnection: not called CC=1 SCAR=6.9
18 0 ▶sub MessageError { 6 }
Subroutine MessageError: not called CC=1 SCAR=6.9
19  
20 # struct Version
21 package GIOP::Version;
22 3 @ISA=qw(CORBA::_Struct);
23 0 ▶sub _marshal {
Subroutine _marshal: not called CC=1 SCAR=6.9
24 0 my($self) = pop; # sic
25 0 CORBA::ORB::_marshal_char(@_, $self->{major});
26 0 CORBA::ORB::_marshal_char(@_, $self->{minor});
27 }
28  
29 0 ▶sub _unmarshal {
Subroutine _unmarshal: not called CC=1 SCAR=6.9
30 0 my $self = {};
31 0 $self->{major} = CORBA::ORB::_unmarshal_char(@_);
32 0 $self->{minor} = CORBA::ORB::_unmarshal_char(@_);
33 0 return bless $self, 'GIOP::Version';
34 }
35  
36 #$_tc = _create_struct_tc('', 'Version',
37 # major => $CORBA::_tc_char,
38 # minor => $CORBA::_tc_char,
39 #);
40  
41 # struct MessageHeader
42 package GIOP::MessageHeader;
43 3 @ISA=qw(CORBA::_Struct);
44 # string, index, byte_order, self
45 0 ▶sub _marshal {
Subroutine _marshal: not called CC=1 SCAR=6.9
46 0 my($self) = pop; # sic
47 0 CORBA::ORB::_marshal_char_array(@_, $self->{magic}, 4);
48 0 GIOP::Version::_marshal(@_, $self->{GIOP_version});
49 0 CORBA::ORB::_marshal_boolean(@_, $self->{byte_order});
50 0 CORBA::ORB::_marshal_octet(@_, $self->{message_type});
51 0 CORBA::ORB::_marshal_ulong(@_, $self->{message_size});
52 }
53  
54 0 ▶sub _unmarshal {
Subroutine _unmarshal: not called CC=1 SCAR=6.9
55 0 my($byte_order_ref) = pop;
56 0 my $self = {};
57 0 $self->{magic} = CORBA::ORB::_unmarshal_char_array(@_, $$byte_order_ref, 4);
58 0 $self->{GIOP_version} = GIOP::Version::_unmarshal(@_, $$byte_order_ref);
59 0 $self->{byte_order} = CORBA::ORB::_unmarshal_boolean(@_, $$byte_order_ref);
60 0 $$byte_order_ref = $self->{byte_order};
61 0 $self->{message_type} = CORBA::ORB::_unmarshal_octet(@_, $$byte_order_ref);
62 0 $self->{message_size} = CORBA::ORB::_unmarshal_ulong(@_, $$byte_order_ref);
63 0 return bless $self, 'GIOP::MessageHeader';
64 }
65  
66 #$_tc = _create_struct_tc('', 'MessageHeader',
67 # magic => create_array_tc(4, $CORBA::_tc_char),
68 # GIOP_version => $GIOP::Version::_tc,
69 # byte_order => $CORBA::_tc_boolean,
70 # message_type => $CORBA::_tc_octet,
71 # message_size => $CORBA::_tc_ulong,
72 #);
73  
74 # struct RequestHeader
75 package GIOP::RequestHeader;
76 3 @ISA=qw(CORBA::_Struct);
77 0 ▶sub _marshal {
Subroutine _marshal: not called CC=1 SCAR=6.9
78 0 my($self) = pop; # sic
79 0 CORBA::ORB::_marshal_sequence(@_, $self->{service_context}, \&IOP::ServiceContext::_marshal);
80 0 CORBA::ORB::_marshal_ulong(@_, $self->{request_id});
81 0 CORBA::ORB::_marshal_boolean(@_, $self->{response_expected});
82 0 CORBA::ORB::_marshal_octet_sequence(@_, $self->{object_key});
83 0 CORBA::ORB::_marshal_string(@_, $self->{operation});
84 0 CORBA::ORB::_marshal_octet_sequence(@_, $self->{requesting_principal});
85 }
86  
87 0 ▶sub _unmarshal {
Subroutine _unmarshal: not called CC=1 SCAR=6.9
88 0 my $self = {};
89 0 $self->{service_context} = CORBA::ORB::_unmarshal_sequence(@_, \&IOP::ServiceContext::_unmarshal);
90 0 $self->{request_id} = CORBA::ORB::_unmarshal_ulong(@_);
91 0 $self->{response_expected} = CORBA::ORB::_unmarshal_boolean(@_);
92 0 $self->{object_key} = CORBA::ORB::_unmarshal_octet_sequence(@_);
93 0 $self->{operation} = CORBA::ORB::_unmarshal_string(@_);
94 0 $self->{requesting_principal} = CORBA::ORB::_unmarshal_octet_sequence(@_);
95 0 return bless $self, 'GIOP::RequestHeader';
96 }
97  
98 #$_tc = _create_struct_tc('', 'RequestHeader',
99 # service_context => $IOP::ServiceContextList::_tc,
100 # request_id => $CORBA::_tc_ulong,
101 # response_expected => $CORBA::_tc_boolean,
102 # object_key => create_sequence_tc(0,$CORBA::_tc_octet),
103 # operation => create_string_tc(0),
104 # requesting_principal => $CORBA::_tc_Principal,
105 #);
106  
107 package GIOP;
108 # enum ReplyStatusType
109 sub NO_EXCEPTION () { 0 }
110 sub USER_EXCEPTION () { 1 }
111 sub SYSTEM_EXCEPTION () { 2 }
112 sub LOCATION_FORWARD () { 3 }
113  
114 # struct ReplyHeader
115 package GIOP::ReplyHeader;
116 3 @ISA=qw(CORBA::_Struct);
117 0 ▶sub _unmarshal {
Subroutine _unmarshal: not called CC=1 SCAR=6.9
118 0 my $self = {};
119 0 $self->{service_context} = CORBA::ORB::_unmarshal_sequence(
120 @_, \&IOP::ServiceContext::_unmarshal);
121 0 $self->{request_id} = CORBA::ORB::_unmarshal_ulong(@_);
122 0 $self->{reply_status} = CORBA::ORB::_unmarshal_enum(@_);
123 0 return bless $self, 'GIOP::ReplyHeader';
124 }
125  
126 0 ▶sub _marshal {
Subroutine _marshal: not called CC=1 SCAR=6.9
127 0 my($self) = pop; # sic
128 0 CORBA::ORB::_marshal_sequence(@_, $self->{service_context}, \&IOP::ServiceContext::_marshal);
129 0 CORBA::ORB::_marshal_ulong(@_, $self->{request_id});
130 0 CORBA::ORB::_marshal_enum(@_, $self->{reply_status});
131 }
132  
133 3 1;
« IR_types.pm ↑ Summary CORBA/Exception.pm »