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 CommandControllerException : public GNC::GCS::IException {
27
CommandControllerException(const std::string& msg, const std::string& componente = "Model", bool fatal = true) throw();
31
class EXTAPI ICommandController {
35
virtual ~ICommandController();
39
static ICommandController* Instance();
40
static void FreeInstance();
42
virtual void ProcessSync(IComando*, bool autodelete, bool update = true, GNC::INotificadorProgreso* pNotifier = NULL) = 0;
43
virtual void ProcessAsync(std::string descr, IComando*, void* owner) = 0;
44
virtual void AbortarComando(long threadId, bool sincrono = true) = 0;
45
virtual void AbortarComandosDeOwner(void* owner) = 0;
46
virtual void AbortarComandosDeOwnerAsincrono(void* owner) = 0;
47
virtual void AbortarComando(IComando* pComando, bool sincrono = true) = 0;
49
virtual unsigned int GetNumActiveCommands() = 0;