summaryrefslogtreecommitdiff
path: root/tests/Alt_Mapping/client.h
blob: fe39af905ca334dda64d5642cfd5b57b74595aa5 (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

//=============================================================================
/**
 *  @file    client.h
 *
 *  $Id$
 *
 *  Header file for the Alt_Mapping_Test client application.
 *
 *
 *  @author Aniruddha Gokhale
 */
//=============================================================================


#ifndef ALT_MAPPING_CLIENT_H
#define ALT_MAPPING_CLIENT_H

#include "tao/Codeset/Codeset.h"
#include "alt_mappingC.h"
#include "results.h"

/**
 * @class Alt_Mapping_Client
 *
 * @brief Alt_Mapping_Client
 *
 * This class declares an interface to run the example client for
 * Alt_Mapping CORBA server.  All the complexity for initializing
 * the client is hidden in the class.  Just the run () interface
 * is needed. The template class does the specific work of making
 * the request of the desired data type
 */
template <class T>
class Alt_Mapping_Client
{
public:
  typedef T TEST_OBJECT;

  // = Constructor and destructor.
  Alt_Mapping_Client (CORBA::ORB_ptr orb,
                     Alt_Mapping_ptr objref,
                     T *);

  ~Alt_Mapping_Client (void);

  /// run the SII test
  int run_sii_test (void);

private:
  /// underlying ORB
  CORBA::ORB_ptr orb_;

  /// alt mapping object reference
  Alt_Mapping_ptr alt_mapping_test_;

  /// object doing the actual work
  TEST_OBJECT *test_object_;

  /// results
  Results results_;
};

#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
#include "client.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */

#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
#pragma implementation ("client.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */

#endif /* ALT_MAPPING_CLIENT_H */