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
|
// $Id$
#include "Factory.h"
#include "tao/AnyTypeCode/TypeCode.h"
void
NodeFactory::register_new_factory (CORBA::ORB& orb) {
CORBA::ValueFactoryBase_var mf = new NodeFactory;
CORBA::String_var id = ::demo::value::idl::_tc_Node->id ();
orb.register_value_factory (id.in (), mf.in ());
}
CORBA::ValueBase*
NodeFactory::create_for_unmarshal (void)
{
::CORBA::ValueBase *ret_val = 0;
ACE_NEW_THROW_EX (
ret_val,
OBV_demo::value::idl::Node,
::CORBA::NO_MEMORY ()
);
return ret_val;
}
void
BoxedValueFactory::register_new_factory (CORBA::ORB& orb) {
CORBA::ValueFactoryBase_var mf = new BoxedValueFactory;
demo::value::idl::boxedValue_var bv (new OBV_demo::value::idl::boxedValue);
CORBA::String_var id = bv->_tao_type ()->id ();;
orb.register_value_factory (id.in (), mf.in ());
}
CORBA::ValueBase*
BoxedValueFactory::create_for_unmarshal (void)
{
::CORBA::ValueBase *ret_val = 0;
ACE_NEW_THROW_EX (
ret_val,
OBV_demo::value::idl::boxedValue,
::CORBA::NO_MEMORY ()
);
return ret_val;
}
void
BaseValueFactory::register_new_factory (CORBA::ORB& orb) {
CORBA::ValueFactoryBase_var mf = new BaseValueFactory;
demo::value::idl::BaseValue_var bv (new OBV_demo::value::idl::BaseValue);
CORBA::String_var id = bv->_tao_type ()->id ();
orb.register_value_factory (id.in (), mf.in ());
}
CORBA::ValueBase*
BaseValueFactory::create_for_unmarshal (void)
{
::CORBA::ValueBase *ret_val = 0;
ACE_NEW_THROW_EX (
ret_val,
OBV_demo::value::idl::BaseValue,
::CORBA::NO_MEMORY ()
);
return ret_val;
}
void
TValueFactory::register_new_factory (CORBA::ORB& orb) {
CORBA::ValueFactoryBase_var mf = new TValueFactory;
demo::value::idl::TValue_var bv (new OBV_demo::value::idl::TValue);
CORBA::String_var id = bv->_tao_type ()->id ();
orb.register_value_factory (id.in (), mf.in ());
}
CORBA::ValueBase*
TValueFactory::create_for_unmarshal (void)
{
::CORBA::ValueBase *ret_val = 0;
ACE_NEW_THROW_EX (
ret_val,
OBV_demo::value::idl::TValue,
::CORBA::NO_MEMORY ()
);
return ret_val;
}
void
ConfigValueFactory::register_new_factory (CORBA::ORB& orb) {
CORBA::ValueFactoryBase_var mf = new ConfigValueFactory;
demo::value::idl::ConfigValue_var bv (new OBV_demo::value::idl::ConfigValue);
CORBA::String_var id = bv->_tao_type ()->id ();
orb.register_value_factory (id.in (), mf.in ());
}
CORBA::ValueBase*
ConfigValueFactory::create_for_unmarshal (void)
{
::CORBA::ValueBase *ret_val = 0;
ACE_NEW_THROW_EX (
ret_val,
OBV_demo::value::idl::ConfigValue,
::CORBA::NO_MEMORY ()
);
return ret_val;
}
ConfigValueImpl::ConfigValueImpl (const char* name, const char* value)
{
this->name (name);
this->value () <<= value;
}
|