blob: 563a252d54ace27c6e4bd83a7df1b4ab3a872b12 (
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
|
// -*- C++ -*-
//=============================================================================
/**
* @file Any_Basic_Impl.h
*
* $Id$
*
* @authors Carlos O'Ryan and Jeff Parsons
*/
//=============================================================================
#ifndef TAO_ANY_BASIC_IMPL_H
#define TAO_ANY_BASIC_IMPL_H
#include /**/ "ace/pre.h"
#include "tao/AnyTypeCode/Any_Impl.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace CORBA
{
class Any;
}
namespace TAO
{
/**
* @class Any_Basic_Impl
*
* @brief Non-template class for all the basic types.
*
*/
class TAO_AnyTypeCode_Export Any_Basic_Impl : public Any_Impl
{
public:
Any_Basic_Impl (CORBA::TypeCode_ptr,
void *value);
virtual ~Any_Basic_Impl (void);
static void insert (CORBA::Any &,
CORBA::TypeCode_ptr,
const void *);
static CORBA::Boolean extract (const CORBA::Any &,
CORBA::TypeCode_ptr,
void *);
virtual CORBA::Boolean marshal_value (TAO_OutputCDR &);
CORBA::Boolean demarshal_value (TAO_InputCDR &);
CORBA::Boolean demarshal_value (TAO_InputCDR &,
CORBA::Long);
virtual void _tao_decode (TAO_InputCDR &
ACE_ENV_ARG_DECL);
static Any_Basic_Impl *create_empty (CORBA::TypeCode_ptr);
private:
static void assign_value (void *, Any_Basic_Impl *);
static void assign_value (void *,
Any_Basic_Impl *,
CORBA::Long tck);
private:
CORBA::Long kind_;
union
{
CORBA::Short s;
CORBA::UShort us;
CORBA::Long l;
CORBA::ULong ul;
CORBA::Float f;
CORBA::Double d;
CORBA::Boolean b;
CORBA::Char c;
CORBA::Octet o;
CORBA::LongLong ll;
#if !defined (ACE_LACKS_LONGLONG_T) && !defined (ACE_LACKS_UNSIGNEDLONGLONG_T)
CORBA::ULongLong ull;
#elif defined (ACE_LACKS_UNSIGNEDLONGLONG_T)
// Platform has signed long long but not unsigned long long.
// Use signed long long as the container.
CORBA::LongLong ull;
#endif
CORBA::LongDouble ld;
CORBA::WChar wc;
}u_;
};
}
TAO_END_VERSIONED_NAMESPACE_DECL
#include /**/ "ace/post.h"
#endif /* TAO_ANY_BASIC_IMPL_H */
|