summaryrefslogtreecommitdiff
path: root/TAO/tao/Principal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Principal.cpp')
-rw-r--r--TAO/tao/Principal.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/TAO/tao/Principal.cpp b/TAO/tao/Principal.cpp
index ce31a26935c..b6abcf7ee94 100644
--- a/TAO/tao/Principal.cpp
+++ b/TAO/tao/Principal.cpp
@@ -27,7 +27,7 @@ CORBA::Principal::~Principal (void)
}
CORBA::Boolean
-operator<< (TAO_OutputCDR& cdr, CORBA::Principal* x)
+operator<< (TAO_OutputCDR & cdr, CORBA::Principal * x)
{
if (x != 0)
{
@@ -39,14 +39,16 @@ operator<< (TAO_OutputCDR& cdr, CORBA::Principal* x)
{
cdr.write_ulong (0);
}
+
return (CORBA::Boolean) cdr.good_bit ();
}
CORBA::Boolean
-operator>> (TAO_InputCDR& cdr, CORBA::Principal*& x)
+operator>> (TAO_InputCDR & cdr, CORBA::Principal *& x)
{
CORBA::ULong length;
cdr.read_ulong (length);
+
if (length == 0 || !cdr.good_bit ())
{
x = 0;
@@ -57,5 +59,19 @@ operator>> (TAO_InputCDR& cdr, CORBA::Principal*& x)
x->id.length (length);
cdr.read_octet_array (x->id.get_buffer (), length);
}
+
return (CORBA::Boolean) cdr.good_bit ();
}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+
+ template class TAO_Pseudo_Var_T<CORBA::Principal>;
+ template class TAO_Pseudo_Out_T<CORBA::Principal, CORBA::Principal_var>;
+
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+
+# pragma instantiate TAO_Pseudo_Var_T<CORBA::Principal>
+# pragma instantiate TAO_Pseudo_Out_T<CORBA::Principal, CORBA::Principal_var>
+
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+