HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
path.h File Reference
#include "pxr/pxr.h"
#include "pxr/usd/sdf/api.h"
#include "pxr/usd/sdf/pool.h"
#include "pxr/usd/sdf/tokens.h"
#include "pxr/base/tf/stl.h"
#include "pxr/base/tf/token.h"
#include "pxr/base/vt/traits.h"
#include <hboost/intrusive_ptr.hpp>
#include <hboost/operators.hpp>
#include <algorithm>
#include <iterator>
#include <set>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
#include "pxr/usd/sdf/pathNode.h"
+ Include dependency graph for path.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Sdf_PathNodeHandleImpl< Handle, Counted, PathNode >
 
class  SdfPath
 
struct  SdfPath::Hash
 
struct  SdfPath::FastLessThan
 
struct  Sdf_PathIdentity
 

Typedefs

typedef hboost::intrusive_ptr
< const Sdf_PathNode
Sdf_PathNodeConstRefPtr
 
using Sdf_PathPrimPartPool = Sdf_Pool< Sdf_PathPrimTag, Sdf_SizeofPrimPathNode, 8 >
 
using Sdf_PathPropPartPool = Sdf_Pool< Sdf_PathPropTag, Sdf_SizeofPropPathNode, 8 >
 
using Sdf_PathPrimHandle = Sdf_PathPrimPartPool::Handle
 
using Sdf_PathPropHandle = Sdf_PathPropPartPool::Handle
 
using Sdf_PathPrimNodeHandle = Sdf_PathNodeHandleImpl< Sdf_PathPrimHandle, true >
 
using Sdf_PathPropNodeHandle = Sdf_PathNodeHandleImpl< Sdf_PathPropHandle, false >
 
typedef std::set< class SdfPathSdfPathSet
 A set of SdfPaths. More...
 
typedef std::vector< class
SdfPath
SdfPathVector
 A vector of SdfPaths. More...
 

Functions

void intrusive_ptr_add_ref (Sdf_PathNode const *)
 
void intrusive_ptr_release (Sdf_PathNode const *)
 
 VT_TYPE_IS_CHEAP_TO_COPY (class SdfPath)
 
size_t hash_value (SdfPath const &path)
 
SDF_API std::ostream & operator<< (std::ostream &out, const SdfPath &path)
 Writes the string representation of path to out. More...
 
template<class ForwardIterator , class GetPathFn = Sdf_PathIdentity>
std::pair< ForwardIterator,
ForwardIterator > 
SdfPathFindPrefixedRange (ForwardIterator begin, ForwardIterator end, SdfPath const &prefix, GetPathFn const &getPath=GetPathFn())
 
template<class RandomAccessIterator , class GetPathFn >
RandomAccessIterator Sdf_PathFindLongestPrefixImpl (RandomAccessIterator begin, RandomAccessIterator end, SdfPath const &path, bool strictPrefix, GetPathFn const &getPath)
 
template<class RandomAccessIterator , class GetPathFn = Sdf_PathIdentity, class = typename std::enable_if< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< RandomAccessIterator>::iterator_category >::value >::type>
RandomAccessIterator SdfPathFindLongestPrefix (RandomAccessIterator begin, RandomAccessIterator end, SdfPath const &path, GetPathFn const &getPath=GetPathFn())
 
template<class RandomAccessIterator , class GetPathFn = Sdf_PathIdentity, class = typename std::enable_if< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< RandomAccessIterator>::iterator_category >::value >::type>
RandomAccessIterator SdfPathFindLongestStrictPrefix (RandomAccessIterator begin, RandomAccessIterator end, SdfPath const &path, GetPathFn const &getPath=GetPathFn())
 
template<class Iter , class MapParam , class GetPathFn = Sdf_PathIdentity>
Iter Sdf_PathFindLongestPrefixImpl (MapParam map, SdfPath const &path, bool strictPrefix, GetPathFn const &getPath=GetPathFn())
 
SDF_API std::set< SdfPath >
::const_iterator 
SdfPathFindLongestPrefix (std::set< SdfPath > const &set, SdfPath const &path)
 
template<class T >
std::map< SdfPath, T >
::const_iterator 
SdfPathFindLongestPrefix (std::map< SdfPath, T > const &map, SdfPath const &path)
 
template<class T >
std::map< SdfPath, T >::iterator SdfPathFindLongestPrefix (std::map< SdfPath, T > &map, SdfPath const &path)
 
SDF_API std::set< SdfPath >
::const_iterator 
SdfPathFindLongestStrictPrefix (std::set< SdfPath > const &set, SdfPath const &path)
 
template<class T >
std::map< SdfPath, T >
::const_iterator 
SdfPathFindLongestStrictPrefix (std::map< SdfPath, T > const &map, SdfPath const &path)
 
template<class T >
std::map< SdfPath, T >::iterator SdfPathFindLongestStrictPrefix (std::map< SdfPath, T > &map, SdfPath const &path)
 

Variables

PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
 

Typedef Documentation

typedef hboost::intrusive_ptr<const Sdf_PathNode> Sdf_PathNodeConstRefPtr

Definition at line 48 of file path.h.

Definition at line 74 of file path.h.

Definition at line 199 of file path.h.

using Sdf_PathPrimPartPool = Sdf_Pool< Sdf_PathPrimTag, Sdf_SizeofPrimPathNode, 8>

Definition at line 69 of file path.h.

Definition at line 75 of file path.h.

Definition at line 202 of file path.h.

