INET Framework for OMNeT++/OMNEST
Macho.h File Reference
#include <new>
#include <cassert>

Classes

class  inet::Macho::Machine< TOP >
 
class  inet::Macho::IEvent< TOP >
 
struct  inet::Macho::_SameType< T, U >
 
struct  inet::Macho::_SameType< T, T >
 
struct  inet::Macho::DR< R >
 
struct  inet::Macho::DR< R & >
 
struct  inet::Macho::DR< const R & >
 
struct  inet::Macho::Anchor< T, I >
 
class  inet::Macho::_EmptyBox
 
struct  inet::Macho::_KeyData
 
class  inet::Macho::_StateSpecification
 
class  inet::Macho::TopBase< T >
 
class  inet::Macho::MachoLink< C, P >
 
class  inet::Macho::StateID< S >
 
class  inet::Macho::_StateInstance
 
class  inet::Macho::_RootInstance
 
class  inet::Macho::_SubstateInstance< S >
 
class  inet::Macho::_IEventBase
 
class  inet::Macho::IEvent< TOP >
 
class  inet::Macho::_Event6< TOP, R, P1, P2, P3, P4, P5, P6 >
 
class  inet::Macho::_Event5< TOP, R, P1, P2, P3, P4, P5 >
 
class  inet::Macho::_Event4< TOP, R, P1, P2, P3, P4 >
 
class  inet::Macho::_Event3< TOP, R, P1, P2, P3 >
 
class  inet::Macho::_Event2< TOP, R, P1, P2 >
 
class  inet::Macho::_Event1< TOP, R, P1 >
 
class  inet::Macho::_Event0< TOP, R >
 
class  inet::_VS8_Bug_101615
 
class  inet::Macho::_Initializer
 
class  inet::Macho::_StaticInitializer
 
class  inet::Macho::_DefaultInitializer
 
class  inet::Macho::_HistoryInitializer
 
class  inet::Macho::_AdaptingInitializer
 
class  inet::Macho::_Initializer1< S, P1 >
 
class  inet::Macho::_Initializer2< S, P1, P2 >
 
class  inet::Macho::_Initializer3< S, P1, P2, P3 >
 
class  inet::Macho::_Initializer4< S, P1, P2, P3, P4 >
 
class  inet::Macho::_Initializer5< S, P1, P2, P3, P4, P5 >
 
class  inet::Macho::_Initializer6< S, P1, P2, P3, P4, P5, P6 >
 
class  inet::Macho::_MachineBase
 
class  inet::Macho::Alias
 
class  inet::Macho::Machine< TOP >
 
struct  inet::Macho::Machine< TOP >::AfterAdvice
 

Namespaces

 inet
 Copyright (c) 2005 Jan Ringo�, www.ringos.cz.
 
 inet::Macho
 

Macros

#define TOPSTATE(TOP)   struct TOP : public ::inet::Macho::MachoLink < TOP, ::inet::Macho::TopBase<TOP> >
 
#define SUBSTATE(STATE, SUPERSTATE)   struct STATE : public ::inet::Macho::MachoLink < STATE, SUPERSTATE >
 
#define TSUBSTATE(STATE, SUPERSTATE)   struct STATE : public ::inet::Macho::MAchoLink < STATE<typename SUPERSTATE::ANCHOR>, typename SUPERSTATE::SELF >
 
#define STATE(S)
 
#define TSTATE(S)
 
#define DEEPHISTORY()
 
#define HISTORY()
 
#define PERSISTENT()
 

Typedefs

typedef unsigned int inet::Macho::ID
 
typedef void * inet::Macho::Key
 
typedef Alias inet::Macho::StateAlias
 

Functions

template<class B >
void * inet::Macho::_createBox (void *&place)
 
template<class B >
void inet::Macho::_deleteBox (void *&box, void *&place)
 
template<>
void * inet::Macho::_createBox< _EmptyBox > (void *&place)
 
