1 |
#include "object.hpp" |
#include "object.hpp" |
2 |
#include <boost/format.hpp> |
#include <boost/format.hpp> |
3 |
|
#include <boost/algorithm/string.hpp> |
4 |
|
#include <boost/bind.hpp> |
5 |
|
#include <vector> |
6 |
|
#include <string> |
7 |
#define USATA_NODE_PATH_SEPARATOR '/' |
#define USATA_NODE_PATH_SEPARATOR '/' |
8 |
|
|
9 |
namespace usata |
namespace usata |
11 |
|
|
12 |
namespace exceptions |
namespace exceptions |
13 |
{ |
{ |
14 |
|
namespace |
15 |
|
{ |
16 |
|
std::string valid_path_chars = "abcdefghijklmnopqrstuvwxyz" |
17 |
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
18 |
|
"1234567890_"; |
19 |
|
|
20 |
|
} |
21 |
|
/* |
22 |
|
template <typename T> |
23 |
|
struct plus_equal : public binary_function( |
24 |
|
*/ |
25 |
|
std::string |
26 |
|
node_path_check(const std::string& path) |
27 |
|
{ |
28 |
|
using std::string; |
29 |
|
using std::vector; |
30 |
|
using namespace boost::algorithm; |
31 |
|
vector<string> strv; |
32 |
|
split(strv,path,is_any_of("/")); |
33 |
|
|
34 |
|
// remove any empty components |
35 |
|
strv.erase(std::remove(strv.begin(), strv.end(), string("")), |
36 |
|
strv.end()); |
37 |
|
|
38 |
|
// reassemble the path |
39 |
|
|
40 |
|
std::string r_path; |
41 |
|
/* |
42 |
|
std::for_each(strv.begin(), strv.end(), |
43 |
|
boost::bind(string::append, &r_path, _1)); |
44 |
|
*/ |
45 |
|
|
46 |
|
return string(""); |
47 |
|
} |
48 |
|
|
49 |
NodeMissingChild::NodeMissingChild(const std::string& nn, const std::string& cn) |
NodeMissingChild::NodeMissingChild(const std::string& nn, const std::string& cn) |
50 |
: child_name(nn), |
: child_name(nn), |