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

Public Member Functions | |
| timeBuilder (const char *tag) | |
| void | Build (const AttributeList &attr, const std::string &buffer) |
Definition at line 13 of file timeBuilder.h.
|
|
Definition at line 22 of file timeBuilder.cxx. 00022 : xmli::Builder(tag) 00023 { }
|
|
||||||||||||
|
Definition at line 27 of file timeBuilder.cxx. References xmli::ChString::GetTime(), and xmli::ChString::Split(). 00029 {
00030 //======================================================================
00031 // Build a vector<struct tm> and place it on the XMLIStack
00032 // attr - list of attributes (none used...)
00033 // buffer - space separated integers
00034 //======================================================================
00035 std::vector<std::string> vs;
00036 std::vector<time_t> vi;
00037
00038 // Split the string in to sub fields and extra the values from each
00039 // sub-field
00040 xmli::ChString::Split(buffer.c_str()," ,\n\t\r",vs);
00041 std::vector<std::string>::iterator itr(vs.begin());
00042 std::vector<std::string>::iterator itrEnd(vs.end());
00043
00044 for (; itr!=itrEnd; ++itr) {
00045 time_t ttime = xmli::ChString::GetTime(*itr);
00046 vi.push_back(ttime);
00047 }
00048
00049 // Add this vector of intean values into the "global" stack
00050 xmli::Stack<std::vector<time_t> >::Instance().push(vi);
00051 }
|
1.3.9.1