WIP some musing about opening the session interface
This commit is contained in:
parent
777e80dd64
commit
da8be6861c
3 changed files with 69 additions and 2 deletions
|
|
@ -47,7 +47,6 @@
|
|||
#include "lib/singleton-subclass.hpp"
|
||||
#include "proc/control/handling-pattern.hpp"
|
||||
#include "proc/control/command-impl.hpp"
|
||||
#include "proc/mobject/session.hpp"
|
||||
#include "include/lifecycle.h"
|
||||
//#include "lib/symbol.hpp"
|
||||
|
||||
|
|
@ -187,7 +186,7 @@ namespace control {
|
|||
}
|
||||
|
||||
|
||||
lumiera::LifecycleHook _schedule (mobject::ON_SESSION_START, &prepareCommandHandlingPatterns);
|
||||
lumiera::LifecycleHook _schedule (lumiera::ON_GLOBAL_INIT, &prepareCommandHandlingPatterns);
|
||||
|
||||
} // (END) definition of concrete handling patterns
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
|
||||
#include "proc/control/proc-dispatcher.hpp"
|
||||
#include "proc/mobject/session.hpp"
|
||||
#include "include/logging.h"
|
||||
//#include "proc/mobject/mobject-ref.hpp"
|
||||
//#include "proc/mobject/mobject.hpp"
|
||||
//#include "proc/mobject/placement.hpp"
|
||||
|
|
@ -32,7 +34,61 @@
|
|||
|
||||
namespace control {
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
/** when session gets ready,
|
||||
* open the command processing interface.
|
||||
*/
|
||||
void
|
||||
activateCommandProcessing()
|
||||
{
|
||||
ProcDispatcher::instance().activate();
|
||||
}
|
||||
|
||||
|
||||
lumiera::LifecycleHook _schedule (mobject::ON_SESSION_INIT, &activateCommandProcessing);
|
||||
|
||||
}
|
||||
|
||||
/** storage for Singleton access */
|
||||
lumiera::Singleton<ProcDispatcher> ProcDispatcher::instance;
|
||||
|
||||
|
||||
|
||||
/** */
|
||||
void
|
||||
ProcDispatcher::activate()
|
||||
{
|
||||
INFO (command, "Session command processing activated.");
|
||||
TODO ("implement command processing queue");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ProcDispatcher::deactivate()
|
||||
{
|
||||
INFO (command, "Session command interface closed.");
|
||||
TODO ("implement command processing queue");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ProcDispatcher::clear()
|
||||
{
|
||||
if (!empty())
|
||||
WARN (command, "DISCARDING pending Session commands.");
|
||||
TODO ("implement command processing queue");
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ProcDispatcher::empty() const
|
||||
{
|
||||
TODO ("implement command processing queue");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
//#include "pre.hpp"
|
||||
//#include "lib/symbol.hpp"
|
||||
#include "proc/control/command.hpp"
|
||||
#include "lib/singleton.hpp"
|
||||
|
||||
//#include <tr1/memory>
|
||||
|
||||
|
|
@ -56,6 +57,17 @@ namespace control {
|
|||
{
|
||||
|
||||
public:
|
||||
static lumiera::Singleton<ProcDispatcher> instance;
|
||||
|
||||
void activate();
|
||||
void deactivate();
|
||||
void clear();
|
||||
|
||||
|
||||
/* == diagnostics == */
|
||||
|
||||
// size_t size() const ;
|
||||
bool empty() const ;
|
||||
|
||||
};
|
||||
////////////////TODO currently just fleshing out the API....
|
||||
|
|
|
|||
Loading…
Reference in a new issue