Update of /cvsroot/objecthandler/ObjectHandler/oh
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3145/oh
Modified Files:
utilities.cpp utilities.hpp
Log Message:
rename ohParseFields() to ohSplit() and modify behavior:
- no need to specify "DOUBLE/STRING" datatype
- if index omitted, all fields returned as array
Index: utilities.cpp
===================================================================
RCS file: /cvsroot/objecthandler/ObjectHandler/oh/utilities.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** utilities.cpp 4 Oct 2006 09:37:43 -0000 1.15
--- utilities.cpp 3 Dec 2006 21:08:46 -0000 1.16
***************
*** 79,83 ****
std::vector<std::string> split(
const std::string &line,
- unsigned int maxRequired,
const std::string &delim) {
std::vector<std::string> ret;
--- 79,82 ----
***************
*** 86,90 ****
boost::match_results<std::string::const_iterator> m;
boost::regex r("[^" + delim + "]+");
! while (maxRequired-- && boost::regex_search(start, end, m, r)) {
ret.push_back(std::string(m[0].first, m[0].second));
start = m[0].second;
--- 85,89 ----
boost::match_results<std::string::const_iterator> m;
boost::regex r("[^" + delim + "]+");
! while (boost::regex_search(start, end, m, r)) {
ret.push_back(std::string(m[0].first, m[0].second));
start = m[0].second;
Index: utilities.hpp
===================================================================
RCS file: /cvsroot/objecthandler/ObjectHandler/oh/utilities.hpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** utilities.hpp 26 Oct 2006 10:14:41 -0000 1.13
--- utilities.hpp 3 Dec 2006 21:08:46 -0000 1.14
***************
*** 83,87 ****
std::vector<std::string> split(
const std::string &line,
- unsigned int maxRequired,
const std::string &delim);
--- 83,86 ----
|