4
* $Id: icommandscontroller.h $
7
* Copyright 2008-12 MetaEmotion S.L. All rights reserved.
8
* http://ginkgo-cadx.com
10
* This file is licensed under LGPL v3 license.
11
* See License.txt for details
14
#ifndef ICOMMANDSCONTROLLER_H
15
#define ICOMMANDSCONTROLLER_H
19
#include <api/iexception.h>
20
#include <api/icommand.h>
25
class EXTAPI ControladorComandosException : public GNC::GCS::IException {
27
ControladorComandosException(const std::string& msg, const std::string& componente = "Model", bool fatal = true) throw();
31
class EXTAPI IControladorComandos {
34
IControladorComandos();
35
virtual ~IControladorComandos();
39
static IControladorComandos* Instance();
40
static void FreeInstance();
42
virtual void Process(IComando*) = 0;
43
virtual void ProcessSync(IComando*, bool autodelete) = 0;
44
virtual void ProcessAsync(std::string descr, IComando*, void* owner) = 0;
45
virtual void AbortarComando(long threadId, bool sincrono = true) = 0;
46
virtual void AbortarComandosDeOwner(void* owner) = 0;
47
virtual void AbortarComandosDeOwnerAsincrono(void* owner) = 0;
48
virtual void AbortarComando(IComando* pComando, bool sincrono = true) = 0;
50
virtual unsigned int GetNumActiveCommands() = 0;