template<>
void inet::Macho::_deleteBox< _EmptyBox > (void *&box, void *&place)
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class R , class TOP >
IEvent< TOP > * inet::Macho::Event (R(TOP::*handler)(P1, P2, P3, P4, P5, P6), const typename DR< P1 >::T &p1, const typename DR< P2 >::T &p2, const typename DR< P3 >::T &p3, const typename DR< P4 >::T &p4, const typename DR< P5 >::T &p5, const typename DR< P6 >::T &p6)
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class R , class TOP >
IEvent< TOP > * inet::Macho::Event (R(TOP::*handler)(P1, P2, P3, P4, P5), const typename DR< P1 >::T &p1, const typename DR< P2 >::T &p2, const typename DR< P3 >::T &p3, const typename DR< P4 >::T &p4, const typename DR< P5 >::T &p5)
 
template<class P1 , class P2 , class P3 , class P4 , class R , class TOP >
IEvent< TOP > * inet::Macho::Event (R(TOP::*handler)(P1, P2, P3, P4), const typename DR< P1 >::T &p1, const typename DR< P2 >::T &p2, const typename DR< P3 >::T &p3, const typename DR< P4 >::T &p4)
 
template<class P1 , class P2 , class P3 , class R , class TOP >
IEvent< TOP > * inet::Macho::Event (R(TOP::*handler)(P1, P2, P3), const typename DR< P1 >::T &p1, const typename DR< P2 >::T &p2, const typename DR< P3 >::T &p3)
 
template<class P1 , class P2 , class R , class TOP >
IEvent< TOP > * inet::Macho::Event (R(TOP::*handler)(P1, P2), const typename DR< P1 >::T &p1, const typename DR< P2 >::T &p2)
 
template<class P1 , class R , class TOP >
IEvent< TOP > * inet::Macho::Event (R(TOP::*handler)(P1), const typename DR< P1 >::T &p1)
 
template<class R , class TOP >
IEvent< TOP > * inet::Macho::Event (R(TOP::*handler)())
 
template<class S >
Alias inet::Macho::State ()
 
template<class S , class P1 >
Alias inet::Macho::State (const P1 &p1)
 
template<class S , class P1 , class P2 >
Alias inet::Macho::State (const P1 &p1, const P2 &p2)
 
template<class S , class P1 , class P2 , class P3 >
Alias inet::Macho::State (const P1 &p1, const P2 &p2, const P3 &p3)
 
template<class S , class P1 , class P2 , class P3 , class P4 >
Alias inet::Macho::State (const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4)
 
template<class S , class P1 , class P2 , class P3 , class P4 , class P5 >
Alias inet::Macho::State (const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5)
 
template<class S , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
Alias inet::Macho::State (const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6)
 
template<class S >
Alias inet::Macho::StateHistory (const _MachineBase &machine)
 

Macro Definition Documentation

