36 struct ObjectPath::Impl {
41 typedef std::vector<Record> PathStack;
42 PathStack path_stack_;
48 const std::string& operator()(
49 const ObjectPath::Impl::PathStack::value_type& item_)
const noexcept {
62 const std::string& full_path_) {
64 Impl::PathStack stack_;
65 if(!full_path_.empty()) {
66 std::string::size_type start_(0);
68 auto index_(full_path_.find(
"::", start_));
69 if(index_ == std::string::npos)
71 stack_.push_back({full_path_.substr(start_, index_ - start_), {}});
74 stack_.push_back({full_path_.substr(start_), {}});
79 pimpl->path_stack_.swap(stack_);
87 const std::string& name_) {
88 assert(!name_.empty());
90 pimpl->path_stack_.push_back({name_, {}});
94 assert(!pimpl->path_stack_.empty());
95 pimpl->path_stack_.pop_back();
99 const std::string& name_,
100 const std::string& value_) {
101 assert(!pimpl->path_stack_.empty());
103 pimpl->path_stack_.back().params.appendParameter(name_, value_);
107 assert(!pimpl->path_stack_.empty());
109 return pimpl->path_stack_.back().name;
113 assert(!pimpl->path_stack_.empty());
115 return pimpl->path_stack_.back().params;
119 std::ostringstream oss_;
121 pimpl->path_stack_.begin(),
122 pimpl->path_stack_.end(),
128 const std::string& local_key_)
const {
130 assert(pimpl->path_stack_.size() > 1);
132 std::ostringstream oss_;
133 auto suite_part_(pimpl->path_stack_.begin());
137 pimpl->path_stack_.end(),
139 oss_ <<
">>" << local_key_;
146 if(pimpl->path_stack_.size() > path_.pimpl->path_stack_.size())
150 for(
int i_(0); i_ < pimpl->path_stack_.size(); ++i_) {
151 if(pimpl->path_stack_[i_].name != path_.pimpl->path_stack_[i_].name)