summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/IFR_Service/Servant_Factory.h
blob: f4b928b966c78bd522581455aecd911f9fbb329c (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
// $Id$

//==========================================================================
//
// = LIBRARY
//     TAO/orbsvcs/IFR_Service
//
// = FILENAME
//     Servant_Factory.h
//
// = DESCRIPTION
//     Defines a factory class to create the various forms and types
//     of servants.
//
// = AUTHOR
//     Jeff Parsons
//
//==========================================================================

#ifndef IFR_SERVANT_FACTORY_H
#define IFR_SERVANT_FACTORY_H

#include "tao/PortableServerC.h"
#include "tao/ifrfwd.h"
#include "ace/Configuration.h"

class TAO_IDLType_i;
class TAO_Contained_i;
class TAO_Container_i;
class TAO_Repository_i;

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

class IFR_Servant_Factory
{
  // = TITLE
  //    Servant_Factory
  //
  // = DESCRIPTION
  //    This class is used to create _i classes, _tie classes and
  //    object references.
  //
public:
  IFR_Servant_Factory (TAO_Repository_i *repo);
  // constructor

  TAO_IDLType_i *create_idltype (ACE_Configuration_Section_Key key,
                                 CORBA::Environment &ACE_TRY_ENV);
  // For internal use - faster than creating an object reference and
  // sending a request, and can call utility functions not in IDL.

  TAO_Contained_i *create_contained (ACE_Configuration_Section_Key key,
                                     CORBA::Environment &ACE_TRY_ENV);
  // For internal use - faster than creating an object reference and
  // sending a request, and can call utility functions not in IDL.

  TAO_Container_i *create_container (ACE_Configuration_Section_Key key,
                                     CORBA::Environment &ACE_TRY_ENV);
  // For internal use - faster than creating an object reference and
  // sending a request, and can call utility functions not in IDL.

  PortableServer::Servant create_tie (ACE_Configuration_Section_Key key,
                                      PortableServer::POA_ptr poa,
                                      CORBA::Environment &ACE_TRY_ENV);
  // Used by the servant locator to create a servant.

  CORBA::Object_ptr create_objref (IR::DefinitionKind def_kind,
                                   const char *obj_id,
                                   CORBA::Environment &ACE_TRY_ENV);
  // Used to create return values.
private:
  TAO_Repository_i *repo_;
  // Reference to the repository, where most of the state is stored.
};

#endif /* IFR_SERVANT_FACTORY_H */