[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Usata-commits] Changes to usata2/src/object.cpp
From: |
David Lau |
Subject: |
[Usata-commits] Changes to usata2/src/object.cpp |
Date: |
Mon, 10 Jan 2005 02:24:55 -0500 |
Index: usata2/src/object.cpp
diff -u usata2/src/object.cpp:1.2 usata2/src/object.cpp:1.3
--- usata2/src/object.cpp:1.2 Sun Jan 9 08:57:22 2005
+++ usata2/src/object.cpp Mon Jan 10 06:58:12 2005
@@ -1,6 +1,9 @@
#include "object.hpp"
#include <boost/format.hpp>
-
+#include <boost/algorithm/string.hpp>
+#include <boost/bind.hpp>
+#include <vector>
+#include <string>
#define USATA_NODE_PATH_SEPARATOR '/'
namespace usata
@@ -8,6 +11,40 @@
namespace exceptions
{
+namespace
+{
+ std::string valid_path_chars = "abcdefghijklmnopqrstuvwxyz"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "1234567890_";
+
+}
+/*
+template <typename T>
+struct plus_equal : public binary_function(
+*/
+std::string
+node_path_check(const std::string& path)
+{
+ using std::string;
+ using std::vector;
+ using namespace boost::algorithm;
+ vector<string> strv;
+ split(strv,path,is_any_of("/"));
+
+ // remove any empty components
+ strv.erase(std::remove(strv.begin(), strv.end(), string("")),
+ strv.end());
+
+ // reassemble the path
+
+ std::string r_path;
+/*
+ std::for_each(strv.begin(), strv.end(),
+ boost::bind(string::append, &r_path, _1));
+*/
+
+ return string("");
+}
NodeMissingChild::NodeMissingChild(const std::string& nn, const std::string&
cn)
: child_name(nn),