diff --git a/Source/Processors/Channel/InfoObjects.cpp b/Source/Processors/Channel/InfoObjects.cpp index 4e33c8e2ed610522d8a6c0685c8b2fbe241e8569..fe6a1302b65a44c3c0b2c14daf136de8df47930d 100644 --- a/Source/Processors/Channel/InfoObjects.cpp +++ b/Source/Processors/Channel/InfoObjects.cpp @@ -34,12 +34,18 @@ NodeInfoBase::NodeInfoBase(uint16 id) : m_nodeID(id) {} +NodeInfoBase::~NodeInfoBase() +{} + unsigned int NodeInfoBase::getCurrentNodeID() const { return m_nodeID; } //History Object +HistoryObject::~HistoryObject() +{} + String HistoryObject::getHistoricString() { return m_historicString; @@ -62,6 +68,9 @@ SourceProcessorInfo::SourceProcessorInfo(const GenericProcessor* source, uint16 { } +SourceProcessorInfo::~SourceProcessorInfo() +{} + uint16 SourceProcessorInfo::getSourceNodeID() const { return m_sourceNodeID; @@ -83,6 +92,9 @@ String SourceProcessorInfo::getSourceName() const } //NamedInfoObject +NamedInfoObject::~NamedInfoObject() +{} + void NamedInfoObject::setName(String name) { m_name = name; @@ -123,6 +135,9 @@ InfoObjectCommon::InfoObjectCommon(uint16 idx, uint16 typeidx, float sampleRate, { } +InfoObjectCommon::~InfoObjectCommon() +{} + float InfoObjectCommon::getSampleRate() const { return m_sampleRate; @@ -526,6 +541,9 @@ ConfigurationObject::ConfigurationObject(String identifier, GenericProcessor* so setIdentifier(identifier); } +ConfigurationObject::~ConfigurationObject() +{} + void ConfigurationObject::setShouldBeRecorded(bool status) { m_shouldBeRecorded = status; diff --git a/Source/Processors/Channel/InfoObjects.h b/Source/Processors/Channel/InfoObjects.h index c16e3d11788d7da071a8d55d866c562dadd6a9d7..a9c44fd9f0a4dd3cf3e6cdcc9bc7bc34ccb5691f 100644 --- a/Source/Processors/Channel/InfoObjects.h +++ b/Source/Processors/Channel/InfoObjects.h @@ -47,6 +47,7 @@ class PLUGIN_API NodeInfoBase //This field should never be changed by anything except GenericProcessor base code friend class GenericProcessor; public: + virtual ~NodeInfoBase(); /** Gets the ID of the processor which currently owns this copy of the info object */ unsigned int getCurrentNodeID() const; protected: @@ -62,6 +63,7 @@ protected: HistoryObject(); public: + virtual ~HistoryObject(); /** Returns the historic string */ String getHistoricString(); /** Adds a new entry in the historic string*/ @@ -77,6 +79,7 @@ protected: SourceProcessorInfo(const GenericProcessor* source, uint16 subproc = 0); public: + virtual ~SourceProcessorInfo(); /** Gets the ID of the processor which created the channel object */ uint16 getSourceNodeID() const; @@ -101,6 +104,7 @@ private: class PLUGIN_API NamedInfoObject { public: + virtual ~NamedInfoObject(); /** Sets the object's name*/ void setName(String name); @@ -135,6 +139,7 @@ protected: InfoObjectCommon(uint16 idx, uint16 typeidx, float sampleRate, const GenericProcessor* source, uint16 subproc = 0); public: + virtual ~InfoObjectCommon(); enum InfoObjectType { DATA_CHANNEL, @@ -191,7 +196,7 @@ public: /** Copy constructor. */ DataChannel(const DataChannel& ch); - ~DataChannel(); + virtual ~DataChannel(); //--------- DATA GET / SET METHODS --------// @@ -293,7 +298,7 @@ public: */ EventChannel(EventChannelTypes type, unsigned int numChannels, unsigned int dataLength, float sampleRate, GenericProcessor* source, uint16 subproc = 0); - ~EventChannel(); + virtual ~EventChannel(); EventChannelTypes getChannelType() const; @@ -358,7 +363,7 @@ public: */ SpikeChannel(ElectrodeTypes type, GenericProcessor* source, const Array<const DataChannel*>& sourceChannels, uint16 subproc = 0); - ~SpikeChannel(); + virtual ~SpikeChannel(); ElectrodeTypes getChannelType() const; @@ -421,6 +426,7 @@ public: @param subproc Optional. The source subprocessor index */ ConfigurationObject(String identifier, GenericProcessor* source, uint16 subproc = 0); + virtual ~ConfigurationObject(); /** Sets if the configuration should be recorded or not. Similar to the events, this does not prevent the configuration data to be recorded, but rather states diff --git a/Source/Processors/Channel/MetaData.cpp b/Source/Processors/Channel/MetaData.cpp index c2d297959ac13f9522caf2b48a393e9209fed119..5945ebd9fd1092fc4190b1f8685ddcfa77c39c1f 100644 --- a/Source/Processors/Channel/MetaData.cpp +++ b/Source/Processors/Channel/MetaData.cpp @@ -46,7 +46,7 @@ bool checkMetaDataType(MetaDataDescriptor::MetaDataTypes baseType) //MetaDataDescriptor MetaDataDescriptor::MetaDataDescriptor(MetaDataDescriptor::MetaDataTypes t, unsigned int length, String n, String d, String id) - : m_name(n), m_description(d), m_identifier(id), m_type(t), m_length(length) + : m_name(n), m_identifier(id), m_description(d), m_type(t), m_length(length) {} MetaDataDescriptor::~MetaDataDescriptor() {}; @@ -264,6 +264,8 @@ void MetaDataValue::setValue(const void* data) MetaDataInfoObject::MetaDataInfoObject() {} +MetaDataInfoObject::~MetaDataInfoObject() {} + void MetaDataInfoObject::addMetaData(MetaDataDescriptor* desc, MetaDataValue* val) { if (desc->getType() != val->getDataType() || desc->getLength() != val->getDataLength()) @@ -322,6 +324,8 @@ int MetaDataInfoObject::findMetaData(MetaDataDescriptor::MetaDataTypes type, uns MetaDataEventObject::MetaDataEventObject() {} +MetaDataEventObject::~MetaDataEventObject() {} + void MetaDataEventObject::addEventMetaData(MetaDataDescriptor* desc) { if (eventMetaDataLock) @@ -376,6 +380,8 @@ int MetaDataEventObject::findEventMetaData(MetaDataDescriptor::MetaDataTypes typ //MetaDataEvent MetaDataEvent::MetaDataEvent() {} +MetaDataEvent::~MetaDataEvent() {} + void MetaDataEvent::serializeMetaData(void* dstBuffer) const { int metaDataSize = m_metaDataValues.size(); diff --git a/Source/Processors/Channel/MetaData.h b/Source/Processors/Channel/MetaData.h index b3677b5ce953b357e540b32d8afc3d32850033b2..0c799cd7653ba1648551444c0c8ee3f3de8b0a52 100644 --- a/Source/Processors/Channel/MetaData.h +++ b/Source/Processors/Channel/MetaData.h @@ -172,6 +172,7 @@ class PLUGIN_API MetaDataInfoObject protected: MetaDataInfoObject(); public: + virtual ~MetaDataInfoObject(); void addMetaData(MetaDataDescriptor* desc, MetaDataValue* val); void addMetaData(const MetaDataDescriptor& desc, const MetaDataValue& val); const MetaDataDescriptor* getMetaDataDescriptor(int index) const; @@ -199,6 +200,7 @@ protected: class PLUGIN_API MetaDataEventObject : public MetaDataEventLock { public: + virtual ~MetaDataEventObject(); //This method will only work when creating the info object, but not for those copied down the chain void addEventMetaData(MetaDataDescriptor* desc); void addEventMetaData(const MetaDataDescriptor& desc); @@ -215,6 +217,8 @@ protected: //And the base from which event objects can hold their metadata before serializing class PLUGIN_API MetaDataEvent { +public: + virtual ~MetaDataEvent(); protected: void serializeMetaData(void* dstBuffer) const; bool deserializeMetaData(const MetaDataEventObject* info, const void* srcBuffer, int size); diff --git a/Source/Processors/DataThreads/RhythmNode/RHD2000Thread.cpp b/Source/Processors/DataThreads/RhythmNode/RHD2000Thread.cpp index 326b8951da778140f22bbddbe88453d332fea041..bbd62617f282afb2b5eeb7659ba1c6d59b568806 100644 --- a/Source/Processors/DataThreads/RhythmNode/RHD2000Thread.cpp +++ b/Source/Processors/DataThreads/RhythmNode/RHD2000Thread.cpp @@ -927,6 +927,7 @@ int RHD2000Thread::getNumDataOutputs(DataChannel::DataChannelTypes type, int sub return 0; } } + return 0; } String RHD2000Thread::getChannelUnits(int chanIndex) const diff --git a/Source/Processors/GenericProcessor/GenericProcessor.cpp b/Source/Processors/GenericProcessor/GenericProcessor.cpp index e1b6864a86aa66b540f67c406a82c6fea23daf37..b82fc42251808729dbce6bfde59354d385bd4b3e 100755 --- a/Source/Processors/GenericProcessor/GenericProcessor.cpp +++ b/Source/Processors/GenericProcessor/GenericProcessor.cpp @@ -465,7 +465,7 @@ void GenericProcessor::createEventChannels() int nChans = events.size(); for (int i = 0; i < nChans; i++) { - DefaultEventInfo& info = events[i]; + const DefaultEventInfo& info = events[i]; if (info.type != EventChannel::INVALID && info.nChannels > 0 && info.length > 0) { EventChannel* chan = new EventChannel(info.type, info.nChannels, info.length, info.sampleRate, this, sub); @@ -1251,7 +1251,7 @@ GenericProcessor::DefaultEventInfo::DefaultEventInfo() uint32 GenericProcessor::getProcessorFullId(uint16 sid, uint16 subid) { - return uint32(sid) << 16 + subid; + return (uint32(sid) << 16) + subid; } int64 GenericProcessor::getLastProcessedsoftwareTime() const