#pragma once

#include "MessageGroups.h"

namespace ROSBridge {

//! @brief Abstract base class for all ROS Messages Types.
//!
//! Abstract base class for all ROS Messages Types. This class defines a basic interface
//! every class must fullfill if it takes advantages of the \class ROSJsonFactory.
//! Every class must define the public typedef Group, which associates it to a message Group (\see MessageGroups). The Group type
//! is used by the \class ROSJsonFactory to determine the type of the message it creates. The
//! MessageBaseClass belongs to the \struct EmptyGroup. Passing a class belonging to the \struct EmptyGroup to the
//! \class ROSJsonFactory will yield an error.
class MessageBaseClass{
public:
    typedef MessageGroups::EmptyGroup Group;

    MessageBaseClass() {};
    virtual ~MessageBaseClass() {};
    // Avoid sliceing (copy with ROSMessage::Clone or define subclass operator=)!
    MessageBaseClass(const MessageBaseClass &) = delete;
    MessageBaseClass& operator=(const MessageBaseClass &) = delete;

    virtual MessageBaseClass* Clone() const = 0;
};
typedef MessageBaseClass MsgBase;
} // namespace ROSBridge


