summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-04-12 19:33:30 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-04-12 19:33:30 +0000
commitd9b71f3d08df2ac3627b75ac82d56584d05ab223 (patch)
treefbc40a26a8385726d8382d2496fc4987f9edbe91
parent27e4677aa095cc59874912704011c9ff8b4a3136 (diff)
downloadATCD-d9b71f3d08df2ac3627b75ac82d56584d05ab223.tar.gz
ChangeLogTag: Mon Apr 12 19:30:47 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--modules/TAO/ChangeLog18
-rw-r--r--modules/TAO/TAO_IDL/be/be_codegen.cpp6
-rw-r--r--modules/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp6
-rw-r--r--modules/TAO/tao/Vector_Argument_T.cpp32
-rw-r--r--modules/TAO/tao/Vector_Argument_T.h18
-rw-r--r--modules/TAO/tao/Vector_Argument_T.inl28
6 files changed, 61 insertions, 47 deletions
diff --git a/modules/TAO/ChangeLog b/modules/TAO/ChangeLog
index a62607e99ab..bd47898e6cf 100644
--- a/modules/TAO/ChangeLog
+++ b/modules/TAO/ChangeLog
@@ -1,3 +1,21 @@
+Mon Apr 12 19:30:47 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/be/be_codegen.cpp:
+
+ Added conditional include of vector argument class
+ header file.
+
+ * TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp:
+
+ Fixed typos in generated code, and added check to
+ skip bounded sequences for now.
+
+ * tao/Vector_Argument_T.inl:
+ * tao/Vector_Argument_T.h:
+ * tao/Vector_Argument_T.cpp:
+
+ Overhauled signatures of most methods.
+
Fri Apr 9 20:39:11 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
* MPC/config/stl_mapping.mpb:
diff --git a/modules/TAO/TAO_IDL/be/be_codegen.cpp b/modules/TAO/TAO_IDL/be/be_codegen.cpp
index d0157a4f97d..d8fbb7daeae 100644
--- a/modules/TAO/TAO_IDL/be/be_codegen.cpp
+++ b/modules/TAO/TAO_IDL/be/be_codegen.cpp
@@ -2801,6 +2801,12 @@ TAO_CodeGen::gen_stub_arg_file_includes (TAO_OutStream * stream)
);
this->gen_cond_file_include (
+ idl_global->seq_seen_ && be_global->alt_mapping (),
+ "tao/Vector_Argument_T.h",
+ stream
+ );
+
+ this->gen_cond_file_include (
idl_global->any_arg_seen_,
"tao/AnyTypeCode/Any_Arg_Traits.h",
stream
diff --git a/modules/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp b/modules/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
index 8066d7533b6..4529ab1ef1d 100644
--- a/modules/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
+++ b/modules/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
@@ -52,7 +52,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node)
*os << be_global->core_versioning_begin () << be_nl;
// These are no-ops for now, so we just generate them and return
- if (be_global->alt_mapping ())
+ if (be_global->alt_mapping () && node->max_size ()->ev ()->u.ulval == 0)
{
be_type *bt =
be_type::narrow_from_decl (node->base_type ());
@@ -86,7 +86,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node)
<< "void operator<<= (" << be_idt_nl
<< "::CORBA::Any &_tao_any," << be_nl
<< "const std::vector<" << bt->full_name ()
- << "> &_tao_elem" << be_uidt_nl
+ << "> &_tao_elem)" << be_uidt_nl
<< "{" << be_idt_nl
<< "TAO::";
@@ -118,7 +118,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node)
<< "::CORBA::Boolean operator>>= (" << be_idt_nl
<< "const ::CORBA::Any &_tao_any," << be_nl
<< "std::vector<" << bt->full_name ()
- << "> &_tao_elem" << be_uidt_nl
+ << "> &_tao_elem)" << be_uidt_nl
<< "{" << be_idt_nl
<< "return" << be_idt_nl
<< "TAO::";
diff --git a/modules/TAO/tao/Vector_Argument_T.cpp b/modules/TAO/tao/Vector_Argument_T.cpp
index 95e9bb3599d..c2c76c9b80e 100644
--- a/modules/TAO/tao/Vector_Argument_T.cpp
+++ b/modules/TAO/tao/Vector_Argument_T.cpp
@@ -16,7 +16,7 @@ template<typename S,
CORBA::Boolean
TAO::In_Vector_Argument_T<S,Insert_Policy>::marshal (TAO_OutputCDR &cdr)
{
- return cdr << *this->x_;
+ return cdr << this->x_;
}
#if TAO_HAS_INTERCEPTORS == 1
@@ -28,7 +28,7 @@ TAO::In_Vector_Argument_T<S,Insert_Policy>::interceptor_value (
CORBA::Any *any
) const
{
- Insert_Policy::any_insert (any, *this->x_);
+ Insert_Policy::any_insert (any, this->x_);
}
#endif /* TAO_HAS_INTERCEPTORS */
@@ -39,7 +39,7 @@ TAO::In_Vector_Clonable_Argument_T<S,Insert_Policy>::~In_Vector_Clonable_Argumen
{
if (this->is_clone_)
{
- S* tmp = const_cast<S*> (this->x_);
+ S & tmp = const_cast<S &> (this->x_);
delete tmp;
}
}
@@ -49,7 +49,7 @@ template<typename S,
TAO::Argument*
TAO::In_Vector_Clonable_Argument_T<S,Insert_Policy>::clone (void)
{
- S* clone_x = new S (*(this->x_));
+ S* clone_x = new S (this->x_);
In_Vector_Clonable_Argument_T<S,Insert_Policy>* clone_arg
= new In_Vector_Clonable_Argument_T<S,Insert_Policy> (*clone_x);
clone_arg->is_clone_ = true;
@@ -65,7 +65,7 @@ TAO::Inout_Vector_Argument_T<S,Insert_Policy>::marshal (
TAO_OutputCDR &cdr
)
{
- return cdr << *this->x_;
+ return cdr << this->x_;
}
template<typename S,
@@ -75,7 +75,7 @@ TAO::Inout_Vector_Argument_T<S,Insert_Policy>::demarshal (
TAO_InputCDR & cdr
)
{
- return cdr >> *this->x_;
+ return cdr >> this->x_;
}
#if TAO_HAS_INTERCEPTORS == 1
@@ -87,7 +87,7 @@ TAO::Inout_Vector_Argument_T<S,Insert_Policy>::interceptor_value (
CORBA::Any *any
) const
{
- Insert_Policy::any_insert (any, *this->x_);
+ Insert_Policy::any_insert (any, this->x_);
}
#endif /* TAO_HAS_INTERCEPTORS */
@@ -101,12 +101,7 @@ TAO::Out_Vector_Argument_T<S,Insert_Policy>::demarshal (
TAO_InputCDR & cdr
)
{
-#if defined (ACE_HAS_NEW_NOTHROW)
- this->x_ = new (ACE_nothrow) S;
-#else
- this->x_ = new S;
-#endif /* ACE_HAS_NEW_NOTHROW */
- return cdr >> *this->x_;
+ return cdr >> this->x_;
}
#if TAO_HAS_INTERCEPTORS == 1
@@ -118,7 +113,7 @@ TAO::Out_Vector_Argument_T<S,Insert_Policy>::interceptor_value (
CORBA::Any *any
) const
{
- Insert_Policy::any_insert (any, *this->x_);
+ Insert_Policy::any_insert (any, this->x_);
}
#endif /* TAO_HAS_INTERCEPTORS */
@@ -132,12 +127,7 @@ TAO::Ret_Vector_Argument_T<S,Insert_Policy>::demarshal (
TAO_InputCDR & cdr
)
{
- S * tmp = 0;
- ACE_NEW_RETURN (tmp,
- S (),
- 0);
- this->x_ = tmp;
- return cdr >> this->x_.inout ();
+ return cdr >> this->x_;
}
#if TAO_HAS_INTERCEPTORS == 1
@@ -149,7 +139,7 @@ TAO::Ret_Vector_Argument_T<S,Insert_Policy>::interceptor_value (
CORBA::Any *any
) const
{
- Insert_Policy::any_insert (any, this->x_.in ());
+ Insert_Policy::any_insert (any, this->x_);
}
#endif /* TAO_HAS_INTERCEPTORS */
diff --git a/modules/TAO/tao/Vector_Argument_T.h b/modules/TAO/tao/Vector_Argument_T.h
index da279981bdb..65001064159 100644
--- a/modules/TAO/tao/Vector_Argument_T.h
+++ b/modules/TAO/tao/Vector_Argument_T.h
@@ -46,7 +46,7 @@ namespace TAO
S const & arg (void) const;
protected:
- const S * x_;
+ S const & x_;
};
/**
@@ -93,7 +93,7 @@ namespace TAO
S & arg (void);
private:
- S * x_;
+ S & x_;
};
/**
@@ -108,16 +108,16 @@ namespace TAO
class Out_Vector_Argument_T : public OutArgument
{
public:
- Out_Vector_Argument_T (typename S::_out_type x);
+ Out_Vector_Argument_T (S & x);
virtual CORBA::Boolean demarshal (TAO_InputCDR &);
#if TAO_HAS_INTERCEPTORS == 1
virtual void interceptor_value (CORBA::Any *any) const;
#endif /* TAO_HAS_INTERCEPTORS == 1 */
- S *& arg (void);
+ S & arg (void);
private:
- S *& x_;
+ S & x_;
};
/**
@@ -137,13 +137,13 @@ namespace TAO
#if TAO_HAS_INTERCEPTORS == 1
virtual void interceptor_value (CORBA::Any *any) const;
#endif /* TAO_HAS_INTERCEPTORS == 1 */
- S *& arg (void);
+ S arg (void);
- S * excp (void);
- S * retn (void);
+ S excp (void);
+ S retn (void);
protected:
- typename S::_var_type x_;
+ typename S x_;
};
/**
diff --git a/modules/TAO/tao/Vector_Argument_T.inl b/modules/TAO/tao/Vector_Argument_T.inl
index c1b9491f1b8..32665b63ba1 100644
--- a/modules/TAO/tao/Vector_Argument_T.inl
+++ b/modules/TAO/tao/Vector_Argument_T.inl
@@ -8,17 +8,17 @@ template<typename S,
class Insert_Policy>
ACE_INLINE
TAO::In_Vector_Argument_T<S,Insert_Policy>::In_Vector_Argument_T (S const & x)
- : x_ (&x)
+ : x_ (x)
{
}
template<typename S,
class Insert_Policy>
ACE_INLINE
-const S &
+S const &
TAO::In_Vector_Argument_T<S,Insert_Policy>::arg (void) const
{
- return *this->x_;
+ return this->x_;
}
template<typename S,
@@ -35,7 +35,7 @@ template<typename S,
class Insert_Policy>
ACE_INLINE
TAO::Inout_Vector_Argument_T<S,Insert_Policy>::Inout_Vector_Argument_T (S & x)
- : x_ (&x)
+ : x_ (x)
{
}
@@ -45,7 +45,7 @@ ACE_INLINE
S &
TAO::Inout_Vector_Argument_T<S,Insert_Policy>::arg (void)
{
- return *this->x_;
+ return this->x_;
}
// ==========================================================================
@@ -54,15 +54,15 @@ template<typename S,
class Insert_Policy>
ACE_INLINE
TAO::Out_Vector_Argument_T<S,Insert_Policy>::Out_Vector_Argument_T (
- typename S::_out_type x
+ S & x
)
- : x_ (x.ptr ())
+ : x_ (x)
{}
template<typename S,
class Insert_Policy>
ACE_INLINE
-S *&
+S &
TAO::Out_Vector_Argument_T<S,Insert_Policy>::arg (void)
{
return this->x_;
@@ -80,28 +80,28 @@ TAO::Ret_Vector_Argument_T<S,Insert_Policy>::Ret_Vector_Argument_T (void)
template<typename S,
class Insert_Policy>
ACE_INLINE
-S *&
+S
TAO::Ret_Vector_Argument_T<S,Insert_Policy>::arg (void)
{
- return this->x_.out ();
+ return this->x_;
}
template<typename S,
class Insert_Policy>
ACE_INLINE
-S *
+S
TAO::Ret_Vector_Argument_T<S,Insert_Policy>::excp (void)
{
- return this->x_.ptr ();
+ return this->x_;
}
template<typename S,
class Insert_Policy>
ACE_INLINE
-S *
+S
TAO::Ret_Vector_Argument_T<S,Insert_Policy>::retn (void)
{
- return this->x_._retn ();
+ return this->x_;
}
TAO_END_VERSIONED_NAMESPACE_DECL