15#ifndef WSFPPROXYPATH_HPP
16#define WSFPPROXYPATH_HPP
17#include "wsf_parser_export.h"
25#include "UtStringRef.hpp"
44 for (
size_t i = 0; i < aValue.size(); ++i)
46 value += value * 5 + aValue[i];
68 : mEntries(aRhs.mEntries)
72 : mEntries(aRhs.mEntries.
begin(), aRhs.mEntries.
begin() + aSubPathSize)
79 mEntries.push_back(aIndex);
84 mEntries.push_back(aStr);
89 mEntries.insert(mEntries.end(), aSuffixPath.mEntries.begin(), aSuffixPath.mEntries.end());
94 mEntries.push_back(aEntry);
106 for (
size_t i = 0; i < aPath.
size(); ++i)
118 bool Push(
const WsfPProxyValue& aBaseValue,
const std::string& aAttrName);
123 return std::lexicographical_compare(mEntries.begin(), mEntries.end(), aRhs.mEntries.begin(), aRhs.mEntries.end());
135 if (mEntries.size() <= aPath.mEntries.size())
137 return std::equal(mEntries.begin(), mEntries.end(), aPath.mEntries.begin());
142 size_t size()
const {
return mEntries.size(); }
149 std::string ToString(
const WsfPProxyValue& aRootProxy,
size_t aEntryIndex)
const;
150 std::vector<std::string> ToStringList(
const WsfPProxyValue& aRootProxy)
const;
151 void Pop() { mEntries.pop_back(); }
152 bool Empty()
const {
return mEntries.empty(); }
156 size_t MemoryUsage()
const;
160 if (mEntries.size() > aPathLength)
162 mEntries.resize(aPathLength);
167 std::vector<WsfPProxyKey> mEntries;
WsfComponentListT< T >::Iterator begin(const WsfComponentListT< T > &aList)
Definition WsfComponentList.hpp:540
std::set< WsfPProxyPath > WsfPProxyPathSet
Definition WsfPProxyPath.hpp:179
std::map< WsfPProxyPath, WsfPProxyPathSet > WsfPProxyPathMap
Definition WsfPProxyPath.hpp:180
std::vector< UtStringRef > WsfParseTypePath
Definition WsfParseTypePath.hpp:21
Definition WsfPProxyKey.hpp:24
bool IsIndex() const
Definition WsfPProxyKey.cpp:52
size_t GetIndex() const
Definition WsfPProxyKey.hpp:42
const std::string & GetMapKey() const
Definition WsfPProxyKey.hpp:43
Represents a path or unique key to a value in the proxy.
Definition WsfPProxyPath.hpp:64
const WsfPProxyKey & operator[](size_t i) const
Definition WsfPProxyPath.hpp:143
WsfPProxyKey & operator[](size_t i)
Definition WsfPProxyPath.hpp:144
bool operator!=(const WsfPProxyPath &aRhs) const
Definition WsfPProxyPath.hpp:120
WsfPProxyPath(const WsfPProxyKey &aEntry)
Definition WsfPProxyPath.hpp:75
WsfPProxyPath operator+(const WsfPProxyPath &aPath) const
Definition WsfPProxyPath.hpp:103
bool operator==(const WsfPProxyPath &aRhs) const
Definition WsfPProxyPath.hpp:119
WsfPProxyPath(const WsfPProxyPath &aRhs)
Definition WsfPProxyPath.hpp:67
WsfPProxyPath & operator+=(const std::string &aStr)
Definition WsfPProxyPath.hpp:82
WsfPProxyPath operator+(const std::string &aEntry) const
Definition WsfPProxyPath.hpp:112
bool operator>=(const WsfPProxyPath &aRhs) const
Definition WsfPProxyPath.hpp:125
void Clear()
Definition WsfPProxyPath.hpp:145
size_t size() const
Definition WsfPProxyPath.hpp:142
bool IsPrefixOf(const WsfPProxyPath &aPath) const
Definition WsfPProxyPath.hpp:133
void Trim(size_t aPathLength)
Definition WsfPProxyPath.hpp:158
WsfPProxyPath & operator+=(const WsfPProxyPath &aSuffixPath)
Definition WsfPProxyPath.hpp:87
WsfPProxyPath & operator+=(size_t aIndex)
Definition WsfPProxyPath.hpp:77
bool operator<(const WsfPProxyPath &aRhs) const
Definition WsfPProxyPath.hpp:121
WsfPProxyPath()
Definition WsfPProxyPath.hpp:66
void Pop()
Definition WsfPProxyPath.hpp:151
WsfPProxyKey & Back()
Definition WsfPProxyPath.hpp:153
bool Empty() const
Definition WsfPProxyPath.hpp:152
WsfPProxyPath operator+(const WsfPProxyKey &aEntry) const
Definition WsfPProxyPath.hpp:97
void Swap(WsfPProxyPath &aRhs)
Definition WsfPProxyPath.hpp:146
WsfPProxyPath & operator+=(const WsfPProxyKey &aEntry)
Definition WsfPProxyPath.hpp:92
const WsfPProxyKey & Back() const
Definition WsfPProxyPath.hpp:154
WsfPProxyPath(const WsfPProxyPath &aRhs, size_t aSubPathSize)
Definition WsfPProxyPath.hpp:71
Definition WsfPProxyValue.hpp:33
Template specialization for wsf::comm::Address. Allows usage of Address in std::unordered_map/set.
Definition WsfCommAddress.hpp:185
void swap(WsfRoute &aLhs, WsfRoute &aRhs)
Definition WsfRoute.hpp:294
Definition WsfPProxyPath.hpp:38
static size_t hashString(const std::string &aValue)
Definition WsfPProxyPath.hpp:41
static const int bucket_size
Definition WsfPProxyPath.hpp:39
bool operator()(const WsfPProxyKey &_Left, const WsfPProxyKey &_Right) const
Definition WsfPProxyPath.hpp:59
static const int min_buckets
Definition WsfPProxyPath.hpp:40
size_t operator()(const WsfPProxyKey &x) const
Definition WsfPProxyPath.hpp:51