deleted copy ctor

This commit is contained in:
Robin Müller 2020-07-10 13:31:45 +02:00
parent be8913efea
commit a7d68f8c52

View File

@ -11,6 +11,7 @@
*/ */
class ModePacket : public SerialLinkedListAdapter<SerializeIF> { //!< [EXPORT] : [SUBSERVICE] 1, 2, 6 class ModePacket : public SerialLinkedListAdapter<SerializeIF> { //!< [EXPORT] : [SUBSERVICE] 1, 2, 6
public: public:
ModePacket() { ModePacket() {
setLinks(); setLinks();
} }
@ -28,9 +29,11 @@ public:
return submode.entry; return submode.entry;
} }
// Forbid copying, pointers are used.
ModePacket(const ModePacket&) = delete;
ModePacket& operator=(const ModePacket&) = delete;
private: private:
// Forbid copying because of next pointer to member
ModePacket(const ModePacket &command);
void setLinks() { void setLinks() {
setStart(&objectId); setStart(&objectId);
objectId.setNext(&mode); objectId.setNext(&mode);
@ -41,6 +44,10 @@ private:
SerializeElement<Submode_t> submode; //!< [EXPORT] : [COMMENT] Usually 0, device specific submode possible SerializeElement<Submode_t> submode; //!< [EXPORT] : [COMMENT] Usually 0, device specific submode possible
}; };
/**
* @brief Subservice 7
* @ingroup spacepackets
*/
class CantReachModePacket: public SerialLinkedListAdapter<SerializeIF> { //!< [EXPORT] : [SUBSERVICE] 7 class CantReachModePacket: public SerialLinkedListAdapter<SerializeIF> { //!< [EXPORT] : [SUBSERVICE] 7
public: public:
CantReachModePacket(object_id_t objectId, ReturnValue_t reason): CantReachModePacket(object_id_t objectId, ReturnValue_t reason):