summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-05-15 19:55:09 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-05-15 19:55:09 +0000
commitf59f055a750f4e96383d2f4c5e114df84a13fa30 (patch)
treeca6dbaf72e06b71605f1e042b9ebc6aafe38a2b1
parent19f80b904762ae623d94096a2b6ec973320bdf01 (diff)
downloadATCD-f59f055a750f4e96383d2f4c5e114df84a13fa30.tar.gz
Added create_native_tc and create_value_box_tc.
-rw-r--r--TAO/orbsvcs/IFR_Service/TypeCodeFactory_i.cpp50
1 files changed, 45 insertions, 5 deletions
diff --git a/TAO/orbsvcs/IFR_Service/TypeCodeFactory_i.cpp b/TAO/orbsvcs/IFR_Service/TypeCodeFactory_i.cpp
index 4e19768f535..f0ce8e60e90 100644
--- a/TAO/orbsvcs/IFR_Service/TypeCodeFactory_i.cpp
+++ b/TAO/orbsvcs/IFR_Service/TypeCodeFactory_i.cpp
@@ -97,7 +97,7 @@ TAO_TypeCodeFactory_i::create_enum_tc (
for (CORBA::ULong index = 0; index < len; index++)
{
- cdr << members[index].in ();
+ cdr << members[index];
}
CORBA::TypeCode_ptr enum_typecode =
@@ -379,8 +379,29 @@ TAO_TypeCodeFactory_i::create_value_box_tc (
)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- // TODO
- return 0;
+ TAO_OutputCDR cdr;
+
+ cdr << TAO_ENCAP_BYTE_ORDER;
+
+ cdr << id;
+
+ cdr << name;
+
+ cdr << boxed_type;
+
+ CORBA::TypeCode_ptr value_box_typecode =
+ CORBA::TypeCode::_nil ();
+
+ ACE_NEW_THROW_EX (value_box_typecode,
+ CORBA_TypeCode (CORBA::tk_value_box,
+ cdr.total_length (),
+ cdr.buffer (),
+ 0,
+ 0),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK_RETURN (CORBA::TypeCode::_nil ());
+
+ return value_box_typecode;
}
CORBA::TypeCode_ptr
@@ -391,8 +412,27 @@ TAO_TypeCodeFactory_i::create_native_tc (
)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- // TODO
- return 0;
+ TAO_OutputCDR cdr;
+
+ cdr << TAO_ENCAP_BYTE_ORDER;
+
+ cdr << id;
+
+ cdr << name;
+
+ CORBA::TypeCode_ptr native_typecode =
+ CORBA::TypeCode::_nil ();
+
+ ACE_NEW_THROW_EX (native_typecode,
+ CORBA_TypeCode (CORBA::tk_native,
+ cdr.total_length (),
+ cdr.buffer (),
+ 0,
+ 0),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK_RETURN (CORBA::TypeCode::_nil ());
+
+ return native_typecode;
}
CORBA::TypeCode_ptr