summaryrefslogtreecommitdiff
path: root/TAO/tao/DynamicAny/DynValueCommon_i.cpp
blob: 7a10595340961646db0eb37039cac8e65a0d02c7 (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
// -*- C++ -*-
#include "tao/DynamicAny/DynValueCommon_i.h"
#include "tao/AnyTypeCode/Any_Unknown_IDL_Type.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

TAO_DynValueCommon_i::TAO_DynValueCommon_i (CORBA::Boolean allow_truncation)
  : TAO_DynCommon (allow_truncation)
  , TAO_DynAny_i (allow_truncation)
  , is_null_ (true)
{
}

TAO_DynValueCommon_i::~TAO_DynValueCommon_i ()
{
}

CORBA::Boolean
TAO_DynValueCommon_i::is_null ()
{
  return this->is_null_;
}

void
TAO_DynValueCommon_i::set_to_null ()
{
  this->is_null_        = true;
  this->component_count_  = 0u;
  this->current_position_ = -1;
}

void
TAO_DynValueCommon_i::init_common ()
{
  this->ref_to_component_ = false;
  this->container_is_destroying_ = false;
  this->has_components_ = true;
  this->destroyed_ = false;
  this->set_to_value ();
}

TAO_DynValueCommon_i *
TAO_DynValueCommon_i::_narrow (CORBA::Object_ptr _tao_objref)
{
  return (CORBA::is_nil (_tao_objref)) ?
         0 :
         dynamic_cast<TAO_DynValueCommon_i *> (_tao_objref);
}

TAO_END_VERSIONED_NAMESPACE_DECL