Ticket #240 (closed enhancement: fixed)

Opened 3 weeks ago

Last modified 3 weeks ago

Added assignment operators to COBIA wrapper classes

Reported by: jasper Owned by: jasper
Priority: minor Milestone: Phase III WP1
Component: Client Header Files Version:
Keywords: Cc:

Description

COBIA wrapper classes featured the following templated constructors to allow construction from any CAPE-OPEN object type (example given for ICapeIdentification wrapper only):

		template <typename IFACE> CapeIdentification(typename COBIA_INTERNAL::CapeSmartPointer<IFACE> &obj) : MyBase((ICapeInterface*)(typename COBIA_INTERNAL::CapeSmartPointer<IFACE>::myInterface*)obj) {}
		template <typename T> CapeIdentification(CapeOpenObjectSmartPointer<T> &obj) : MyBase(static_cast<ICapeInterface*>(obj.get())) {}

The equivalent assignment operators were not present. To prevent having to explicitly cast a CAPE-OPEN object to the right type, the equivalent assignment operators need to be added.

Change History

comment:1 Changed 3 weeks ago by jasper

The following assignment operators are now generated by the code generator:

		template <typename IFACE> CapeIdentification &operator=(typename COBIA_INTERNAL::CapeSmartPointer<IFACE> &obj) {MyBase::operator=((ICapeInterface*)(typename COBIA_INTERNAL::CapeSmartPointer<IFACE>::myInterface*)obj);return *this;}
		template <typename T> CapeIdentification &operator=(CapeOpenObjectSmartPointer<T> &obj) {MyBase::operator=(static_cast<ICapeInterface*>(obj.get()));return *this;}

comment:2 Changed 3 weeks ago by jasper

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in commit 4c13068

Note: See TracTickets for help on using tickets.