#define DEEPHISTORY ( )
Value:
private: \
/* If no superstate has history, SUPER::_setHistorySuper is a NOOP */ \
virtual void _saveHistory(::Macho::_StateInstance & self, ::Macho::_StateInstance & shallow, ::Macho::_StateInstance & deep) \
{ self.setHistory(&deep); SELF::SUPER::_setHistorySuper(self, deep); } \
protected: \
/* Substates may use _setHistorySuper to bubble up history */ \
virtual void _setHistorySuper(::Macho::_StateInstance & self, ::Macho::_StateInstance & deep) \
{ self.setHistorySuper(deep); } \
public:
#define HISTORY ( )
Value:
private: \
/* If no superstate has history, SUPER::_setHistorySuper is a NOOP */ \
virtual void _saveHistory(::Macho::_StateInstance & self, ::Macho::_StateInstance & shallow, ::Macho::_StateInstance & deep) \
{ self.setHistory(&shallow); SELF::SUPER::_setHistorySuper(self, deep); } \
protected: \
/* Substates may use _setHistorySuper to bubble up history */ \
virtual void _setHistorySuper(::Macho::_StateInstance & self, ::Macho::_StateInstance & deep) \
{ self.setHistorySuper(deep); } \
public:
#define PERSISTENT ( )
Value:
private: \
virtual void _deleteBox(::Macho::_StateInstance & instance) {} \
public:
void _deleteBox(void *&box, void *&place)
Definition: Macho.h:402
#define STATE (   S)
Value:
public: \
typedef S SELF; \
typedef S ANCHOR; /* Anchor is the first non-template state in the inheritance chain */ \
/* Constructor and destructor already defined: you can't (and shouldn't) have your own! */ \
/* For the user a state class "constructor" and "destructor" are its entry and exit method! */ \
S(::inet::Macho::_StateInstance & instance) : MLINK(instance) {} \
~S() {} \
static const char *_state_name() { return #S; } \
/* Get to your Box with this method: */ \
Box& box() { return *static_cast<Box *>(_box()); } \
friend class ::inet::_VS8_Bug_101615;
Definition: Macho.h:707
compose< A, pow< V,-1 > > S
Definition: Units.h:778

Referenced by inet::bgp::fsm::SUBSTATE(), and inet::bgp::fsm::TOPSTATE().

#define SUBSTATE (   STATE,
  SUPERSTATE 
)    struct STATE : public ::inet::Macho::MachoLink < STATE, SUPERSTATE >
#define TOPSTATE (   TOP)    struct TOP : public ::inet::Macho::MachoLink < TOP, ::inet::Macho::TopBase<TOP> >
#define TSTATE (   S)
Value:
typedef S SELF; \
typedef typename S::SUPER SUPER; \
typedef typename S::TOP TOP; \
typedef typename S::ANCHOR ANCHOR; /* Anchor is the first non-template state in the inheritance chain */ \
typedef::Macho::MachoLink<S, SUPER> MLINK; \
S(::Macho::_StateInstance & instance) : MLINK(instance) {} \
~S() {} \
static const char *_state_name() { return #S; } \
typename S::Box & box() { return *static_cast<typename S::Box *>(this->_box()); } \
friend class::_VS8_Bug_101615; \
using MLINK::dispatch; \
using MLINK::machine; \
/* must have these methods to quieten gcc */ \
template<class U> void setState() { MLINK::template setState<U>(); } \
template<class U, class P1> void setState(const P1 &p1) { MLINK::template setState<U, P1>(p1); } \
template<class U, class P1, class P2> void setState(const P1 &p1, const P2 &p2) { MLINK::template setState<U, P1, P2>(p1, p2); } \
template<class U, class P1, class P2, class P3> void setState(const P1 &p1, const P2 &p2, const P3 &p3) { MLINK::template setState<U, P1, P2>(p1, p2, p3); } \
template<class U, class P1, class P2, class P3, class P4> void setState(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4) { MLINK::template setState<U, P1, P2>(p1, p2, p3, p4); } \
template<class U, class P1, class P2, class P3, class P4, class P5> void setState(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5) { MLINK::template setState<U, P1, P2>(p1, p2, p3, p4, p5); } \
template<class U, class P1, class P2, class P3, class P4, class P5, class P6> void setState(const P1 &p1, const P2 &p2, const P3 &p3, const P4 &p4, const P5 &p5, const P6 &p6) { MLINK::template setState<U, P1, P2>(p1, p2, p3, p4, p5, p6); } \
template<class U> void setStateHistory() { MLINK::template setStateHistory<U>(); } \
void setState(const class Alias& state) { MLINK::setState(state); }
compose< A, pow< V,-1 > > S
Definition: Units.h:778
#define TSUBSTATE (   STATE,
  SUPERSTATE 
)    struct STATE : public ::inet::Macho::MAchoLink < STATE<typename SUPERSTATE::ANCHOR>, typename SUPERSTATE::SELF >