summaryrefslogtreecommitdiff
path: root/tests/CSD_Collocation/Collocation_Tester.h
blob: 025f0398008226f282ffad99e44a59ce1cea1a46 (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

//=============================================================================
/**
 *  @file     Collocation_Tester.h
 *
 *  $Id$
 *
 *   Server class to perform testing of TAO's collocation mechanism.
 *
 *  @author  Nanbor Wang
 */
//=============================================================================


#if !defined (TAO_COLLOCATION_TEST_H)
#define TAO_COLLOCATION_TEST_H

#include "Diamond_i.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

class Collocation_Test
{
public:
  Collocation_Test (void);

  void shutdown (void);

  /// Initializing the Collocation_Test object.
  int init (int argc, ACE_TCHAR *argv[]);

  /// Parse the test specific arguments.
  int parse_args (int argc, ACE_TCHAR *argv[]);

  /// This test narrow an object reference to its base class and see
  /// if it works correctly.
  int test_narrow (void);

  /// Run the test.
  int run (void);

private:
  CORBA::ORB_var orb_;

  PortableServer::POA_var root_poa_;

  PortableServer::POAManager_var poa_manager_;

  /// Our basic test object.
  CORBA::Object_var diamond_obj_;

  /// A collection of servant for basic narrowing test.
  Top_i top_servant_;
  Left_i left_servant_;
  Right_i right_servant_;
  Buttom_i diamond_servant_;
};

#endif /* TAO_COLLOCATION_TEST_H */