Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/gl_gui/signal_connector.cc @ 7875

Last change on this file since 7875 was 7855, checked in by bensch, 19 years ago

qtgui: cleanup as patrick sugested

File size: 1.4 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: Benjamin Grauer
13   co-programmer: ...
14*/
15
16//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
17
18#include "signal_connector.h"
19
20namespace OrxGui
21{
22
23  SignalConnector::SignalConnector( )
24  {
25    this->object = NULL;
26    this->exec = NULL;
27  }
28
29  SignalConnector::SignalConnector(BaseObject* object, const Executor* executor)
30  {
31    this->object = object;
32    this->exec = executor;
33  };
34
35  SignalConnector::SignalConnector(const SignalConnector& signalConnector)
36  {
37    this->object = signalConnector.object;
38    this->exec = (signalConnector.exec == NULL) ? NULL : signalConnector.exec->clone();
39  }
40
41  SignalConnector::~SignalConnector()
42  {
43    delete exec;
44  }
45
46  SignalConnector& SignalConnector::operator=(const SignalConnector& signalConnector)
47  {
48    delete this->exec;
49    this->object = signalConnector.object;
50    this->exec = (signalConnector.exec == NULL) ? NULL : signalConnector.exec->clone();
51  }
52
53  void SignalConnector::operator()(const std::string& parameters) const
54  {
55    if (exec != NULL && object != NULL)
56      (*this->exec)(this->object, parameters);
57  }
58
59}
Note: See TracBrowser for help on using the repository browser.