Apparently OCRepresentation's destructor was causing issues
in the JNI version. Seemingly adding a virtual destructor to
the OCRepresentation is enough to cause this to go away.
Also adding move construction/assignment to our more expensive
types.
Change-Id: Icb3b6f25e268384b51126e18ec55fc5099c9b2f9
Signed-off-by: Erich Keane <erich.keane@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/305
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Patrick Lankswert <patrick.lankswert@intel.com>
(cherry picked from commit
b7a33ba1905fcef02c21532a944ddc0958a121af)
Reviewed-on: https://gerrit.iotivity.org/gerrit/385
Reviewed-by: Sudarshan Prasad <sudarshan.prasad@intel.com>
}
}
+ virtual ~OCHeaderOption(){}
+
+ OCHeaderOption(const OCHeaderOption&) = default;
+
+ OCHeaderOption(OCHeaderOption&&) = default;
+
+ OCHeaderOption& operator=(const OCHeaderOption&) = default;
+
+ OCHeaderOption& operator=(OCHeaderOption&&) = default;
+
/**
* API to get Option ID
* @return unsigned integer option ID
class OCRepresentation
{
public:
- OCRepresentation();
+ OCRepresentation(): m_interfaceType(InterfaceType::None){}
+
+ OCRepresentation(OCRepresentation&&) = default;
+
+ OCRepresentation(const OCRepresentation&) = default;
+
+ OCRepresentation& operator=(const OCRepresentation&) = default;
+
+ OCRepresentation& operator=(OCRepresentation&&) = default;
+
+ virtual ~OCRepresentation(){}
+
std::string getJSONRepresentation() const;
void addChild(const OCRepresentation&);
friend class ListenOCContainer;
public:
typedef std::shared_ptr<OCResource> Ptr;
+
+ OCResource(OCResource&&) = default;
+ OCResource& operator=(OCResource&&) = default;
+
/**
* Virtual destructor
*/
{
}
+ OCResourceRequest(OCResourceRequest&&) = default;
+ OCResourceRequest& operator=(OCResourceRequest&&) = default;
/**
* Virtual destructor
*/
{
}
+ OCResourceResponse(OCResourceResponse&&) = default;
+ OCResourceResponse& operator=(OCResourceResponse&&) = default;
virtual ~OCResourceResponse(void) {}
/**
namespace OC
{
- OCRepresentation::OCRepresentation()
- :m_interfaceType(InterfaceType::None)
- { }
std::string OCRepresentation::getJSONRepresentation() const
{
if(emptyData())