19 #ifndef INCLUDE_MESSAGE_H 20 #define INCLUDE_MESSAGE_H 30 virtual const char* getIdentifier()
const;
31 virtual bool matchIdentifier(
const char* identifier)
const;
32 static bool match(
const Message* message);
43 #define MESSAGE_CLASS_DECLARATION \ 45 const char* getIdentifier() const; \ 46 bool matchIdentifier(const char* identifier) const; \ 47 static bool match(const Message& message); \ 49 static const char* m_identifier; \ 52 #define MESSAGE_CLASS_DEFINITION(Name, BaseClass) \ 53 const char* Name::m_identifier = #Name; \ 54 const char* Name::getIdentifier() const { return m_identifier; } \ 55 bool Name::matchIdentifier(const char* identifier) const {\ 56 return (m_identifier == identifier) ? true : BaseClass::matchIdentifier(identifier); \ 58 bool Name::match(const Message& message) { return message.matchIdentifier(m_identifier); } 60 #endif // INCLUDE_MESSAGE_H
void * getDestination() const
static const char * m_identifier
void setDestination(void *destination)