2012-01-16 04:50:21 +01:00
|
|
|
/*
|
|
|
|
|
EngineServiceMock - dummy render engine implementation for test/development
|
|
|
|
|
|
|
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2012, 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.
|
|
|
|
|
|
|
|
|
|
* *****************************************************/
|
|
|
|
|
|
|
|
|
|
|
2016-11-03 18:22:31 +01:00
|
|
|
/** @file engine-service-mock.cpp
|
2016-11-09 19:13:52 +01:00
|
|
|
** Implementation translation unit for a mock render engine for unit testing.
|
|
|
|
|
** @todo draft from 2012, and, while stalled, still relevant as of 2016
|
2016-11-03 18:20:10 +01:00
|
|
|
*/
|
|
|
|
|
|
2012-01-16 04:50:21 +01:00
|
|
|
|
2018-11-15 23:42:43 +01:00
|
|
|
#include "steam/engine/engine-service-mock.hpp"
|
|
|
|
|
#include "steam/engine/worker/dummy-tick.hpp"
|
2012-01-16 04:50:21 +01:00
|
|
|
|
|
|
|
|
//#include <string>
|
|
|
|
|
//#include <memory>
|
2014-04-03 22:42:48 +02:00
|
|
|
//#include <functional>
|
2012-01-16 04:50:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-15 23:55:13 +01:00
|
|
|
namespace steam {
|
2012-01-16 04:50:21 +01:00
|
|
|
namespace engine{
|
|
|
|
|
|
|
|
|
|
// using std::string;
|
|
|
|
|
// using lumiera::Subsys;
|
2014-04-03 22:42:48 +02:00
|
|
|
// using std::bind;
|
2012-01-16 04:50:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace { // hidden local details of the service implementation....
|
|
|
|
|
|
|
|
|
|
} // (End) hidden service impl details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-21 03:13:33 +01:00
|
|
|
/**
|
|
|
|
|
* Initialise a mock render engine.
|
|
|
|
|
* This dummy implementation manages a collection of
|
|
|
|
|
* "Processors", each running in a separate thread.
|
|
|
|
|
*/
|
2012-01-16 04:50:21 +01:00
|
|
|
EngineServiceMock::EngineServiceMock()
|
2012-01-21 03:13:33 +01:00
|
|
|
: processors_()
|
2012-01-16 04:50:21 +01:00
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-23 02:25:12 +01:00
|
|
|
/** special engine configuration for mock/testing operation.
|
2012-01-16 04:50:21 +01:00
|
|
|
*/
|
2023-04-17 04:51:38 +02:00
|
|
|
RenderEnvironment&
|
2013-06-03 05:25:13 +02:00
|
|
|
EngineServiceMock::configureCalculation (ModelPort,Timings,Quality)
|
2012-01-16 04:50:21 +01:00
|
|
|
{
|
2023-04-17 04:51:38 +02:00
|
|
|
UNIMPLEMENTED ("represent *this as RenderEnvironment Closure)");
|
|
|
|
|
RenderEnvironment* todo_fake(0); ////KABOOOM
|
2012-01-23 02:25:12 +01:00
|
|
|
|
|
|
|
|
return *todo_fake;
|
2012-01-16 04:50:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-15 23:55:13 +01:00
|
|
|
}} // namespace steam::engine
|