2016-12-12 02:20:58 +01:00
|
|
|
/*
|
2016-12-12 03:09:08 +01:00
|
|
|
SessionCommand(Proxy) - public service to invoke commands on the session
|
2016-12-12 02:20:58 +01:00
|
|
|
|
|
|
|
|
Copyright (C) Lumiera.org
|
2016-12-12 03:09:08 +01:00
|
|
|
2016, Hermann Vosseler <Ichthyostega@web.de>
|
2016-12-12 02:20:58 +01:00
|
|
|
|
|
|
|
|
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-command-interface-proxy.hpp
|
|
|
|
|
** This is an implementation fragment, intended to be included into common/interfaceproxy.cpp
|
|
|
|
|
**
|
2016-12-12 03:09:08 +01:00
|
|
|
** The purpose is to define a proxy implementation of proc::control::SessionCommand, in order to
|
|
|
|
|
** redirect any calls through the associated C Language Interface "lumieraorg_SessionCommand"
|
2016-12-12 02:20:58 +01:00
|
|
|
**
|
2016-12-12 03:09:08 +01:00
|
|
|
** @see session-command-facade.hpp
|
|
|
|
|
** @see session-command-service.hpp actual implementation within the GUI
|
2016-12-12 02:20:58 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-12-12 03:09:08 +01:00
|
|
|
/* ==================== SessionCommand =================================== */
|
2016-12-12 02:20:58 +01:00
|
|
|
|
2016-12-12 03:09:08 +01:00
|
|
|
#include "include/session-command-facade.h"
|
2016-12-12 02:20:58 +01:00
|
|
|
|
2016-12-12 03:09:08 +01:00
|
|
|
namespace proc {
|
|
|
|
|
namespace control {
|
2016-12-12 02:20:58 +01:00
|
|
|
|
|
|
|
|
/** storage for the facade proxy factory
|
|
|
|
|
* used by client code to invoke through the interface */
|
2016-12-12 03:09:08 +01:00
|
|
|
lumiera::facade::Accessor<SessionCommand> SessionCommand::facade;
|
2016-12-12 02:20:58 +01:00
|
|
|
|
2016-12-12 03:09:08 +01:00
|
|
|
}} // namespace proc::control
|
2016-12-12 02:20:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace lumiera {
|
|
|
|
|
namespace facade {
|
|
|
|
|
|
2016-12-12 03:09:08 +01:00
|
|
|
typedef InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_SessionCommand, 0)
|
|
|
|
|
, proc::control::SessionCommand
|
|
|
|
|
> IHandle_SessionCommand;
|
2016-12-12 02:20:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
template<>
|
2016-12-12 03:09:08 +01:00
|
|
|
class Proxy<IHandle_SessionCommand>
|
|
|
|
|
: public Holder<IHandle_SessionCommand>
|
2016-12-12 02:20:58 +01:00
|
|
|
{
|
2016-12-12 03:09:08 +01:00
|
|
|
//----Proxy-Implementation-of-SessionCommand--------
|
2016-12-12 02:20:58 +01:00
|
|
|
|
2017-04-09 02:59:16 +02:00
|
|
|
Symbol cycle (Symbol cmdID, string const& invocID) override { return _i_.cycle (cmdID, cStr(invocID));}
|
|
|
|
|
void bindArg (Symbol cmdID, lib::diff::Rec const& args) override { _i_.bindArg (cmdID, &args); }
|
|
|
|
|
void invoke (Symbol cmdID) override { _i_.invoke (cmdID); }
|
2016-12-12 02:20:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
Proxy (IHandle const& iha) : THolder(iha) {}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2016-12-12 03:09:08 +01:00
|
|
|
template void openProxy<IHandle_SessionCommand> (IHandle_SessionCommand const&);
|
|
|
|
|
template void closeProxy<IHandle_SessionCommand> (void);
|
2016-12-12 02:20:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
}} // namespace lumiera::facade
|