UniSet 2.32.1
ProxyManager.h
1/*
2 * Copyright (c) 2015 Pavel Vainerman.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as
6 * published by the Free Software Foundation, version 2.1.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Lesser Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16// --------------------------------------------------------------------------
20// --------------------------------------------------------------------------
21#ifndef ProxyManager_H_
22#define ProxyManager_H_
23//---------------------------------------------------------------------------
24#include <unordered_map>
25#include <memory>
26#include "UniSetObject.h"
27
28//----------------------------------------------------------------------------
29namespace uniset
30{
31 //----------------------------------------------------------------------------
32 class PassiveObject;
33 //----------------------------------------------------------------------------
34
45 public UniSetObject
46 {
47
48 public:
51
52 void attachObject( PassiveObject* po, uniset::ObjectId id );
53 void detachObject( uniset::ObjectId id );
54
55 std::shared_ptr<UInterface> uin;
56
57 protected:
59 virtual void processingMessage( const uniset::VoidMessage* msg ) override;
60 virtual void allMessage( const uniset::VoidMessage* msg );
61
62 virtual bool activateObject() override;
63 virtual bool deactivateObject() override;
64
65 private:
66 typedef std::unordered_map<uniset::ObjectId, PassiveObject*> PObjectMap;
67 PObjectMap omap;
68 };
69 // -------------------------------------------------------------------------
70} // end of uniset namespace
71//----------------------------------------------------------------------------------------
72#endif // ProxyManager
73//----------------------------------------------------------------------------------------
Definition PassiveObject.h:42
Definition ProxyManager.h:46
virtual bool activateObject() override
Активизация объекта (переопределяется для необходимых действий после активизации)
Definition ProxyManager.cc:68
virtual bool deactivateObject() override
Деактивация объекта (переопределяется для необходимых действий при завершении работы)
Definition ProxyManager.cc:118
virtual void processingMessage(const uniset::VoidMessage *msg) override
Definition ProxyManager.cc:135
Definition UniSetObject.h:80
Definition MessageType.h:91
Definition Calibration.h:27
long ObjectId
Definition UniSetTypes_i.idl:30