Last change
on this file since 125 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:
937 bytes
|
Line | |
---|
1 | /* |
---|
2 | * $Id: XMLUtils_testAttributesEmpty.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Configuration/include/XMLUtils.h" |
---|
9 | |
---|
10 | namespace morpheo { |
---|
11 | namespace behavioural { |
---|
12 | namespace configuration { |
---|
13 | |
---|
14 | #undef FUNCTION |
---|
15 | #define FUNCTION "testAttributesEmpty" |
---|
16 | void testAttributesEmpty (XML_t * xml, |
---|
17 | attributes_t attributes) |
---|
18 | { |
---|
19 | // Test if attributes is empty |
---|
20 | if (not attributes.empty()) |
---|
21 | { |
---|
22 | std::string msg = ""; |
---|
23 | for (attributes_t::iterator it=attributes.begin(); |
---|
24 | it!=attributes.end(); |
---|
25 | ++it) |
---|
26 | { |
---|
27 | if (it!=attributes.begin()) |
---|
28 | msg+= ", "; |
---|
29 | msg+=it->first; |
---|
30 | } |
---|
31 | throw ERRORMORPHEO(FUNCTION,toString(_("Syntax error, node \"%s\" must have not this attributes : %s\n"),xml->getName().c_str(),msg.c_str())); |
---|
32 | } |
---|
33 | } |
---|
34 | |
---|
35 | }; // end namespace configuration |
---|
36 | }; // end namespace behavioural |
---|
37 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.