summaryrefslogtreecommitdiff
path: root/TAO/tao/IORTable/Table_Adapter.h
blob: 844903b050c38ee5087fdecc04d7db76bbe6a36d (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
/* -*- C++ -*- */
// $Id$

// ============================================================================
//
// = LIBRARY
//    IORTable
//
// = FILENAME
//    Object_Adapter.h
//
// = AUTHOR
//    Carlos O'Ryan (coryan@uci.edu)
//
// ============================================================================

#ifndef TAO_TABLE_ADAPTER_H
#define TAO_TABLE_ADAPTER_H
#include "ace/pre.h"

#include "iortable_export.h"

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

#include "tao/Adapter.h"
#include "ace/Service_Config.h"

class TAO_IOR_Table_Impl;

class TAO_IORTable_Export TAO_Table_Adapter : public TAO_Adapter
{
public:
  TAO_Table_Adapter (TAO_ORB_Core *orb_core);
  // Constructor

  virtual ~TAO_Table_Adapter (void);
  // Destructor

  // = The TAO_Adapter methods, please check tao/Adapter.h for the
  // documentation
  virtual void open (CORBA::Environment &ACE_TRY_ENV);
  virtual void close (int wait_for_completion,
                      CORBA::Environment &ACE_TRY_ENV);
  virtual void check_close (int wait_for_completion,
                            CORBA::Environment &ACE_TRY_ENV);
  virtual int priority (void) const;
  virtual int dispatch (TAO_ObjectKey &key,
                        CORBA::ServerRequest &request,
                        void *context, /* unused? */
                        CORBA::Object_out foward_to,
                        CORBA::Environment &ACE_TRY_ENV)
    ACE_THROW_SPEC ((CORBA::SystemException));
  virtual const char *name (void) const;
  virtual CORBA::Object_ptr root (void);
  virtual CORBA::Object_ptr create_collocated_object (TAO_Stub *,
                                                      const TAO_MProfile &);

private:
  TAO_ORB_Core *orb_core_;
  // The ORB Core we belong to

  TAO_IOR_Table_Impl *root_;
  // The table implementation
};

// ****************************************************************

class TAO_IORTable_Export TAO_Table_Adapter_Factory : public TAO_Adapter_Factory
{
public:
  TAO_Table_Adapter_Factory (void);
  // Constructor

  // = The TAO_Adapter_Factory methods, please read tao/Adapter.h for
  // details.
  virtual TAO_Adapter *create (TAO_ORB_Core *orb_core);
};

ACE_STATIC_SVC_DECLARE (TAO_Table_Adapter_Factory)
ACE_FACTORY_DECLARE (TAO_IORTable, TAO_Table_Adapter_Factory)

#include "ace/post.h"
#endif /* TAO_TABLE_ADAPTER_H */