using Sdf_PathPropPartPool = Sdf_Pool< Sdf_PathPropTag, Sdf_SizeofPropPathNode, 8>

Definition at line 72 of file path.h.

typedef std::set<class SdfPath> SdfPathSet

A set of SdfPaths.

Definition at line 206 of file path.h.

typedef std::vector<class SdfPath> SdfPathVector

A vector of SdfPaths.

Definition at line 208 of file path.h.

Function Documentation

size_t hash_value ( SdfPath const path)
inline

Definition at line 968 of file path.h.

void intrusive_ptr_add_ref ( Sdf_PathNode const )
void intrusive_ptr_release ( Sdf_PathNode const )
SDF_API std::ostream& operator<< ( std::ostream &  out,
const SdfPath path 
)

Writes the string representation of path to out.

template<class RandomAccessIterator , class GetPathFn >
RandomAccessIterator Sdf_PathFindLongestPrefixImpl ( RandomAccessIterator  begin,
RandomAccessIterator  end,
SdfPath const path,
bool  strictPrefix,
GetPathFn const getPath 
)

Definition at line 1023 of file path.h.

template<class Iter , class MapParam , class GetPathFn = Sdf_PathIdentity>
Iter Sdf_PathFindLongestPrefixImpl ( MapParam  map,
SdfPath const path,
bool  strictPrefix,
GetPathFn const getPath = GetPathFn() 
)

Definition at line 1134 of file path.h.

template<class RandomAccessIterator , class GetPathFn = Sdf_PathIdentity, class = typename std::enable_if< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< RandomAccessIterator>::iterator_category >::value >::type>
RandomAccessIterator SdfPathFindLongestPrefix ( RandomAccessIterator  begin,
RandomAccessIterator  end,
SdfPath const path,
GetPathFn const getPath = GetPathFn() 
)

Return an iterator to the element of [begin, end) that is the longest prefix of the given path (including the path itself), if there is such an element, otherwise end. The input range must be ordered according to SdfPath::operator<. If your range's iterators' value_types are not SdfPath, but you can obtain SdfPaths from them (e.g. vector<pair<SdfPath, X>>::iterator), you can pass a function to extract the path from the dereferenced iterator in getPath.

Definition at line 1097 of file path.h.

SDF_API std::set<SdfPath>::const_iterator SdfPathFindLongestPrefix ( std::set< SdfPath > const set,
SdfPath const path 
)

Return an iterator pointing to the element of set whose key is the longest prefix of the given path (including the path itself). If there is no such element, return set.end().

template<class T >
std::map<SdfPath, T>::const_iterator SdfPathFindLongestPrefix ( std::map< SdfPath, T > const map,
SdfPath const path 
)

Return an iterator pointing to the element of map whose key is the longest prefix of the given path (including the path itself). If there is no such element, return map.end().

Definition at line 1187 of file path.h.

template<class T >
std::map<SdfPath, T>::iterator SdfPathFindLongestPrefix ( std::map< SdfPath, T > &  map,
SdfPath const path 
)

Definition at line 1196 of file path.h.

template<class RandomAccessIterator , class GetPathFn = Sdf_PathIdentity, class = typename std::enable_if< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< RandomAccessIterator>::iterator_category >::value >::type>
RandomAccessIterator SdfPathFindLongestStrictPrefix ( RandomAccessIterator  begin,
RandomAccessIterator  end,
SdfPath const path,
GetPathFn const getPath = GetPathFn() 
)

Return an iterator to the element of [begin, end) that is the longest prefix of the given path (excluding the path itself), if there is such an element, otherwise end. The input range must be ordered according to SdfPath::operator<. If your range's iterators' value_types are not SdfPath, but you can obtain SdfPaths from them (e.g. vector<pair<SdfPath, X>>::iterator), you can pass a function to extract the path from the dereferenced iterator in getPath.

Definition at line 1123 of file path.h.

SDF_API std::set<SdfPath>::const_iterator SdfPathFindLongestStrictPrefix ( std::set< SdfPath > const set,
SdfPath const path 
)

Return an iterator pointing to the element of set whose key is the longest prefix of the given path (excluding the path itself). If there is no such element, return set.end().

template<class T >
std::map<SdfPath, T>::const_iterator SdfPathFindLongestStrictPrefix ( std::map< SdfPath, T > const map,
SdfPath const path 
)

Return an iterator pointing to the element of map whose key is the longest prefix of the given path (excluding the path itself). If there is no such element, return map.end().

Definition at line 1217 of file path.h.

template<class T >
std::map<SdfPath, T>::iterator SdfPathFindLongestStrictPrefix ( std::map< SdfPath, T > &  map,
SdfPath const path 
)

Definition at line 1227 of file path.h.

template<class ForwardIterator , class GetPathFn = Sdf_PathIdentity>
std::pair<ForwardIterator, ForwardIterator> SdfPathFindPrefixedRange ( ForwardIterator  begin,
ForwardIterator  end,
SdfPath const prefix,
GetPathFn const getPath = GetPathFn() 
)

Find the subrange of the sorted range [begin, end) that includes all paths prefixed by path. The input range must be ordered according to SdfPath::operator<. If your range's iterators' value_types are not SdfPath, but you can obtain SdfPaths from them (e.g. map<SdfPath, X>::iterator), you can pass a function to extract the path from the dereferenced iterator in getPath.

Definition at line 992 of file path.h.

VT_TYPE_IS_CHEAP_TO_COPY ( class SdfPath  )

Variable Documentation