replicode
Perf_class.h
Go to the documentation of this file.
1 //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
2 //_/_/
3 //_/_/ HUMANOBS - mBrane - Perf
4 //_/_/
5 //_/_/ Eric Nivel
6 //_/_/ Center for Analysis and Design of Intelligent Agents
7 //_/_/ Reykjavik University, Menntavegur 1, 101 Reykjavik, Iceland
8 //_/_/ http://cadia.ru.is
9 //_/_/ Copyright(c)2012
10 //_/_/
11 //_/_/ This software was developed by the above copyright holder as part of
12 //_/_/ the HUMANOBS EU research project, in collaboration with the
13 //_/_/ following parties:
14 //_/_/
15 //_/_/ Autonomous Systems Laboratory
16 //_/_/ Technical University of Madrid, Spain
17 //_/_/ http://www.aslab.org/
18 //_/_/
19 //_/_/ Communicative Machines
20 //_/_/ Edinburgh, United Kingdom
21 //_/_/ http://www.cmlabs.com/
22 //_/_/
23 //_/_/ Istituto Dalle Molle di Studi sull'Intelligenza Artificiale
24 //_/_/ University of Lugano and SUPSI, Switzerland
25 //_/_/ http://www.idsia.ch/
26 //_/_/
27 //_/_/ Institute of Cognitive Sciences and Technologies
28 //_/_/ Consiglio Nazionale delle Ricerche, Italy
29 //_/_/ http://www.istc.cnr.it/
30 //_/_/
31 //_/_/ Dipartimento di Ingegneria Informatica
32 //_/_/ University of Palermo, Italy
33 //_/_/ http://roboticslab.dinfo.unipa.it/index.php/Main/HomePage
34 //_/_/
35 //_/_/
36 //_/_/ --- HUMANOBS Open-Source BSD License, with CADIA Clause v 1.0 ---
37 //_/_/
38 //_/_/ Redistribution and use in source and binary forms, with or without
39 //_/_/ modification, is permitted provided that the following conditions
40 //_/_/ are met:
41 //_/_/
42 //_/_/ - Redistributions of source code must retain the above copyright
43 //_/_/ and collaboration notice, this list of conditions and the
44 //_/_/ following disclaimer.
45 //_/_/
46 //_/_/ - Redistributions in binary form must reproduce the above copyright
47 //_/_/ notice, this list of conditions and the following
48 //_/_/ disclaimer in the documentation and/or other materials provided
49 //_/_/ with the distribution.
50 //_/_/
51 //_/_/ - Neither the name of its copyright holders nor the names of its
52 //_/_/ contributors may be used to endorse or promote products
53 //_/_/ derived from this software without specific prior written permission.
54 //_/_/
55 //_/_/ - CADIA Clause: The license granted in and to the software under this
56 //_/_/ agreement is a limited-use license. The software may not be used in
57 //_/_/ furtherance of:
58 //_/_/ (i) intentionally causing bodily injury or severe emotional distress
59 //_/_/ to any person;
60 //_/_/ (ii) invading the personal privacy or violating the human rights of
61 //_/_/ any person; or
62 //_/_/ (iii) committing or preparing for any act of war.
63 //_/_/
64 //_/_/ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
65 //_/_/ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
66 //_/_/ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
67 //_/_/ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
68 //_/_/ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
69 //_/_/ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
70 //_/_/ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
71 //_/_/ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
72 //_/_/ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
73 //_/_/ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
74 //_/_/ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
75 //_/_/
76 //_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
77 
78 #ifndef Perf_class_h
79 #define Perf_class_h
80 
81 #include "../Core/mBrane.h"
82 #include "../Core/message.h"
83 
84 using namespace mBrane;
85 using namespace mBrane::sdk;
86 using namespace mBrane::sdk::payloads;
87 
88 template<class U> class _Ball: // to allow derivation
89  public payloads::Message<U, Memory>
90 {
91 public:
94 };
95 
96 class Ball: public _Ball<Ball>
97 {
98 public:
99  int32_t id;
100  Ball(): _Ball<Ball>(), id(-1) {}
101  Ball(int32_t id): _Ball<Ball>(), id(id) {}
102 };
103 class ReturnBall: public _Ball<ReturnBall>
104 {
105 public:
106  int32_t id;
107  ReturnBall(): _Ball<ReturnBall>(), id(-1) {}
108  ReturnBall(int32_t id): _Ball<ReturnBall>(), id(id) {}
109 };
110 class Type1: public payloads::Message<Type1, Memory> {};
111 class Type2: public payloads::Message<Type2, Memory> {};
112 
113 class Ball1: public _Ball<Ball1>
114 {
115 public:
116  int32_t num;
117  int32_t num2;
118  Ball1(): _Ball<Ball1>(), num(-1), num2(10) {}
119  Ball1(int32_t num): _Ball<Ball1>(), num(num), num2(num + 1) {}
120 };
121 
122 class Ball2: public _Ball<Ball2>
123 {
124 public:
125  int32_t num;
126  int32_t num2;
127  Ball2(): _Ball<Ball2>(), num(-1), num2(10) {}
128  Ball2(int32_t num): _Ball<Ball2>(), num(num), num2(num + 1) {}
129 };
130 
131 class Ball3: public _Ball<Ball3>
132 {
133 public:
134  int32_t num;
135  int32_t num2;
136  Ball3(): _Ball<Ball3>(), num(-1), num2(10) {}
137  Ball3(int32_t num): _Ball<Ball3>(), num(num), num2(num + 1) {}
138 };
139 
140 class Ball4: public _Ball<Ball4>
141 {
142 public:
143  int32_t num;
144  int32_t num2;
145  Ball4(): _Ball<Ball4>(), num(-1), num2(10) {}
146  Ball4(int32_t num): _Ball<Ball4>(), num(num), num2(num + 1) {}
147 };
148 
149 class Ball5: public _Ball<Ball5>
150 {
151 public:
152  int32_t num;
153  int32_t num2;
154  Ball5(): _Ball<Ball5>(), num(-1), num2(10) {}
155  Ball5(int32_t num): _Ball<Ball5>(), num(num), num2(num + 1) {}
156 };
157 
158 class Ball6: public _Ball<Ball6>
159 {
160 public:
161  int32_t num;
162  int32_t num2;
163  Ball6(): _Ball<Ball6>(), num(-1), num2(10) {}
164  Ball6(int32_t num): _Ball<Ball6>(), num(num), num2(num + 1) {}
165 };
166 
167 class Ball7: public _Ball<Ball7>
168 {
169 public:
170  int32_t num;
171  int32_t num2;
172  Ball7(): _Ball<Ball7>(), num(-1), num2(10) {}
173  Ball7(int32_t num): _Ball<Ball7>(), num(num), num2(num + 1) {}
174 };
175 
176 class Ball8: public _Ball<Ball8>
177 {
178 public:
179  int32_t num;
180  int32_t num2;
181  Ball8(): _Ball<Ball8>(), num(-1), num2(10) {}
182  Ball8(int32_t num): _Ball<Ball8>(), num(num), num2(num + 1) {}
183 };
184 
185 class Ball9: public _Ball<Ball9>
186 {
187 public:
188  int32_t num;
189  int32_t num2;
190  Ball9(): _Ball<Ball9>(), num(-1), num2(10) {}
191  Ball9(int32_t num): _Ball<Ball9>(), num(num), num2(num + 1) {}
192 };
193 
194 // For testing the cache.
195 
196 class Shared: public SharedObject<Shared, Memory>
197 {
198 public:
199 };
200 
201 
202 #endif /* Perf_class.h */
int32_t num2
Definition: Perf_class.h:144
Ball()
Definition: Perf_class.h:100
Ball2(int32_t num)
Definition: Perf_class.h:128
Ball6(int32_t num)
Definition: Perf_class.h:164
Definition: Perf_class.h:158
Definition: Perf_class.h:96
int32_t num2
Definition: Perf_class.h:171
int32_t num
Definition: Perf_class.h:116
Definition: Perf_class.h:196
int32_t id
Definition: Perf_class.h:106
int32_t num2
Definition: Perf_class.h:117
Ball5()
Definition: Perf_class.h:154
int32_t num
Definition: Perf_class.h:125
Ball5(int32_t num)
Definition: Perf_class.h:155
Ball9()
Definition: Perf_class.h:190
int32_t num2
Definition: Perf_class.h:153
int32_t id
Definition: Perf_class.h:99
int32_t num
Definition: Perf_class.h:179
Definition: Perf_class.h:149
Ball7()
Definition: Perf_class.h:172
int32_t num2
Definition: Perf_class.h:189
Ball9(int32_t num)
Definition: Perf_class.h:191
uint32_t d1
Definition: Perf_class.h:92
Definition: array.h:84
Ball(int32_t id)
Definition: Perf_class.h:101
Ball6()
Definition: Perf_class.h:163
Definition: message.h:163
int32_t num
Definition: Perf_class.h:134
Ball7(int32_t num)
Definition: Perf_class.h:173
Definition: Perf_class.h:185
Ball1()
Definition: Perf_class.h:118
Ball1(int32_t num)
Definition: Perf_class.h:119
Ball8(int32_t num)
Definition: Perf_class.h:182
Definition: Perf_class.h:122
Definition: message.h:147
Ball4(int32_t num)
Definition: Perf_class.h:146
uint32_t padding
Definition: Perf_class.h:93
Definition: array.h:86
int32_t num
Definition: Perf_class.h:152
Definition: Perf_class.h:111
Ball2()
Definition: Perf_class.h:127
Ball4()
Definition: Perf_class.h:145
Ball8()
Definition: Perf_class.h:181
ReturnBall()
Definition: Perf_class.h:107
int32_t num2
Definition: Perf_class.h:126
Definition: Perf_class.h:140
Ball3(int32_t num)
Definition: Perf_class.h:137
int32_t num
Definition: Perf_class.h:161
Definition: Perf_class.h:113
int32_t num
Definition: Perf_class.h:170
int32_t num2
Definition: Perf_class.h:135
Definition: control_messages.cpp:83
int32_t num2
Definition: Perf_class.h:180
Ball3()
Definition: Perf_class.h:136
Definition: Perf_class.h:176
int32_t num
Definition: Perf_class.h:143
ReturnBall(int32_t id)
Definition: Perf_class.h:108
Definition: Perf_class.h:110
int32_t num
Definition: Perf_class.h:188
Definition: Perf_class.h:88
Definition: Perf_class.h:131
int32_t num2
Definition: Perf_class.h:162
Definition: Perf_class.h:103
Definition: Perf_class.h:167