Main Page · Modules · All Classes · Class Hierarchy
MARobotStateUpdater.hpp
1 /*
2  * This file is part of the AiBO+ project
3  *
4  * Copyright (C) 2005-2016 Csaba Kertész (csaba.kertesz@gmail.com)
5  *
6  * AiBO+ 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 of the License, or
9  * (at your option) any later version.
10  *
11  * AiBO+ is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
19  *
20  */
21 
22 #pragma once
23 
24 #include <MCDefs.hpp>
25 
26 class MARobotState;
27 
33 namespace MA
34 {
36 typedef enum
37 {
38  UpdateSensorData = 0,
39  UpdateSensorIndicators,
40  UpdateComplexIndicators,
41 } RobotStateUpdateType;
42 }
43 
48 {
50 public:
52  explicit MARobotStateUpdater(MA::RobotStateUpdateType update_type);
54  virtual ~MARobotStateUpdater();
55 
63  static void RegisterUpdater(MARobotStateUpdater& updater);
64 
76  static void Run(MARobotState& state);
77 
78 private:
79 
87  virtual void UpdateRobotState(MARobotState& state) = 0;
88 
89 private:
91  MA::RobotStateUpdateType UpdateType;
92 };
93 
MA::RobotStateUpdateType UpdateType
Update type.
#define MC_DISABLE_DEFAULT_CTOR(class_name)
Helper macro to disable the default constructor of a class.
Definition: MCDefs.hpp:611
Robot state updater base class.
Robot state.