#include <xmlfileBuilder.h>
Inheritance diagram for xmli::xmlfileBuilder:

Public Member Functions | |
| xmlfileBuilder (const char *tag) | |
| void | Build (const AttributeList &attr, const std::string &buffer) |
Definition at line 14 of file xmlfileBuilder.h.
|
|
Definition at line 23 of file xmlfileBuilder.cxx.
00023 : xmli::Builder(tag) { } |
|
||||||||||||
|
Definition at line 27 of file xmlfileBuilder.cxx. References xmli::AttributeList, xmli::ReadFile(), and xmli::ChString::Split().
00029 {
00030 //======================================================================
00031 // Handle the xmlfile tag.
00032 //
00033 // At the end of the tag, parse each of the files listed in "buffer"
00034 //======================================================================
00035
00036 // Split the string in to sub fields and extra the values from each
00037 // sub-field
00038 std::vector<std::string> files;
00039 xmli::ChString::Split(buffer.c_str()," ,\n\t\r",files);
00040
00041 // Parse each file
00042 std::vector<std::string>::iterator itr(files.begin());
00043 std::vector<std::string>::iterator itrEnd(files.end());
00044 for (; itr!=itrEnd; ++itr) {
00045 int nread = xmli::ReadFile(itr->c_str());
00046 if (nread<1) {
00047 std::cerr <<
00048 "xmli::xmlfileBuilder: File '" << itr->c_str() <<
00049 "' does not exist." << std::endl;
00050 exit(1);
00051 }
00052 }
00053 }
|
1.3.5