Last change
on this file since 117 was
88,
checked in by rosiere, 16 years ago
|
Almost complete design
with Test and test platform
|
-
Property svn:keywords set to
Id
|
File size:
1.4 KB
|
Line | |
---|
1 | #ifndef morpheo_behavioural_Parameters_test_h |
---|
2 | #define morpheo_behavioural_Parameters_test_h |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id: Parameters_test.h 88 2008-12-10 18:31:39Z rosiere $ |
---|
6 | * |
---|
7 | * [ Description ] |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | #include "Common/include/Debug.h" |
---|
12 | |
---|
13 | namespace morpheo { |
---|
14 | namespace behavioural { |
---|
15 | |
---|
16 | template <typename T> bool test (uint32_t size) |
---|
17 | { |
---|
18 | return (size <= (8*sizeof(T))); |
---|
19 | }; |
---|
20 | |
---|
21 | class Parameters_test |
---|
22 | { |
---|
23 | private : std::string _component; |
---|
24 | protected : std::string _error; |
---|
25 | protected : std::string _warning; |
---|
26 | protected : std::string _information; |
---|
27 | |
---|
28 | public : Parameters_test (std::string component) |
---|
29 | { |
---|
30 | _component = component; |
---|
31 | _error = ""; |
---|
32 | _warning = ""; |
---|
33 | }; |
---|
34 | public : ~Parameters_test (void) {}; |
---|
35 | |
---|
36 | public : bool have_error (void) { return (_error.length() != 0);}; |
---|
37 | public : void error (std::string str) { _error += MSG_ERROR ; _error += " <" + _component + "> " + str;} |
---|
38 | public : void warning (std::string str) { _warning += MSG_WARNING ; _warning += " <" + _component + "> " + str;} |
---|
39 | public : void information (std::string str) { _information += MSG_INFORMATION; _information += " <" + _component + "> " + str;} |
---|
40 | public : std::string print (void) { return _error + _warning + _information;}; |
---|
41 | }; |
---|
42 | |
---|
43 | }; // end namespace behavioural |
---|
44 | }; // end namespace morpheo |
---|
45 | |
---|
46 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.