File: benchs.idl

package info (click to toggle)
polyorb 2.11~20140418-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 30,012 kB
  • ctags: 465
  • sloc: ada: 273,015; sh: 4,507; makefile: 4,265; python: 1,332; cpp: 1,213; java: 507; ansic: 274; xml: 30; perl: 23; exp: 6
file content (115 lines) | stat: -rw-r--r-- 4,068 bytes parent folder | download | duplicates (2)
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 ();  
};