Async 1.8.0
AsyncMacho.h File Reference
#include <Macho.hpp>

Go to the source code of this file.

Classes

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

Namespaces

namespace  Async
 Namespace for the asynchronous programming classes.
 
namespace  Async::Macho
 

Macros

#define __MACHO_HPP__
 
#define TOPSTATE(TOP)
 
#define SUBSTATE(STATE, SUPERSTATE)
 
#define TSUBSTATE(STATE, SUPERSTATE)
 
#define STATE(S)
 
#define TSTATE(S)
 
#define DEEPHISTORY()
 
#define HISTORY()
 
#define PERSISTENT()
 

Typedefs

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

Functions

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

Macro Definition Documentation

◆ __MACHO_HPP__

#define __MACHO_HPP__

Definition at line 3 of file AsyncMacho.h.

◆ DEEPHISTORY

#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:

Definition at line 276 of file AsyncMacho.h.

◆ HISTORY

#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:

Definition at line 288 of file AsyncMacho.h.

◆ PERSISTENT

#define PERSISTENT ( )
Value:
private: \
virtual void _deleteBox(::Macho::_StateInstance & instance) {} \
public:

Definition at line 301 of file AsyncMacho.h.

◆ STATE

#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(::Macho::_StateInstance & instance) : LINK(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 ::_VS8_Bug_101615;

Definition at line 235 of file AsyncMacho.h.

◆ SUBSTATE

#define SUBSTATE ( STATE,
SUPERSTATE )
Value:
struct STATE : public ::Macho::Link< STATE, SUPERSTATE >
#define STATE(S)
Definition AsyncMacho.h:235

Definition at line 224 of file AsyncMacho.h.

◆ TOPSTATE

#define TOPSTATE ( TOP)
Value:
struct TOP : public ::Macho::Link< TOP, ::Macho::TopBase< TOP > >

Definition at line 220 of file AsyncMacho.h.

◆ TSTATE

#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::Link<S, SUPER> LINK; \
S(::Macho::_StateInstance & instance) : LINK(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 LINK::dispatch; \
using LINK::machine; \
/* must have these methods to quieten gcc */ \
template<class U> void setState() { LINK::template setState<U>(); } \
template<class U, class P1> void setState(const P1 & p1) { LINK::template setState<U, P1>(p1); } \
template<class U, class P1, class P2> void setState(const P1 & p1, const P2 & p2) { LINK::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) { LINK::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) { LINK::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) { LINK::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) { LINK::template setState<U, P1, P2>(p1, p2, p3, p4, p5, p6); } \
template<class U> void setStateHistory() { LINK::template setStateHistory<U>(); } \
void setState(const class Alias & state) { LINK::setState(state); }

Definition at line 250 of file AsyncMacho.h.

◆ TSUBSTATE

#define TSUBSTATE ( STATE,
SUPERSTATE )
Value:
struct STATE : public ::Macho::Link< STATE<typename SUPERSTATE::ANCHOR>, typename SUPERSTATE::SELF >

Definition at line 229 of file AsyncMacho.h.