summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableServer/IdUniquenessPolicy.cpp
blob: 97a312289aaedca1c003714d2def34d4456c77e6 (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
// -*- C++ -*-
#include "tao/PortableServer/IdUniquenessPolicy.h"
#include "tao/PortableServer/PortableServer.h"

#include "ace/CORBA_macros.h"

#if !defined (CORBA_E_MICRO)

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

namespace TAO
{
  namespace Portable_Server
  {
    IdUniquenessPolicy::IdUniquenessPolicy (
      ::PortableServer::IdUniquenessPolicyValue value) :
        value_ (value)
    {
    }

    CORBA::Policy_ptr
    IdUniquenessPolicy::copy ()
    {
      IdUniquenessPolicy *copy = nullptr;
      ACE_NEW_THROW_EX (copy,
                        IdUniquenessPolicy (this->value_),
                        CORBA::NO_MEMORY ());

      return copy;
    }

    void
    IdUniquenessPolicy::destroy ()
    {
    }

    ::PortableServer::IdUniquenessPolicyValue
    IdUniquenessPolicy::value ()
    {
      return value_;
    }

    CORBA::PolicyType
    IdUniquenessPolicy::policy_type ()
    {
      return ::PortableServer::ID_UNIQUENESS_POLICY_ID;
    }

    TAO_Cached_Policy_Type
    IdUniquenessPolicy::_tao_cached_type () const
    {
      return TAO_CACHED_POLICY_ID_UNIQUENESS;
    }

    TAO_Policy_Scope
    IdUniquenessPolicy::_tao_scope () const
    {
      return TAO_POLICY_POA_SCOPE;
    }
  }
}

TAO_END_VERSIONED_NAMESPACE_DECL

#endif