summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Identification_Service.h
blob: 96a1e7abc1f4f9764db9343b835948bcd66c1d03 (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
// -*- C++ -*-

//=============================================================================
/**
 *  @file   Identification_Service.h
 *
 *  $Id$
 *
 *  @author Huang-Ming Huang <hh1@cse.wustl.edu>
 */
//=============================================================================

#ifndef IDENTIFICATION_SERVICE_H
#define IDENTIFICATION_SERVICE_H

#include "ace/Service_Object.h"
#include "PortableServer/PortableServerC.h"
#include "orbsvcs/CosNamingC.h"
#include "orbsvcs/FTRTC.h"
#include "ftrtec_export.h"

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

namespace FTRTEC
{
  class Identification_Service : public ACE_Service_Object
  {
  public:
    Identification_Service();
    ~Identification_Service();

    /**
    * This function returns 0 when init is not called yet.
    */
    static Identification_Service* instance();

    int init(int argc, ACE_TCHAR* argv[]);

    const PortableServer::ObjectId& object_id() const;
    const CosNaming::Name& name() const;
  private:
    PortableServer::ObjectId object_id_;
    CosNaming::Name name_;
  };


  ACE_STATIC_SVC_DECLARE_EXPORT (TAO_FTRTEC, Identification_Service)
  ACE_STATIC_SVC_REQUIRE(Identification_Service)
  ACE_FACTORY_DECLARE (TAO_FTRTEC, Identification_Service)
}

#endif