diff options
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp index 85acd5721f8..453b1f24afc 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp @@ -33,7 +33,6 @@ be_visitor_valuetype_obv_ch::~be_visitor_valuetype_obv_ch (void) { } - // OBV_ class must be in OBV_ namespace. int be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) @@ -64,7 +63,7 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) else { *os << be_nl_2 << "// OBV_ class" << be_nl; - *os << "class " << be_global->stub_export_macro() << " ";; + *os << "class " << be_global->stub_export_macro() << " "; if (!node->is_nested()) { @@ -195,14 +194,25 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) // Virtual destructor. *os << be_nl << "virtual ~"; - if (! node->is_nested ()) { *os << "OBV_"; } - *os << node->local_name () << " (void);"; + // Virtual _copy_value() only provided in OBV_* class when + // ::CORBA::DefaultValueRefCountBase has been included. + // The OBV_ class is concrete in this case and so requires + // a _copy_value definition. + // Otherwise, the end user derives from this abstract + // OBV_* class and it is up to them to provide the correct + // implimentation of the _copy_value() there. + if (this->obv_need_ref_counter (node)) + { + *os << be_uidt_nl << be_nl << "public:" << be_idt_nl + << "virtual ::CORBA::ValueBase *_copy_value (void);"; + } + // Map fields to private data. if (!node->opt_accessor ()) { |