summaryrefslogtreecommitdiff
path: root/TAO/tao/BiDirPolicyC.cpp
blob: 0ad66a3c92070077840936fd5c3a4a805343a1a1 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// -*- C++ -*-
//
// $Id$

// ****  Code generated by the The ACE ORB (TAO) IDL Compiler ****
// TAO and the TAO IDL Compiler have been developed by:
//       Center for Distributed Object Computing
//       Washington University
//       St. Louis, MO
//       USA
//       http://www.cs.wustl.edu/~schmidt/doc-center.html
// and
//       Distributed Object Computing Laboratory
//       University of California at Irvine
//       Irvine, CA
//       USA
//       http://doc.ece.uci.edu/
//
// Information about TAO is available at:
//     http://www.cs.wustl.edu/~schmidt/TAO.html

#include "BiDirPolicyC.h"

#if !defined (__ACE_INLINE__)
#include "BiDirPolicyC.i"
#endif /* !defined INLINE */

static const CORBA::Long _oc_BiDirPolicy_BidirectionalPolicyValue[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  45, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x42694469), ACE_NTOHL (0x72506f6c), ACE_NTOHL (0x6963792f), ACE_NTOHL (0x42696469), ACE_NTOHL (0x72656374), ACE_NTOHL (0x696f6e61), ACE_NTOHL (0x6c506f6c), ACE_NTOHL (0x69637956), ACE_NTOHL (0x616c7565), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0),  // repository ID = IDL:BiDirPolicy/BidirectionalPolicyValue:1.0
  25, ACE_NTOHL (0x42696469), ACE_NTOHL (0x72656374), ACE_NTOHL (0x696f6e61), ACE_NTOHL (0x6c506f6c), ACE_NTOHL (0x69637956), ACE_NTOHL (0x616c7565), ACE_NTOHL (0x0),  // name = BidirectionalPolicyValue
  CORBA::tk_ushort,

};
static CORBA::TypeCode _tc_TAO_tc_BiDirPolicy_BidirectionalPolicyValue (CORBA::tk_alias, sizeof (_oc_BiDirPolicy_BidirectionalPolicyValue), (char *) &_oc_BiDirPolicy_BidirectionalPolicyValue, 0, sizeof (BiDirPolicy::BidirectionalPolicyValue));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (BiDirPolicy)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_BidirectionalPolicyValue, &_tc_TAO_tc_BiDirPolicy_BidirectionalPolicyValue)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::UShort)
TAO_NAMESPACE_BEGIN (BiDirPolicy)
TAO_NAMESPACE_DEFINE (const CORBA::UShort, NORMAL, 0U)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::UShort)
TAO_NAMESPACE_BEGIN (BiDirPolicy)
TAO_NAMESPACE_DEFINE (const CORBA::UShort, BOTH, 1U)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (BiDirPolicy)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, BIDIRECTIONAL_POLICY_TYPE, 37U)
TAO_NAMESPACE_END

// default constructor
BiDirPolicy::BidirectionalPolicy::BidirectionalPolicy ()
{
  }

// destructor
BiDirPolicy::BidirectionalPolicy::~BidirectionalPolicy (void)
{}

BiDirPolicy::BidirectionalPolicy_ptr BiDirPolicy::BidirectionalPolicy::_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &ACE_TRY_ENV
  )
{
  return BidirectionalPolicy::_unchecked_narrow (obj, ACE_TRY_ENV);
}

BiDirPolicy::BidirectionalPolicy_ptr BiDirPolicy::BidirectionalPolicy::_unchecked_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &
  )
{
  if (CORBA::is_nil (obj))
    return BidirectionalPolicy::_nil ();
  return
      ACE_reinterpret_cast
        (
          BidirectionalPolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &BidirectionalPolicy::_narrow
                  )
              )
        );
}

BiDirPolicy::BidirectionalPolicy_ptr
BiDirPolicy::BidirectionalPolicy::_duplicate (BidirectionalPolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *BiDirPolicy::BidirectionalPolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::BiDirPolicy, BidirectionalPolicy)::_narrow))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_narrow))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));
    
  if (retv)
    this->_add_ref ();
  return retv;
}

const char* BiDirPolicy::BidirectionalPolicy::_interface_repository_id (void) const
{
  return "IDL:BiDirPolicy/BidirectionalPolicy:1.0";
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<BiDirPolicy::BidirectionalPolicy,BiDirPolicy::BidirectionalPolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<BiDirPolicy::BidirectionalPolicy,BiDirPolicy::BidirectionalPolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */