summaryrefslogtreecommitdiff
path: root/TAO/examples/Load_Balancing_persistent/Identity_i.h
blob: 1a7df37cfbc2b0d0ee551f47d6440a1c920414de (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
/* -*- C++ -*- */
// $Id$
// ============================================================================
//
// = FILENAME
//   Identity_i.h
//
// = DESCRIPTION
//    Implements the interface in Identity.idl.
//
// = AUTHOR
//    Marina Spivak <marina@cs.wustl.edu>
//    with modifications by Bala Natarajan <bala@cs.wustl.edu>
// ============================================================================
#ifndef IDENTITY_I_H_
#define IDENTITY_I_H_

#include "IdentityS.h"

// This is to remove "inherits via dominance" warnings from MSVC.
#if defined (_MSC_VER)
# pragma warning (disable : 4250)
#endif /* _MSC_VER */

class Identity_i :
  public virtual POA_Identity,
  public virtual PortableServer::RefCountServantBase
{
  // = TITLE
  //    This class implements Identity.idl interface.
public:

  Identity_i (const char *name,
              PortableServer::POA_ptr poa);
  // Constructor - initializes the name of this object.

  ~Identity_i (void);
  // Destructor.

  virtual void get_name (CORBA::String_out name
                         ACE_ENV_ARG_DECL_WITH_DEFAULTS)
      ACE_THROW_SPEC ((CORBA::SystemException));
  // Returns the name of this object.

  PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL)
    ACE_THROW_SPEC ((CORBA::SystemException));
  // Method for the POA that will return the persistent POA_ptr stored
  // in here..

private:

  CORBA::String_var name_;
  // Stores the name of this object.

  PortableServer::POA_var poa_;
};

#endif /* IDENTITY_I_H_ */