| 1 | # ex: set ro: | ||
| 2 | # This file was generated (by D:\Perl\site\bin/idl2pm). DO NOT modify it. | ||
| 3 | # From file : MIOP.idl, 1424 octets, Fri Oct 05 19:47:18 2007 | ||
| 4 | |||
| 5 | use strict; | ||
| 6 | use warnings; | ||
| 7 | |||
| 8 | package main; | ||
| 9 | |||
| 10 | use CORBA::Perl::CORBA; | ||
| 11 | use Carp; | ||
| 12 | |||
| 13 | use CORBA::Perl::IOP; | ||
| 14 | |||
| 15 | use CORBA::Perl::GIOP; | ||
| 16 | |||
| 17 | # | ||
| 18 | # begin of module CORBA::Perl::MIOP | ||
| 19 | # | ||
| 20 | |||
| 21 | package CORBA::Perl::MIOP; | ||
| 22 | |||
| 23 | use Carp; | ||
| 24 | use CORBA::Perl::CORBA; | ||
| 25 | |||
| 26 | # CORBA::Perl::MIOP::sequence_CORBA_Perl_CORBA_octet (sequence) | ||
| 27 | sub sequence_CORBA_Perl_CORBA_octet__marshal { | ||
| 28 | my ($r_buffer, $value, $max) = @_; | ||
| 29 | croak "undefined value for 'sequence_CORBA_Perl_CORBA_octet'.\n" | ||
| 30 | unless (defined $value); | ||
| 31 | croak "value '$value' is not a string.\n" | ||
| 32 | if (ref $value); | ||
| 33 | my $len = length($value); | ||
| 34 | croak "too long sequence for 'sequence_CORBA_Perl_CORBA_octet' (max:$max).\n" | ||
| 35 | if (defined $max and $len > $max); | ||
| 36 | CORBA::Perl::CORBA::unsigned_long__marshal($r_buffer, $len); | ||
| 37 | $$r_buffer .= $value; | ||
| 38 | } | ||
| 39 | |||
| 40 | sub sequence_CORBA_Perl_CORBA_octet__demarshal { | ||
| 41 | my ($r_buffer, $r_offset, $endian) = @_; | ||
| 42 | my $len = CORBA::Perl::CORBA::unsigned_long__demarshal($r_buffer, $r_offset, $endian); | ||
| 43 | my @seq = (); | ||
| 44 | my $str = substr $$r_buffer, $$r_offset, $len; | ||
| 45 | $$r_offset += $len; | ||
| 46 | return $str; | ||
| 47 | } | ||
| 48 | |||
| 49 | sub sequence_CORBA_Perl_CORBA_octet__stringify { | ||
| 50 | my ($value, $tab, $max) = @_; | ||
| 51 | $tab = q{} unless (defined $tab); | ||
| 52 | croak "undefined value for 'sequence_CORBA_Perl_CORBA_octet'.\n" | ||
| 53 | unless (defined $value); | ||
| 54 | $value = [map ord, split //, $value]; | ||
| 55 | my $len = scalar(@{$value}); | ||
| 56 | croak "too long sequence for 'sequence_CORBA_Perl_CORBA_octet' (max:$max).\n" | ||
| 57 | if (defined $max and $len > $max); | ||
| 58 | my $str = '{'; | ||
| 59 | my $first = 1; | ||
| 60 | foreach (@{$value}) { | ||
| 61 | if ($first) { | ||
| 62 | $first = 0; | ||
| 63 | } | ||
| 64 | else { | ||
| 65 | $str .= ','; | ||
| 66 | } | ||
| 67 | $str .= CORBA::Perl::CORBA::octet__stringify($_, $tab . q{ } x 2); | ||
| 68 | } | ||
| 69 | $str .= '}'; | ||
| 70 | return $str; | ||
| 71 | } | ||
| 72 | |||
| 73 | # CORBA::Perl::MIOP::UniqueId (typedef) | ||
| 74 | sub UniqueId__marshal { | ||
| 75 | my ($r_buffer, $value) = @_; | ||
| 76 | croak "undefined value for 'UniqueId'.\n" | ||
| 77 | unless (defined $value); | ||
| 78 | CORBA::Perl::MIOP::sequence_CORBA_Perl_CORBA_octet__marshal($r_buffer, $value, 252); | ||
| 79 | } | ||
| 80 | |||
| 81 | sub UniqueId__demarshal { | ||
| 82 | my ($r_buffer, $r_offset, $endian) = @_; | ||
| 83 | return CORBA::Perl::MIOP::sequence_CORBA_Perl_CORBA_octet__demarshal($r_buffer, $r_offset, $endian); | ||
| 84 | } | ||
| 85 | |||
| 86 | sub UniqueId__stringify { | ||
| 87 | my ($value, $tab) = @_; | ||
| 88 | croak "undefined value for 'UniqueId'.\n" | ||
| 89 | unless (defined $value); | ||
| 90 | return CORBA::Perl::MIOP::sequence_CORBA_Perl_CORBA_octet__stringify($value, $tab, 252); | ||
| 91 | } | ||
| 92 | |||
| 93 | sub UniqueId__id () { | ||
| 94 | return "IDL:omg.org/MIOP/UniqueId:1.0"; | ||
| 95 | } | ||
| 96 | |||
| 97 | # CORBA::Perl::MIOP::PacketHeader_1_0 (struct) | ||
| 98 | sub PacketHeader_1_0__marshal { | ||
| 99 | my ($r_buffer, $value) = @_; | ||
| 100 | croak "undefined value for 'PacketHeader_1_0'.\n" | ||
| 101 | unless (defined $value); | ||
| 102 | croak "invalid struct for 'PacketHeader_1_0' (not a HASH reference).\n" | ||
| 103 | unless (ref $value eq 'HASH'); | ||
| 104 | croak "no member 'magic' in structure 'PacketHeader_1_0'.\n" | ||
| 105 | unless (exists $value->{magic}); | ||
| 106 | croak "no member 'hdr_version' in structure 'PacketHeader_1_0'.\n" | ||
| 107 | unless (exists $value->{hdr_version}); | ||
| 108 | croak "no member 'flags' in structure 'PacketHeader_1_0'.\n" | ||
| 109 | unless (exists $value->{flags}); | ||
| 110 | croak "no member 'packet_length' in structure 'PacketHeader_1_0'.\n" | ||
| 111 | unless (exists $value->{packet_length}); | ||
| 112 | croak "no member 'packet_number' in structure 'PacketHeader_1_0'.\n" | ||
| 113 | unless (exists $value->{packet_number}); | ||
| 114 | croak "no member 'number_of_packets' in structure 'PacketHeader_1_0'.\n" | ||
| 115 | unless (exists $value->{number_of_packets}); | ||
| 116 | croak "no member 'id' in structure 'PacketHeader_1_0'.\n" | ||
| 117 | unless (exists $value->{id}); | ||
| 118 | local $_ = $value->{magic}; | ||
| 119 | croak "bad size of array 'magic'.\n" | ||
| 120 | unless (scalar(@{$_}) == 4); | ||
| 121 | foreach (@{$_}) { | ||
| 122 | CORBA::Perl::CORBA::char__marshal($r_buffer, $_); | ||
| 123 | } | ||
| 124 | CORBA::Perl::CORBA::octet__marshal($r_buffer, $value->{hdr_version}); | ||
| 125 | CORBA::Perl::CORBA::octet__marshal($r_buffer, $value->{flags}); | ||
| 126 | CORBA::Perl::CORBA::unsigned_short__marshal($r_buffer, $value->{packet_length}); | ||
| 127 | CORBA::Perl::CORBA::unsigned_long__marshal($r_buffer, $value->{packet_number}); | ||
| 128 | CORBA::Perl::CORBA::unsigned_long__marshal($r_buffer, $value->{number_of_packets}); | ||
| 129 | CORBA::Perl::MIOP::UniqueId__marshal($r_buffer, $value->{id}); | ||
| 130 | } | ||
| 131 | |||
| 132 | sub PacketHeader_1_0__demarshal { | ||
| 133 | my ($r_buffer, $r_offset, $endian) = @_; | ||
| 134 | my $value = {}; | ||
| 135 | my @magic_array1 = (); | ||
| 136 | for (my $idx1 = 0; $idx1 < 4; $idx1++) { | ||
| 137 | push @magic_array1, CORBA::Perl::CORBA::char__demarshal($r_buffer, $r_offset, $endian); | ||
| 138 | } | ||
| 139 | $value->{magic} = \@magic_array1; | ||
| 140 | $value->{hdr_version} = CORBA::Perl::CORBA::octet__demarshal($r_buffer, $r_offset, $endian); | ||
| 141 | $value->{flags} = CORBA::Perl::CORBA::octet__demarshal($r_buffer, $r_offset, $endian); | ||
| 142 | $value->{packet_length} = CORBA::Perl::CORBA::unsigned_short__demarshal($r_buffer, $r_offset, $endian); | ||
| 143 | $value->{packet_number} = CORBA::Perl::CORBA::unsigned_long__demarshal($r_buffer, $r_offset, $endian); | ||
| 144 | $value->{number_of_packets} = CORBA::Perl::CORBA::unsigned_long__demarshal($r_buffer, $r_offset, $endian); | ||
| 145 | $value->{id} = CORBA::Perl::MIOP::UniqueId__demarshal($r_buffer, $r_offset, $endian); | ||
| 146 | return $value; | ||
| 147 | } | ||
| 148 | |||
| 149 | sub PacketHeader_1_0__stringify { | ||
| 150 | my ($value, $tab) = @_; | ||
| 151 | $tab = q{} unless defined ($tab); | ||
| 152 | croak "undefined value for 'PacketHeader_1_0'.\n" | ||
| 153 | unless (defined $value); | ||
| 154 | croak "invalid struct for 'PacketHeader_1_0' (not a HASH reference).\n" | ||
| 155 | unless (ref $value eq 'HASH'); | ||
| 156 | croak "no member 'magic' in structure 'PacketHeader_1_0'.\n" | ||
| 157 | unless (exists $value->{magic}); | ||
| 158 | croak "no member 'hdr_version' in structure 'PacketHeader_1_0'.\n" | ||
| 159 | unless (exists $value->{hdr_version}); | ||
| 160 | croak "no member 'flags' in structure 'PacketHeader_1_0'.\n" | ||
| 161 | unless (exists $value->{flags}); | ||
| 162 | croak "no member 'packet_length' in structure 'PacketHeader_1_0'.\n" | ||
| 163 | unless (exists $value->{packet_length}); | ||
| 164 | croak "no member 'packet_number' in structure 'PacketHeader_1_0'.\n" | ||
| 165 | unless (exists $value->{packet_number}); | ||
| 166 | croak "no member 'number_of_packets' in structure 'PacketHeader_1_0'.\n" | ||
| 167 | unless (exists $value->{number_of_packets}); | ||
| 168 | croak "no member 'id' in structure 'PacketHeader_1_0'.\n" | ||
| 169 | unless (exists $value->{id}); | ||
| 170 | my $str = "struct PacketHeader_1_0 {"; | ||
| 171 | $str .= "\n$tab char[] magic = "; | ||
| 172 | local $_ = $value->{magic}; | ||
| 173 | croak "bad size of array 'magic'.\n" | ||
| 174 | unless (scalar(@{$_}) == 4); | ||
| 175 | $str .= "{"; | ||
| 176 | my $first1 = 1; | ||
| 177 | foreach (@{$_}) { | ||
| 178 | if ($first1) { | ||
| 179 | $first1 = 0; | ||
| 180 | } | ||
| 181 | else { | ||
| 182 | $str .= ","; | ||
| 183 | } | ||
| 184 | $str .= CORBA::Perl::CORBA::char__stringify($_, $tab . " "); | ||
| 185 | } | ||
| 186 | $str .= "}"; | ||
| 187 | $str .= ','; | ||
| 188 | $str .= "\n$tab octet hdr_version = "; | ||
| 189 | $str .= CORBA::Perl::CORBA::octet__stringify($value->{hdr_version}, $tab . " "); | ||
| 190 | $str .= ','; | ||
| 191 | $str .= "\n$tab octet flags = "; | ||
| 192 | $str .= CORBA::Perl::CORBA::octet__stringify($value->{flags}, $tab . " "); | ||
| 193 | $str .= ','; | ||
| 194 | $str .= "\n$tab unsigned_short packet_length = "; | ||
| 195 | $str .= CORBA::Perl::CORBA::unsigned_short__stringify($value->{packet_length}, $tab . " "); | ||
| 196 | $str .= ','; | ||
| 197 | $str .= "\n$tab unsigned_long packet_number = "; | ||
| 198 | $str .= CORBA::Perl::CORBA::unsigned_long__stringify($value->{packet_number}, $tab . " "); | ||
| 199 | $str .= ','; | ||
| 200 | $str .= "\n$tab unsigned_long number_of_packets = "; | ||
| 201 | $str .= CORBA::Perl::CORBA::unsigned_long__stringify($value->{number_of_packets}, $tab . " "); | ||
| 202 | $str .= ','; | ||
| 203 | $str .= "\n$tab UniqueId id = "; | ||
| 204 | $str .= CORBA::Perl::MIOP::UniqueId__stringify($value->{id}, $tab . " "); | ||
| 205 | $str .= "\n$tab}"; | ||
| 206 | return $str; | ||
| 207 | } | ||
| 208 | |||
| 209 | sub PacketHeader_1_0__id () { | ||
| 210 | return "IDL:omg.org/MIOP/PacketHeader_1_0:1.0"; | ||
| 211 | } | ||
| 212 | |||
| 213 | # CORBA::Perl::MIOP::Version (typedef) | ||
| 214 | sub Version__marshal { | ||
| 215 | my ($r_buffer, $value) = @_; | ||
| 216 | croak "undefined value for 'Version'.\n" | ||
| 217 | unless (defined $value); | ||
| 218 | CORBA::Perl::GIOP::Version__marshal($r_buffer, $value); | ||
| 219 | } | ||
| 220 | |||
| 221 | sub Version__demarshal { | ||
| 222 | my ($r_buffer, $r_offset, $endian) = @_; | ||
| 223 | return CORBA::Perl::GIOP::Version__demarshal($r_buffer, $r_offset, $endian); | ||
| 224 | } | ||
| 225 | |||
| 226 | sub Version__stringify { | ||
| 227 | my ($value, $tab) = @_; | ||
| 228 | croak "undefined value for 'Version'.\n" | ||
| 229 | unless (defined $value); | ||
| 230 | return CORBA::Perl::GIOP::Version__stringify($value, $tab); | ||
| 231 | } | ||
| 232 | |||
| 233 | sub Version__id () { | ||
| 234 | return "IDL:omg.org/MIOP/Version:1.0"; | ||
| 235 | } | ||
| 236 | |||
| 237 | # CORBA::Perl::MIOP::Address (typedef) | ||
| 238 | sub Address__marshal { | ||
| 239 | my ($r_buffer, $value) = @_; | ||
| 240 | croak "undefined value for 'Address'.\n" | ||
| 241 | unless (defined $value); | ||
| 242 | CORBA::Perl::CORBA::string__marshal($r_buffer, $value); | ||
| 243 | } | ||
| 244 | |||
| 245 | sub Address__demarshal { | ||
| 246 | my ($r_buffer, $r_offset, $endian) = @_; | ||
| 247 | return CORBA::Perl::CORBA::string__demarshal($r_buffer, $r_offset, $endian); | ||
| 248 | } | ||
| 249 | |||
| 250 | sub Address__stringify { | ||
| 251 | my ($value, $tab) = @_; | ||
| 252 | croak "undefined value for 'Address'.\n" | ||
| 253 | unless (defined $value); | ||
| 254 | return CORBA::Perl::CORBA::string__stringify($value, $tab); | ||
| 255 | } | ||
| 256 | |||
| 257 | sub Address__id () { | ||
| 258 | return "IDL:omg.org/MIOP/Address:1.0"; | ||
| 259 | } | ||
| 260 | |||
| 261 | # CORBA::Perl::MIOP::sequence_CORBA_Perl_IOP_TaggedComponent (sequence) | ||
| 262 | sub sequence_CORBA_Perl_IOP_TaggedComponent__marshal { | ||
| 263 | my ($r_buffer, $value, $max) = @_; | ||
| 264 | croak "undefined value for 'sequence_CORBA_Perl_IOP_TaggedComponent'.\n" | ||
| 265 | unless (defined $value); | ||
| 266 | my $len = scalar(@{$value}); | ||
| 267 | croak "too long sequence for 'sequence_CORBA_Perl_IOP_TaggedComponent' (max:$max).\n" | ||
| 268 | if (defined $max and $len > $max); | ||
| 269 | CORBA::Perl::CORBA::unsigned_long__marshal($r_buffer, $len); | ||
| 270 | foreach (@{$value}) { | ||
| 271 | CORBA::Perl::IOP::TaggedComponent__marshal($r_buffer, $_); | ||
| 272 | } | ||
| 273 | } | ||
| 274 | |||
| 275 | sub sequence_CORBA_Perl_IOP_TaggedComponent__demarshal { | ||
| 276 | my ($r_buffer, $r_offset, $endian) = @_; | ||
| 277 | my $len = CORBA::Perl::CORBA::unsigned_long__demarshal($r_buffer, $r_offset, $endian); | ||
| 278 | my @seq = (); | ||
| 279 | while ($len--) { | ||
| 280 | push @seq,CORBA::Perl::IOP::TaggedComponent__demarshal($r_buffer, $r_offset, $endian); | ||
| 281 | } | ||
| 282 | return \@seq; | ||
| 283 | } | ||
| 284 | |||
| 285 | sub sequence_CORBA_Perl_IOP_TaggedComponent__stringify { | ||
| 286 | my ($value, $tab, $max) = @_; | ||
| 287 | $tab = q{} unless (defined $tab); | ||
| 288 | croak "undefined value for 'sequence_CORBA_Perl_IOP_TaggedComponent'.\n" | ||
| 289 | unless (defined $value); | ||
| 290 | my $len = scalar(@{$value}); | ||
| 291 | croak "too long sequence for 'sequence_CORBA_Perl_IOP_TaggedComponent' (max:$max).\n" | ||
| 292 | if (defined $max and $len > $max); | ||
| 293 | my $str = '{'; | ||
| 294 | my $first = 1; | ||
| 295 | foreach (@{$value}) { | ||
| 296 | if ($first) { | ||
| 297 | $first = 0; | ||
| 298 | } | ||
| 299 | else { | ||
| 300 | $str .= ','; | ||
| 301 | } | ||
| 302 | $str .= "\n$tab "; | ||
| 303 | $str .= CORBA::Perl::IOP::TaggedComponent__stringify($_, $tab . q{ } x 2); | ||
| 304 | } | ||
| 305 | $str .= "\n$tab"; | ||
| 306 | $str .= '}'; | ||
| 307 | return $str; | ||
| 308 | } | ||
| 309 | |||
| 310 | # CORBA::Perl::MIOP::UIPMC_ProfileBody (struct) | ||
| 311 | sub UIPMC_ProfileBody__marshal { | ||
| 312 | my ($r_buffer, $value) = @_; | ||
| 313 | croak "undefined value for 'UIPMC_ProfileBody'.\n" | ||
| 314 | unless (defined $value); | ||
| 315 | croak "invalid struct for 'UIPMC_ProfileBody' (not a HASH reference).\n" | ||
| 316 | unless (ref $value eq 'HASH'); | ||
| 317 | croak "no member 'miop_version' in structure 'UIPMC_ProfileBody'.\n" | ||
| 318 | unless (exists $value->{miop_version}); | ||
| 319 | croak "no member 'the_address' in structure 'UIPMC_ProfileBody'.\n" | ||
| 320 | unless (exists $value->{the_address}); | ||
| 321 | croak "no member 'the_port' in structure 'UIPMC_ProfileBody'.\n" | ||
| 322 | unless (exists $value->{the_port}); | ||
| 323 | croak "no member 'components' in structure 'UIPMC_ProfileBody'.\n" | ||
| 324 | unless (exists $value->{components}); | ||
| 325 | CORBA::Perl::MIOP::Version__marshal($r_buffer, $value->{miop_version}); | ||
| 326 | CORBA::Perl::MIOP::Address__marshal($r_buffer, $value->{the_address}); | ||
| 327 | CORBA::Perl::CORBA::short__marshal($r_buffer, $value->{the_port}); | ||
| 328 | CORBA::Perl::MIOP::sequence_CORBA_Perl_IOP_TaggedComponent__marshal($r_buffer, $value->{components}); | ||
| 329 | } | ||
| 330 | |||
| 331 | sub UIPMC_ProfileBody__demarshal { | ||
| 332 | my ($r_buffer, $r_offset, $endian) = @_; | ||
| 333 | my $value = {}; | ||
| 334 | $value->{miop_version} = CORBA::Perl::MIOP::Version__demarshal($r_buffer, $r_offset, $endian); | ||
| 335 | $value->{the_address} = CORBA::Perl::MIOP::Address__demarshal($r_buffer, $r_offset, $endian); | ||
| 336 | $value->{the_port} = CORBA::Perl::CORBA::short__demarshal($r_buffer, $r_offset, $endian); | ||
| 337 | $value->{components} = CORBA::Perl::MIOP::sequence_CORBA_Perl_IOP_TaggedComponent__demarshal($r_buffer, $r_offset, $endian); | ||
| 338 | return $value; | ||
| 339 | } | ||
| 340 | |||
| 341 | sub UIPMC_ProfileBody__stringify { | ||
| 342 | my ($value, $tab) = @_; | ||
| 343 | $tab = q{} unless defined ($tab); | ||
| 344 | croak "undefined value for 'UIPMC_ProfileBody'.\n" | ||
| 345 | unless (defined $value); | ||
| 346 | croak "invalid struct for 'UIPMC_ProfileBody' (not a HASH reference).\n" | ||
| 347 | unless (ref $value eq 'HASH'); | ||
| 348 | croak "no member 'miop_version' in structure 'UIPMC_ProfileBody'.\n" | ||
| 349 | unless (exists $value->{miop_version}); | ||
| 350 | croak "no member 'the_address' in structure 'UIPMC_ProfileBody'.\n" | ||
| 351 | unless (exists $value->{the_address}); | ||
| 352 | croak "no member 'the_port' in structure 'UIPMC_ProfileBody'.\n" | ||
| 353 | unless (exists $value->{the_port}); | ||
| 354 | croak "no member 'components' in structure 'UIPMC_ProfileBody'.\n" | ||
| 355 | unless (exists $value->{components}); | ||
| 356 | my $str = "struct UIPMC_ProfileBody {"; | ||
| 357 | $str .= "\n$tab Version miop_version = "; | ||
| 358 | $str .= CORBA::Perl::MIOP::Version__stringify($value->{miop_version}, $tab . " "); | ||
| 359 | $str .= ','; | ||
| 360 | $str .= "\n$tab Address the_address = "; | ||
| 361 | $str .= CORBA::Perl::MIOP::Address__stringify($value->{the_address}, $tab . " "); | ||
| 362 | $str .= ','; | ||
| 363 | $str .= "\n$tab short the_port = "; | ||
| 364 | $str .= CORBA::Perl::CORBA::short__stringify($value->{the_port}, $tab . " "); | ||
| 365 | $str .= ','; | ||
| 366 | $str .= "\n$tab sequence_CORBA_Perl_IOP_TaggedComponent components = "; | ||
| 367 | $str .= CORBA::Perl::MIOP::sequence_CORBA_Perl_IOP_TaggedComponent__stringify($value->{components}, $tab . " "); | ||
| 368 | $str .= "\n$tab}"; | ||
| 369 | return $str; | ||
| 370 | } | ||
| 371 | |||
| 372 | sub UIPMC_ProfileBody__id () { | ||
| 373 | return "IDL:omg.org/MIOP/UIPMC_ProfileBody:1.0"; | ||
| 374 | } | ||
| 375 | |||
| 376 | |||
| 377 | # | ||
| 378 | # end of module CORBA::Perl::MIOP | ||
| 379 | # | ||
| 380 | |||
| 381 | package main; | ||
| 382 | |||
| 383 | 1; | ||
| 384 | |||
| 385 | # end of file : MIOP.pm | ||
| 386 | |||
| 387 | # Local variables: | ||
| 388 | # buffer-read-only: t | ||
| 389 | # End: |