summaryrefslogtreecommitdiff
path: root/TAO/Benchmark/Marshal_Test/Orbix/orbix_marshal_client.h
blob: c22f71f0d1670bddd13485eaa172a4d731e56372 (plain)
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
// $Id$

// ============================================================================
//
// = LIBRARY
//    CORBA Marshal Orbix Benchmark
//
// = FILENAME
//    orbix_marshal_client.h
//
// = AUTHOR
//    Aniruddha Gokhale
//
// ============================================================================

#ifndef _ORBIX_MARSHAL_CLIENT_H_
#define _ORBIX_MARSHAL_CLIENT_H_

// benchmark library includes
#include "benchmark/marshal_options.h"
#include "benchmark/marshal_results.h"
#include "benchmark/marshal_proxy.h"

// include Orbix specific include files
#include "marshal.h"  // generated by IDL compiler

class Orbix_Marshal_Client_Proxy : public CORBA_Marshal_Proxy
{
  // =TITLE
  //  Orbix_Marshal_Client_Proxy
  // =DESCRIPTION
  //  Orbix client size specialization of the CORBA Marshal proxy class
public:
  Orbix_Marshal_Client_Proxy (void);
  // constructor

  ~Orbix_Marshal_Client_Proxy (void);
  // destructor

  virtual int run (CORBA_Marshal_Proxy::OPTIONS &options,
                   CORBA_Marshal_Proxy::RESULTS &results);
  // do the actual work

  virtual int use_sii (CORBA_Marshal_Proxy::OPTIONS &options,
                       CORBA_Marshal_Proxy::RESULTS &results);
  // use the static invocation interface

  virtual int use_dii (CORBA_Marshal_Proxy::OPTIONS &options,
                       CORBA_Marshal_Proxy::RESULTS &results);
  // use the dynamic invocation interface
private:
  // =helper functions
  int sii_test_short (CORBA_Marshal_Proxy::OPTIONS &options,
                      CORBA_Marshal_Proxy::RESULTS &results);

  int sii_test_long (CORBA_Marshal_Proxy::OPTIONS &options,
                     CORBA_Marshal_Proxy::RESULTS &results);

  int sii_test_octet (CORBA_Marshal_Proxy::OPTIONS &options,
                      CORBA_Marshal_Proxy::RESULTS &results);

  int sii_test_char (CORBA_Marshal_Proxy::OPTIONS &options,
                     CORBA_Marshal_Proxy::RESULTS &results);

  int sii_test_double (CORBA_Marshal_Proxy::OPTIONS &options,
                       CORBA_Marshal_Proxy::RESULTS &results);

  int sii_test_struct (CORBA_Marshal_Proxy::OPTIONS &options,
                       CORBA_Marshal_Proxy::RESULTS &results);

  int sii_test_union (CORBA_Marshal_Proxy::OPTIONS &options,
                      CORBA_Marshal_Proxy::RESULTS &results);

  int sii_test_any (CORBA_Marshal_Proxy::OPTIONS &options,
                    CORBA_Marshal_Proxy::RESULTS &results);

  int sii_test_sequence (CORBA_Marshal_Proxy::OPTIONS &options,
                         CORBA_Marshal_Proxy::RESULTS &results);

  int sii_test_recursive (CORBA_Marshal_Proxy::OPTIONS &options,
                          CORBA_Marshal_Proxy::RESULTS &results);

  // all the DII helpers
  int dii_test_short (CORBA_Marshal_Proxy::OPTIONS &options,
                      CORBA_Marshal_Proxy::RESULTS &results);

  int dii_test_long (CORBA_Marshal_Proxy::OPTIONS &options,
                     CORBA_Marshal_Proxy::RESULTS &results);

  int dii_test_octet (CORBA_Marshal_Proxy::OPTIONS &options,
                      CORBA_Marshal_Proxy::RESULTS &results);

  int dii_test_char (CORBA_Marshal_Proxy::OPTIONS &options,
                     CORBA_Marshal_Proxy::RESULTS &results);

  int dii_test_double (CORBA_Marshal_Proxy::OPTIONS &options,
                       CORBA_Marshal_Proxy::RESULTS &results);

  int dii_test_struct (CORBA_Marshal_Proxy::OPTIONS &options,
                       CORBA_Marshal_Proxy::RESULTS &results);

  int dii_test_union (CORBA_Marshal_Proxy::OPTIONS &options,
                      CORBA_Marshal_Proxy::RESULTS &results);

  int dii_test_any (CORBA_Marshal_Proxy::OPTIONS &options,
                    CORBA_Marshal_Proxy::RESULTS &results);

  int dii_test_sequence (CORBA_Marshal_Proxy::OPTIONS &options,
                         CORBA_Marshal_Proxy::RESULTS &results);

  int dii_test_recursive (CORBA_Marshal_Proxy::OPTIONS &options,
                          CORBA_Marshal_Proxy::RESULTS &results);

  CORBA::ORB_ptr orb_;
  // handle to the underlying orb

  Marshal_ptr ref_;
  // the object reference
};

#if defined (__ACE_INLINE__)
#include "orbix_marshal_client.i"
#endif /* __ACE_INLINE__ */

#endif