Go to the source code of this file.
◆ setTriggerBit
#define setTriggerBit |
( |
|
JTrigger_t, |
|
|
|
N |
|
) |
| |
Value:\
\
template<> \
JAssertConversion<JTrigger_t, JTriggerInterface>, \
JAssertBit<N> \
{ \
}; \
\
\
template<> \
inline bool JTriggerInterface::checkTriggerBit<N>() const \
{ \
return dynamic_cast<const JTrigger_t*>(this) != NULL; \
} \
\
\
template<> \
const char* JTriggerInterface::getTriggerName<N>() \
{ \
return #JTrigger_t; \
}
Macro to set trigger bit of a given trigger class.
This macro should be called for each trigger class. As a result, the trigger class is mapped to a unique bit. This mapping is then avaiable in the following ways:
- The member method JTriggerInterface::getTriggerBit() will return the specified trigger bit of the derived class; and
- The trigger bit is stored as a static data member value of the template class JTRIGGER::JTriggerBit.
By using this macro, it is verified -at compile time- that:
- The trigger bit is unique;
- The trigger class derives from JTRIGGER::JTriggerInterface; and
- The trigger class has not been associated to another trigger bit;
- Parameters
-
JTrigger_t | trigger class |
N | trigger bit |
Definition at line 277 of file JTriggerInterface.hh.