define the plan for some scaffolding to drive the UI-Session connection (#1042)

...following a similar idea as employed when developing the Player-Engine connection
This commit is contained in:
Fischlurch 2016-12-10 01:21:08 +01:00
parent 1627edd96f
commit a54990de7c
8 changed files with 335 additions and 4 deletions

View file

@ -76,6 +76,10 @@ namespace ctrl{
* defining special handling overrides for _all other kinds of messages_. * defining special handling overrides for _all other kinds of messages_.
* The purpose of the Nexus is to route all these _other kinds of messages._ * The purpose of the Nexus is to route all these _other kinds of messages._
* *
* Thus, the "uplink", which is in fact the CoreService, is left to handle
* - the *`act`* messages (command invocation)
* - the *`mark`* messages (upstream state change notification)
*
* @todo write type comment * @todo write type comment
*/ */
class Nexus class Nexus

View file

@ -0,0 +1,78 @@
/*
DummySessionConnection - scaffolding placeholder to drive the GUI-Session connection
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
/** @file dummy-session-connection.cpp
** Implementation details to build some scaffolding for UI<-->Session integration.
** In this translation unit, actually a singleton will be instantiated, whenever
** some other part of the application (or some unit test) needs backing by a faked
** session with...
** - some session content
** - commands to be invoked
**
** @todo WIP as of 12/2016 ///////////////////////TICKET #1042
**
** @see DummySessionConnection_test
**
*/
#include "lib/util.hpp"
//#include "lib/symbol.hpp"
//#include "include/logging.h"
#include "proc/mobject/session/dummy-session-connection.hpp"
//#include <boost/noncopyable.hpp>
#include <string>
#include <map>
using std::map;
using std::string;
using util::contains;
using util::isnil;
namespace proc {
namespace mobject {
namespace session {
namespace { //Implementation details....
} //(End)Implementation details....
DummySessionConnection::DummySessionConnection ( )
{
}
DummySessionConnection::~DummySessionConnection ( )
{
// ////TODO Auto-generated destructor stub
}
/**
*
* @param id
* @return
*/
}}} // namespace proc::mobject::session

View file

@ -0,0 +1,98 @@
/*
dummy-session-connection.hpp - scaffolding placeholder to drive the GUI-Session connection
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/** @file dummy-session-connection.hpp
** Dummy and scaffolding to help development of the UI - Session connection.
** This singleton service can be accessed as placeholder to stand-in for all those
** parts of the application, which are to defined in the very attempt this placeholder
** is used for...
** - it can fake some session content
** - it may expose some fake command implementations
** - and all this together with suitable diagnostic facilities
**
** The plan is to push this helper along, as we proceed from the UI down towards the session.
** In the end, this placeholder service may be inserted into the session implementation proper,
** until we have the ability to load a persistent session from storage.
**
** @todo WIP as of 12/2016 //////////////////////////////////////////////////////////////////////TICKET #1042
**
** @see ui-bus.hpp
** @see dummy-session-connection.cpp implementation
**
*/
#ifndef PROC_MOBJECT_SESSION_DUMMY_SESSION_CONNECTION_H
#define PROC_MOBJECT_SESSION_DUMMY_SESSION_CONNECTION_H
#include "lib/error.hpp"
#include "lib/hash-value.h"
//#include "lib/symbol.hpp"
#include "lib/util.hpp"
#include <boost/noncopyable.hpp>
#include <string>
namespace proc {
namespace mobject {
namespace session {
class LifecycleAdvisor;
using lib::HashVal;
using util::isnil;
using std::string;
/**
* Basic (abstracted) view of...
*
* @see SomeSystem
* @see DummySessionConnection_test
*/
class DummySessionConnection
{
string nothing_;
public:
DummySessionConnection();
~DummySessionConnection ( );
// using default copy/assignment
/* == X interface for == */
/* == Adapter interface for == */
#if false /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #1042
void setSolution (string const& solution = "")
{
UNIMPLEMENTED ("tbw");
if (isDeaf())
this->transmogrify (solution);
}
#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #1042
};
}}} // namespace proc::mobject::session
#endif /*SRC_PROC_MOBJECT_SESSION_DUMMY_SESSION_CONNECTION_HPP_*/

View file

@ -103,7 +103,7 @@ namespace session {
/** @note Any session services get up into default configured state. /** @note Any session services come up into default configured state.
* After the swap, \c tmpS holds onto the old session, which * After the swap, \c tmpS holds onto the old session, which
* consequently should unwind on leaving this scope. */ * consequently should unwind on leaving this scope. */
void void

View file

@ -63,7 +63,11 @@
** **
** The <b>test support interface</b> provides a test driver for performing a controlled ** The <b>test support interface</b> provides a test driver for performing a controlled
** playback or rendering for some time. Thus, a test routine may lock into a blocking wait, ** playback or rendering for some time. Thus, a test routine may lock into a blocking wait,
** to investigate results after the planned test sequence was performed. ** to investigate results after the planned test sequence was performed.
**
** @todo this was invented in 2012 -- but development of the player subsystem stalled thereafter.
** As of 2016, I still consider this design valid and intend to pick up development when
** able to address this topic again. At the moment, the UI-Session connection is more urgent.
** **
** @see lumiera::DummyPlayer ** @see lumiera::DummyPlayer
** @see gui::PlaybackController usage example ** @see gui::PlaybackController usage example
@ -216,7 +220,9 @@ namespace play {
* allowing to start a data producing process while leaving out * allowing to start a data producing process while leaving out
* various parts of the real engine implementation. The specific * various parts of the real engine implementation. The specific
* mode of operation, suitable for various test scenarios, may be * mode of operation, suitable for various test scenarios, may be
* fine tuned by the strategy object defined as template parameter. * fine tuned by the strategy object defined as template parameter.
*
* @todo not-yet-implemented as of 2016 -- but the design can be considered valid.
*/ */
template<class DEF> template<class DEF>
class DummyPlayConnection class DummyPlayConnection

View file

@ -33,6 +33,11 @@ return: 0
END END
PLANNED "Scaffolding to develop the UI-Session connection" DummySessionConnection_test <<END
return: 0
END
TEST "SessionElementTracker_test" SessionElementTracker_test <<END TEST "SessionElementTracker_test" SessionElementTracker_test <<END
return: 0 return: 0
END END

View file

@ -0,0 +1,87 @@
/*
DummySessionConnection(Test) - verify scaffolding to drive the GUI-Session connection
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
/** @file dummy-session-connection-test.cpp
**
*/
#include "lib/test/run.hpp"
#include "lib/util.hpp"
#include "proc/mobject/session/dummy-session-connection.hpp"
//#include <boost/lexical_cast.hpp>
//#include <iostream>
#include <string>
#include <map>
//using boost::lexical_cast;
using util::contains;
using std::string;
//using std::cout;
//using std::endl;
namespace proc {
namespace mobject {
namespace session {
namespace test {
namespace { // test fixture...
} //(End) test fixture
/***********************************************************************//**
* @test verify scaffolding used to develop the actual connection between
* the UI, the UI-Bus, the core services in the UI and the Session.
* - weakness of WIP-WIP-WIP
*
* @see UiBus
* @see DummySessionConnection
*/
class DummySessionConnection_test
: public Test
{
virtual void
run (Arg)
{
demonstrate_weakness ();
}
/** @test demonstrate a serious weakness of
* When...
*
* This problem is especially dangerous when...
*/
void demonstrate_weakness ( )
{
UNIMPLEMENTED("stop making sense...");
}
};
/** Register this test class... */
LAUNCHER(DummySessionConnection_test, "unit session");
}}}} // namespace proc::mobject::session::test

View file

@ -9,9 +9,62 @@
<node CREATED="1455289466261" ID="ID_273679080" MODIFIED="1455289469961" TEXT="PresentationState"/> <node CREATED="1455289466261" ID="ID_273679080" MODIFIED="1455289469961" TEXT="PresentationState"/>
</node> </node>
<node CREATED="1477784761581" HGAP="72" ID="ID_854334914" MODIFIED="1477784783508" TEXT="Rahmen" VSHIFT="-21"> <node CREATED="1477784761581" HGAP="72" ID="ID_854334914" MODIFIED="1477784783508" TEXT="Rahmen" VSHIFT="-21">
<node CREATED="1481320580216" ID="ID_1418071897" MODIFIED="1481320587160" TEXT="vorantreiben">
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1481320590214" ID="ID_635303062" MODIFIED="1481320737392" TEXT="DummySessionConnection">
<arrowlink COLOR="#f9b709" DESTINATION="ID_1343270939" ENDARROW="Default" ENDINCLINATION="-30;-35;" ID="Arrow_ID_1867016690" STARTARROW="None" STARTINCLINATION="-34;-43;"/>
<icon BUILTIN="idea"/>
<node CREATED="1481320639544" ID="ID_1440497947" MODIFIED="1481320641675" TEXT="Singleton"/>
<node CREATED="1481320642455" ID="ID_1938045938" MODIFIED="1481320649996" TEXT="hat fake Session content"/>
<node CREATED="1481320650486" ID="ID_155238526" MODIFIED="1481320661888" TEXT="bietet fake Commands"/>
<node CREATED="1481320666196" ID="ID_1580591981" MODIFIED="1481320675247" TEXT="plus zugeh&#xf6;rige Diagnostik"/>
</node>
</node>
<node CREATED="1477784793993" ID="ID_1868522177" MODIFIED="1477784810257" TEXT="Umbau"> <node CREATED="1477784793993" ID="ID_1868522177" MODIFIED="1477784810257" TEXT="Umbau">
<icon BUILTIN="hourglass"/> <icon BUILTIN="hourglass"/>
<node CREATED="1477784813895" ID="ID_1343270939" MODIFIED="1477784821050" TEXT="Model durch UI-Bus ersetzen"/> <node CREATED="1477784813895" ID="ID_1343270939" MODIFIED="1481320738244" TEXT="Model durch UI-Bus ersetzen">
<linktarget COLOR="#f9b709" DESTINATION="ID_1343270939" ENDARROW="Default" ENDINCLINATION="-30;-35;" ID="Arrow_ID_1867016690" SOURCE="ID_635303062" STARTARROW="None" STARTINCLINATION="-34;-43;"/>
<node CREATED="1481320683706" ID="ID_1226263415" MODIFIED="1481320721872" TEXT="kl&#xe4;ren, wo der Bus aufgeh&#xe4;ngt wird">
<icon BUILTIN="help"/>
</node>
<node CREATED="1481320693912" ID="ID_918908848" MODIFIED="1481320717736" TEXT="Lebenszyklus kl&#xe4;ren">
<icon BUILTIN="help"/>
</node>
<node CREATED="1481320699056" ID="ID_728332859" MODIFIED="1481320714906" TEXT="wo kommen die CoreServices hin">
<icon BUILTIN="help"/>
</node>
<node CREATED="1481320759472" ID="ID_687951877" MODIFIED="1481320764307" TEXT="Interfaces &#xf6;ffnen">
<node CREATED="1481320765135" ID="ID_379585622" MODIFIED="1481320835124">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
UI: <b>GuiNotification</b>
</p>
</body>
</html>
</richcontent>
</node>
<node CREATED="1481320772830" ID="ID_1607125695" MODIFIED="1481320786893">
<richcontent TYPE="NODE"><html>
<head>
</head>
<body>
<p>
Proc: <b>SessionCommand</b>
</p>
</body>
</html>
</richcontent>
<node CREATED="1481320843596" ID="ID_7225903" MODIFIED="1481320847199" TEXT="definieren"/>
<node CREATED="1481320847724" ID="ID_545146501" MODIFIED="1481320850327" TEXT="wo ansiedeln"/>
<node CREATED="1481320850779" ID="ID_1632600003" MODIFIED="1481320854143" TEXT="hochfahren"/>
</node>
</node>
<node CREATED="1481320870369" ID="ID_454465129" MODIFIED="1481320875916" TEXT="Rolle des &quot;Model&quot; kl&#xe4;ren"/>
</node>
<node CREATED="1477784829157" ID="ID_1998357180" MODIFIED="1477784838700" TEXT="Icon-Laden modernisieren"/> <node CREATED="1477784829157" ID="ID_1998357180" MODIFIED="1477784838700" TEXT="Icon-Laden modernisieren"/>
<node CREATED="1477784821925" FOLDED="true" ID="ID_1871474250" MODIFIED="1477784892461" TEXT="Styling aufr&#xe4;umen"> <node CREATED="1477784821925" FOLDED="true" ID="ID_1871474250" MODIFIED="1477784892461" TEXT="Styling aufr&#xe4;umen">
<node CREATED="1477784846162" ID="ID_1164942946" MODIFIED="1477784889994" TEXT="siehe Info zum CssProvider"> <node CREATED="1477784846162" ID="ID_1164942946" MODIFIED="1477784889994" TEXT="siehe Info zum CssProvider">