blob: e376a7061aa3cd93294150cd7213d9d76f9eda3d (
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
|
// -*- C++ -*-
//=============================================================================
/**
* @file Any_Impl.h
*
* $Id$
*
* @authors Carlos O'Ryan and Jeff Parsons
*/
//=============================================================================
#ifndef TAO_ANY_IMPL_H
#define TAO_ANY_IMPL_H
#include /**/ "ace/pre.h"
#include "ace/CORBA_macros.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "tao/Basic_Types.h"
#include "tao/TAO_Export.h"
#include "tao/orbconf.h"
class TAO_OutputCDR;
class TAO_InputCDR;
class ACE_Message_Block;
namespace CORBA
{
class TypeCode;
typedef TypeCode *TypeCode_ptr;
class Object;
typedef Object *Object_ptr;
class ValueBase;
class AbstractBase;
typedef AbstractBase *AbstractBase_ptr;
class Environment;
}
namespace TAO
{
/**
* @class Any_Impl
*
* @brief Base class for the Any template subclasses.
*
* Contains common functionality and some pure virtual methods.
*/
class TAO_Export Any_Impl
{
public:
/// Generated data types define a 'destructor' function that
/// correctly destroys an object stored in an Any.
typedef void (*_tao_destructor)(void *);
CORBA::Boolean marshal (TAO_OutputCDR &);
virtual CORBA::Boolean marshal_value (TAO_OutputCDR &) = 0;
virtual const void *value (void) const;
virtual void free_value (void);
CORBA::TypeCode_ptr type (void) const;
CORBA::TypeCode_ptr _tao_get_typecode (void) const;
void type (CORBA::TypeCode_ptr);
virtual ACE_Message_Block *_tao_get_cdr (void) const;
virtual int _tao_byte_order (void) const;
virtual void _add_ref (void);
virtual void _remove_ref (void);
/// Used to release these CORBA basic types.
static void _tao_any_string_destructor (void *);
static void _tao_any_wstring_destructor (void *);
virtual void _tao_decode (TAO_InputCDR &
ACE_ENV_ARG_DECL);
virtual void assign_translator (CORBA::TypeCode_ptr,
TAO_InputCDR *
ACE_ENV_ARG_DECL);
virtual CORBA::Boolean to_object (CORBA::Object_ptr &) const;
virtual CORBA::Boolean to_value (CORBA::ValueBase *&) const;
virtual CORBA::Boolean to_abstract_base (CORBA::AbstractBase_ptr &) const;
protected:
Any_Impl (_tao_destructor,
CORBA::TypeCode_ptr);
virtual ~Any_Impl (void);
TAO::Any_Impl::_tao_destructor value_destructor_;
CORBA::TypeCode_ptr type_;
private:
/// Number of outstanding references to this object.
CORBA::ULong refcount_;
};
}
#include /**/ "ace/post.h"
#endif /* TAO_ANY_IMPL_H */
|