summaryrefslogtreecommitdiff
path: root/i/siroco/src/message.h
diff options
context:
space:
mode:
Diffstat (limited to 'i/siroco/src/message.h')
-rw-r--r--i/siroco/src/message.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/i/siroco/src/message.h b/i/siroco/src/message.h
new file mode 100644
index 0000000..e5ad1fc
--- /dev/null
+++ b/i/siroco/src/message.h
@@ -0,0 +1,62 @@
+#ifndef message_h
+#define message_h
+// message.h
+// {{{
+//
+// Copyright (C) 2003 Nicolas Schodet et Pierre-André Galmes
+//
+// Robot APB Team/Efrei 2004.
+// Web: http://assos.efrei.fr/robot/
+// Email: robot AT efrei DOT fr
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// }}}
+
+namespace Siroco
+{
+
+class Message
+{
+ // Type du message contenu.
+ enum Type
+ {
+ typeAsservissementData,
+ typeAsservissementControl,
+ typeAsservissementGetInfo,
+ typeAsservissementInfo,
+ typeMax
+ };
+ private:
+ Type type_;
+ public:
+ // Constructeur.
+ Message (Type type);
+ // Destructeur et Big 3.
+ virtual ~Message (void);
+ // Récupère le type du message.
+ Type getType (void) const;
+ // Récupère le message.
+ template<typename T>
+ const T &get (void) const;
+ private:
+ // Méthodes interdites.
+ Message (const Message &);
+ Message &operator= (const Message &);
+};
+
+};
+
+#endif // message_h