diff --git a/src/SConscript b/src/SConscript index 4b40db5b5..f87c70727 100644 --- a/src/SConscript +++ b/src/SConscript @@ -47,4 +47,4 @@ gui = ( guimodule ) -Export('lumiera core core_lib app_lib backend_lib support_lib plugins gui') +Export('lumiera core core_lib app_lib backend_lib support_lib plugins guimodule gui') diff --git a/src/gui/model/session-facade.cpp b/src/gui/model/session-facade.cpp new file mode 100644 index 000000000..87b799301 --- /dev/null +++ b/src/gui/model/session-facade.cpp @@ -0,0 +1,94 @@ +/* + SessionFacade - service for + + Copyright (C) Lumiera.org + 2014, Hermann Vosseler + + 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 session-facade.cpp + ** Service for session-facade. + ** This header defines the basics of... + ** + ** @note as of X/2014 this is complete bs + ** @todo WIP ///////////////////////TICKET # + ** + ** @see ////TODO_test usage example + ** @see session-facade.cpp implementation + ** + */ + + +//#include "lib/util.hpp" +//#include "lib/symbol.hpp" +//#include "include/logging.h" +#include "gui/model/session-facade.hpp" +#include "lib/depend.hpp" + +//#include +//#include +//#include + +//using std::map; +//using std::string; + +//using util::contains; +//using util::isnil; + + +namespace gui { +namespace model { + + namespace { // internal details + lib::Depend guiSessionFacade; + + } // internal details + + + + SessionFacade::SessionFacade() + : nothing_("boo") + { } + + + SessionFacade::~SessionFacade() { } + + + + + /** + * + * @param id + * @return + */ + string + SessionFacade::beCreative () + { + return guiSessionFacade().maybe(); + } + + + string + SessionFacade::maybe() const + { + return nothing_; + } + + + +}} // namespace gui::model diff --git a/src/gui/model/session-facade.hpp b/src/gui/model/session-facade.hpp new file mode 100644 index 000000000..3185a44ea --- /dev/null +++ b/src/gui/model/session-facade.hpp @@ -0,0 +1,86 @@ +/* + SESSION-FACADE.hpp - service for + + Copyright (C) Lumiera.org + 2014, Hermann Vosseler + + 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 session-facade.hpp + ** Service for session-facade. + ** This header defines the basics of... + ** + ** @note as of X/2014 this is complete bs + ** @todo WIP ///////////////////////TICKET # + ** + ** @see ////TODO_test usage example + ** @see session-facade.cpp implementation + ** + */ + + +#ifndef SESSION_FACADE_H_ +#define SESSION_FACADE_H_ + + +#include "lib/error.hpp" +//#include "lib/symbol.hpp" +//#include "lib/util.hpp" + +#include +#include + + +namespace gui { +namespace model { + +// using lib::HashVal; +// using util::isnil; + using std::string; + + + /** + * Basic (abstracted) view of... + * + * @see SomeSystem + * @see NA_test + */ + class SessionFacade + : boost::noncopyable + { + string nothing_; + + public: + SessionFacade(); + ~SessionFacade(); + + + static string beCreative (); + + /* == Adapter interface for == */ + + + + protected: + string maybe () const; + }; + + + +}} // namespace gui::model +#endif /*SESSION_FACADE_H_*/ diff --git a/tests/51-gui-model.tests b/tests/51-gui-model.tests index a3dad6247..212a0ca6a 100644 --- a/tests/51-gui-model.tests +++ b/tests/51-gui-model.tests @@ -1,6 +1,9 @@ TESTING "Component Test Suite: GUI Model Parts" ./test-suite --group=gui -PLANNED "ModelClipTrack_test" ModelClipTrack_test < + + 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. + +* *****************************************************/ + + +#include "lib/test/run.hpp" +#include "lib/util.hpp" +#include "gui/model/session-facade.hpp" + +#include + +using std::cout; + + +namespace gui { +namespace test{ + + /**************************************//** + * Hellooooooo the world is just a test + * @test demo of using the test framework + */ + class TestGui_test : public Test + { + virtual void + run (Arg) + { + cout << model::SessionFacade::beCreative() << "\n"; + } + }; + + + + + + /** Register this test class to be invoked in some test groups (suites) + * @remarks this macro \c LUNCHER is defined in run.hpp to simplify + * the registration of test classes. It expands to the + * following static variable definition + * \code + * Launch run_HelloWorld_test("HelloWorld_test","unit common"); + * \endcode + */ + LAUNCHER (TestGui_test, "unit gui"); + + + +}} // namespace gui::test