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
|
//--------------------------------------------------------------------------//
// //
// POLYORB COMPONENTS //
// //
// B E N C H S //
// //
// I D L //
// //
// Copyright (C) 2009, Free Software Foundation, Inc. //
// //
// PolyORB is free software; you can redistribute it and/or modify it //
// under terms of the GNU General Public License as published by the Free //
// Software Foundation; either version 2, or (at your option) any later //
// version. PolyORB is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- //
// TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public //
// License for more details. You should have received a copy of the GNU //
// General Public License distributed with PolyORB; see file COPYING. If //
// not, write to the Free Software Foundation, 51 Franklin Street, Fifth //
// Floor, Boston, MA 02111-1301, USA. //
// //
// PolyORB is maintained by AdaCore //
// (email: sales@adacore.com) //
// //
//--------------------------------------------------------------------------//
// This IDL file is used to benchmarks CORBA application. Each
// function is expected to return a value equal to its parameter. It
// allows one to evaluate the impact of parameter
// marshalling/unmarshalling on ORB performance.
interface benchs {
// fonction without parameter
short noParameter ();
// procedure with variable name length
void azerty ();
// fonction with one parameter
// Simple types
boolean echoBoolean(in boolean arg) ;
short echoShort(in short arg) ;
long echoLong(in long arg) ;
float echoFloat(in float arg) ;
double echoDouble(in double arg) ;
char echoChar(in char arg) ;
wchar echoWChar(in wchar arg) ;
string echoString (in string arg) ;
wstring echoWstring (in wstring arg) ;
// Enum
enum Color { Red, Green, Blue };
Color echoColor (in Color arg);
// Array of enum
typedef Color Rainbow[7];
Rainbow echoRainbow (in Rainbow arg);
// Unions
union myUnion switch (long) {
case 1: long Counter;
case 2: boolean Flag;
case 3: Color Hue;
default: long Unknown;
};
myUnion echoUnion (in myUnion arg);
union myUnionEnumSwitch switch (Color) {
case Red: long foo;
case Green: short bar;
case Blue: string baz;
};
myUnionEnumSwitch echoUnionEnumSwitch (in myUnionEnumSwitch arg);
// Structs
struct simple_struct {
long a;
string s;
};
simple_struct echoStruct (in simple_struct arg);
struct array_struct {
long a[10];
unsigned short b;
};
array_struct echoArrayStruct (in array_struct arg);
// Big arrays
// ----------
typedef long sixteenKb[64][64];
sixteenKb echoSixteenKb (in sixteenKb arg);
// struct composite_struct {
// fixed<12,3> fixedMember;
// sequence<sequence<octet> > seqseqMember;
// long double matrixMember[3][4];
// };
struct nested_struct {
simple_struct ns;
};
nested_struct echoNestedStruct (in nested_struct arg);
// Sequences
typedef sequence<short> U_sequence;
U_sequence echoUsequence (in U_sequence arg);
// stop the server
void StopServer ();
};
|