summaryrefslogtreecommitdiff
path: root/TAO/tests/DynValue_Test/ValueTypes_impl.h
blob: 25bd32b13238d1a956bb158b471801a184d2cc39 (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
#ifndef INCLUDE_VALUETYPE_IMPL_H
#define INCLUDE_VALUETYPE_IMPL_H

#include "DynValue_TestC.h"

//============= Factory_id helper mix-in class ===========

class factory_id : public virtual CORBA::ValueFactoryBase
{
public:
  virtual const char * id () const = 0;
};

//============= "BaseValue" Value Type implimentation =======

class BaseValue_impl : public virtual OBV_DynValue_Test::BaseValue,
                       public virtual CORBA::DefaultValueRefCountBase
{
public:
  BaseValue_impl () {}
  BaseValue_impl (CORBA::UShort us1, CORBA::UShort us2)
  : OBV_DynValue_Test::BaseValue (us1,us2) {}
  virtual ~BaseValue_impl ();
  virtual CORBA::ValueBase * _copy_value (void);
  virtual void print ();
};

class BaseValue_Factory : public factory_id
{
public:
  const char * id () const;
  virtual CORBA::ValueBase * create_for_unmarshal ();
};

//============= "Nested" Value Type implimentation =======

class NestedValue_impl : public virtual OBV_DynValue_Test::NestedValue,
                         public virtual CORBA::DefaultValueRefCountBase
{
public:
  NestedValue_impl () {}
  NestedValue_impl (CORBA::Short s1, CORBA::Short s2)
  : OBV_DynValue_Test::NestedValue (s1,s2) {}
  virtual ~NestedValue_impl ();
  virtual CORBA::ValueBase * _copy_value (void);
};

class NestedValue_Factory : public factory_id
{
public:
  const char * id () const;
  virtual CORBA::ValueBase * create_for_unmarshal ();
};

//============= "Null" Value Type implimentation =======

class NullValue_impl : public virtual OBV_DynValue_Test::NullValue,
                       public virtual CORBA::DefaultValueRefCountBase
{
public:
  NullValue_impl () {}
  virtual ~NullValue_impl ();
  virtual CORBA::ValueBase * _copy_value (void);
};

class NullValue_Factory : public factory_id
{
public:
  const char * id () const;
  virtual CORBA::ValueBase * create_for_unmarshal ();
};

//============= "Trunc" Value Type implimentation =======

class Trunc_impl : public virtual OBV_DynValue_Test::Trunc,
                   public virtual CORBA::DefaultValueRefCountBase
{
public:
  Trunc_impl () {}
  Trunc_impl (
    CORBA::UShort us1,
    CORBA::UShort us2,
    DynValue_Test::BoxedLong *bl,
    NestedValue_impl *nv1,
    NullValue_impl *nv2,
    NullValue_impl *nv3,
    NullValue_impl *nv4)
  {
    this->Base_us1     (us1);
    this->Base_us2     (us2);
    this->Trunc_bl     (bl);
    this->Trunc_nested (nv1);
    this->Trunc_null1  (nv2);
    this->Trunc_null2  (nv3);
    this->Trunc_null3  (nv4);
  }
  virtual ~Trunc_impl ();
  virtual CORBA::ValueBase * _copy_value ();
  virtual void print ();
};

class Trunc_Factory : public factory_id
{
public:
  const char * id () const;
  virtual CORBA::ValueBase * create_for_unmarshal ();
};

#endif // INCLUDE_VALUETYPE_IMPL_H