Rev 1598 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1598 | Rev 1642 | ||
|---|---|---|---|
| 1 | /* |
1 | /* |
| 2 | * |
2 | * |
| 3 | * Copyright (C) 2010 Mattias Runge |
3 | * Copyright (C) 2010 Mattias Runge |
| 4 | * |
4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
8 | * (at your option) any later version. |
| 9 | * |
9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
13 | * GNU General Public License for more details. |
| 14 | * |
14 | * |
| 15 | * You should have received a copy of the GNU General Public License along |
15 | * You should have received a copy of the GNU General Public License along |
| 16 | * with this program; if not, write to the Free Software Foundation, Inc., |
16 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | * |
18 | * |
| 19 | */ |
19 | */ |
| 20 | 20 | ||
| 21 | #ifndef |
21 | #ifndef CONTROL_MODULE_H |
| 22 | #define |
22 | #define CONTROL_MODULE_H |
| 23 | 23 | ||
| 24 | #include <boost/shared_ptr.hpp> |
24 | #include <boost/shared_ptr.hpp> |
| 25 | 25 | ||
| 26 | #include "Node.h" |
26 | #include "Node.h" |
| 27 | 27 | ||
| 28 | namespace atom { |
28 | namespace atom { |
| 29 | namespace |
29 | namespace control { |
| 30 | 30 | ||
| 31 | class Module |
31 | class Module |
| 32 | { |
32 | { |
| 33 | public: |
33 | public: |
| 34 | typedef boost::shared_ptr<Module> Pointer; |
34 | typedef boost::shared_ptr<Module> Pointer; |
| 35 | typedef std::string FullId; |
35 | typedef std::string FullId; |
| 36 | typedef unsigned int Id; |
36 | typedef unsigned int Id; |
| 37 | 37 | ||
| 38 | Module(Id id, std::string name, std::string class_name); |
38 | Module(Id id, std::string name, std::string class_name); |
| 39 | virtual ~Module(); |
39 | virtual ~Module(); |
| 40 | 40 | ||
| 41 | static std::string MakeFullId(Id id, std::string name); |
41 | static std::string MakeFullId(Id id, std::string name); |
| 42 | 42 | ||
| 43 | FullId GetFullId(); |
43 | FullId GetFullId(); |
| 44 | 44 | ||
| 45 | Node::Id GetNodeId(); |
45 | Node::Id GetNodeId(); |
| 46 | void SetNodeId(Node::Id node_id); |
46 | void SetNodeId(Node::Id node_id); |
| 47 | 47 | ||
| 48 | Id GetId(); |
48 | Id GetId(); |
| 49 | std::string GetName(); |
49 | std::string GetName(); |
| 50 | std::string GetClassName(); |
50 | std::string GetClassName(); |
| 51 | 51 | ||
| 52 | private: |
52 | private: |
| 53 | std::string full_id_; |
53 | std::string full_id_; |
| 54 | Node::Id node_id_; |
54 | Node::Id node_id_; |
| 55 | Id id_; |
55 | Id id_; |
| 56 | std::string name_; |
56 | std::string name_; |
| 57 | std::string class_name_; |
57 | std::string class_name_; |
| 58 | }; |
58 | }; |
| 59 | 59 | ||
| 60 | }; // namespace |
60 | }; // namespace control |
| 61 | }; // namespace atom |
61 | }; // namespace atom |
| 62 | 62 | ||
| 63 | #endif // |
63 | #endif // CONTROL_MODULE_H |
| 64 | 64 | ||