HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SdfListProxy< _TypePolicy > Class Template Reference

#include <listProxy.h>

Public Types

typedef _TypePolicy TypePolicy
 
typedef SdfListProxy< TypePolicyThis
 
typedef TypePolicy::value_type value_type
 
typedef std::vector< value_typevalue_vector_type
 
typedef _ItemProxy reference
 
typedef _Iterator< This
*, _GetHelper
iterator
 
typedef _Iterator< const This
*, _ConstGetHelper
const_iterator
 
typedef
hboost::reverse_iterator
< iterator
reverse_iterator
 
typedef
hboost::reverse_iterator
< const_iterator
const_reverse_iterator
 

Public Member Functions

 SdfListProxy (SdfListOpType op)
 
 SdfListProxy (const std::shared_ptr< Sdf_ListEditor< TypePolicy > > &editor, SdfListOpType op)
 
iterator begin ()
 Return an iterator to the start of the sequence. More...
 
iterator end ()
 Return an iterator to the end of the sequence. More...
 
reverse_iterator rbegin ()
 Return a reverse iterator to the last item of the sequence. More...
 
reverse_iterator rend ()
 Return a reverse iterator past the start item of the sequence. More...
 
const_iterator begin () const
 Return a const iterator to the start of the sequence. More...
 
const_iterator end () const
 Return a const iterator to the end of the sequence. More...
 
const_reverse_iterator rbegin () const
 Return a const reverse iterator to the last item of the sequence. More...
 
const_reverse_iterator rend () const
 
size_t size () const
 Return the size of the sequence. More...
 
bool empty () const
 Return true if size() == 0. More...
 
reference operator[] (size_t n)
 Return a reference to the item at index n. More...
 
value_type operator[] (size_t n) const
 Return a copy of the item at index n. More...
 
reference front ()
 Return a reference to the item at the front of the sequence. More...
 
reference back ()
 Return a reference to the item at the back of the sequence. More...
 
value_type front () const
 Return a copy of the item at the front of the sequence. More...
 
value_type back () const
 Return a copy of the item at the back of the sequence. More...
 
void push_back (const value_type &elem)
 Append elem to this sequence. More...
 
void pop_back ()
 Remove the last element from this sequence. More...
 
iterator insert (iterator pos, const value_type &x)
 Insert x into this sequence at position pos. More...
 
template<class InputIterator >
void insert (iterator pos, InputIterator f, InputIterator l)
 
void erase (iterator pos)
 Erase the element at pos. More...
 
void erase (iterator f, iterator l)
 Erase all the elements in the range [f, l). More...
 
void clear ()
 Clear the contents of the sequence. More...
 
void resize (size_t n, const value_type &t=value_type())
 
 operator value_vector_type () const
 Produce a copy of the contents of this sequence into a vector. More...
 
template<class T2 >
Thisoperator= (const SdfListProxy< T2 > &other)
 
Thisoperator= (const value_vector_type &other)
 Replace all elements in this sequence with the given vector. More...
 
template<class Y >
Thisoperator= (const std::vector< Y > &v)
 Replace all elements in this sequence with the given vector. More...
 
template<class T2 >
bool operator== (const SdfListProxy< T2 > &y) const
 Equality comparison. More...
 
template<class T2 >
bool operator!= (const SdfListProxy< T2 > &y) const
 Inequality comparison. More...
 
template<class T2 >
bool operator< (const SdfListProxy< T2 > &y) const
 Less-than comparison. More...
 
template<class T2 >
bool operator<= (const SdfListProxy< T2 > &y) const
 Less-than-or-equal comparison. More...
 
template<class T2 >
bool operator> (const SdfListProxy< T2 > &y) const
 Greater-than comparison. More...
 
template<class T2 >
bool operator>= (const SdfListProxy< T2 > &y) const
 Greater-than-or-equal comparison. More...
 
bool operator== (const value_vector_type &y) const
 Equality comparison. More...
 
bool operator!= (const value_vector_type &y) const
 Inequality comparison. More...
 
bool operator< (const value_vector_type &y) const
 Less-than comparison. More...
 
bool operator> (const value_vector_type &y) const
 Greater-than comparison. More...
 
bool operator<= (const value_vector_type &y) const
 Less-than or equal to comparison. More...
 
bool operator>= (const value_vector_type &y) const
 Greater-than or equal to comparison. More...
 
 operator bool () const
 
SdfLayerHandle GetLayer () const
 Returns the layer that this list editor belongs to. More...
 
SdfPath GetPath () const
 Returns the path to this list editor's value. More...
 
bool IsExpired () const
 Returns true if the list editor is expired. More...
 
size_t Count (const value_type &value) const
 
size_t Find (const value_type &value) const
 
void Insert (int index, const value_type &value)
 
void Remove (const value_type &value)
 
void Replace (const value_type &oldValue, const value_type &newValue)
 
void Erase (size_t index)
 
void ApplyList (const SdfListProxy &list)
 Applies the edits in the given list to this one. More...
 
void ApplyEditsToList (value_vector_type *vec)
 Apply the edits in this list to the given vec. More...
 
template<class CB >
void ModifyItemEdits (CB callback)
 

Friends

class _ItemProxy
 
class _GetHelper
 
class _ConstGetHelper
 
template<class >
class SdfPyWrapListProxy
 
bool operator== (const value_vector_type &x, const SdfListProxy &y)
 Equality comparision. More...
 
bool operator!= (const value_vector_type &x, const SdfListProxy &y)
 Inequality comparision. More...
 
bool operator< (const value_vector_type &x, const SdfListProxy &y)
 Less-than comparison. More...
 
bool operator> (const value_vector_type &x, const SdfListProxy &y)
 Greater-than comparison. More...
 
bool operator<= (const value_vector_type &x, const SdfListProxy &y)
 Less-than or equal to comparison. More...
 
bool operator>= (const value_vector_type &x, const SdfListProxy &y)
 Greater-than or equal to comparison. More...
 

Detailed Description

template<class _TypePolicy>
class SdfListProxy< _TypePolicy >

Represents a single list of list editing operations.

An SdfListProxy represents a single list of list editing operations, making it look like an STL vector (modeling a random access container and back insertion sequence).

Definition at line 56 of file listProxy.h.

Member Typedef Documentation

template<class _TypePolicy>
typedef _Iterator<const This*, _ConstGetHelper> SdfListProxy< _TypePolicy >::const_iterator

Definition at line 215 of file listProxy.h.

template<class _TypePolicy>
typedef hboost::reverse_iterator<const_iterator> SdfListProxy< _TypePolicy >::const_reverse_iterator

Definition at line 217 of file listProxy.h.

template<class _TypePolicy>
typedef _Iterator<This*, _GetHelper> SdfListProxy< _TypePolicy >::iterator

Definition at line 214 of file listProxy.h.

template<class _TypePolicy>
typedef _ItemProxy SdfListProxy< _TypePolicy >::reference

Definition at line 213 of file listProxy.h.

template<class _TypePolicy>
typedef hboost::reverse_iterator<iterator> SdfListProxy< _TypePolicy >::reverse_iterator

Definition at line 216 of file listProxy.h.

template<class _TypePolicy>
typedef SdfListProxy<TypePolicy> SdfListProxy< _TypePolicy >::This

Definition at line 59 of file listProxy.h.

template<class _TypePolicy>
typedef _TypePolicy SdfListProxy< _TypePolicy >::TypePolicy

Definition at line 58 of file listProxy.h.

template<class _TypePolicy>
typedef TypePolicy::value_type SdfListProxy< _TypePolicy >::value_type

Definition at line 60 of file listProxy.h.

template<class _TypePolicy>
typedef std::vector<value_type> SdfListProxy< _TypePolicy >::value_vector_type

Definition at line 61 of file listProxy.h.

Constructor & Destructor Documentation

template<class _TypePolicy>
SdfListProxy< _TypePolicy >::SdfListProxy ( SdfListOpType  op)
inline

Creates a default list proxy object for list operation vector specified op. This object evaluates to false in a boolean context and all operations on this object have no effect.

Definition at line 222 of file listProxy.h.

template<class _TypePolicy>
SdfListProxy< _TypePolicy >::SdfListProxy ( const std::shared_ptr< Sdf_ListEditor< TypePolicy > > &  editor,
SdfListOpType  op 
)
inline

Create a new proxy wrapping the list operation vector specified by op in the underlying listEditor.

Definition at line 229 of file listProxy.h.

Member Function Documentation

template<class _TypePolicy>
void SdfListProxy< _TypePolicy >::ApplyEditsToList ( value_vector_type vec)
inline

Apply the edits in this list to the given vec.

Definition at line 572 of file listProxy.h.

template<class _TypePolicy>
void SdfListProxy< _TypePolicy >::ApplyList ( const SdfListProxy< _TypePolicy > &  list)
inline

Applies the edits in the given list to this one.

Definition at line 564 of file listProxy.h.

template<class _TypePolicy>
reference SdfListProxy< _TypePolicy >::back ( void  )
inline

Return a reference to the item at the back of the sequence.

Definition at line 299 of file listProxy.h.

template<class _TypePolicy>
value_type SdfListProxy< _TypePolicy >::back ( void  ) const
inline

Return a copy of the item at the back of the sequence.

Definition at line 309 of file listProxy.h.

template<class _TypePolicy>
iterator SdfListProxy< _TypePolicy >::begin ( void  )
inline

Return an iterator to the start of the sequence.

Definition at line 237 of file listProxy.h.

template<class _TypePolicy>
const_iterator SdfListProxy< _TypePolicy >::begin ( void  ) const
inline

Return a const iterator to the start of the sequence.

Definition at line 255 of file listProxy.h.

template<class _TypePolicy>
void SdfListProxy< _TypePolicy >::clear ( void  )
inline

Clear the contents of the sequence.

Definition at line 347 of file listProxy.h.

template<class _TypePolicy>
size_t SdfListProxy< _TypePolicy >::Count ( const value_type value) const
inline

Definition at line 514 of file listProxy.h.

template<class _TypePolicy>
bool SdfListProxy< _TypePolicy >::empty ( void  ) const
inline

Return true if size() == 0.

Definition at line 279 of file listProxy.h.

template<class _TypePolicy>
iterator SdfListProxy< _TypePolicy >::end ( void  )
inline

Return an iterator to the end of the sequence.

Definition at line 241 of file listProxy.h.

template<class _TypePolicy>
const_iterator SdfListProxy< _TypePolicy >::end ( void  ) const
inline

Return a const iterator to the end of the sequence.

Definition at line 259 of file listProxy.h.

template<class _TypePolicy>
void SdfListProxy< _TypePolicy >::erase ( iterator  pos)
inline

Erase the element at pos.

Definition at line 337 of file listProxy.h.

template<class _TypePolicy>
void SdfListProxy< _TypePolicy >::erase ( iterator  f,
iterator  l 
)
inline

Erase all the elements in the range [f, l).

Definition at line 342 of file listProxy.h.

template<class _TypePolicy>
void SdfListProxy< _TypePolicy >::Erase ( size_t  index)
inline

Definition at line 558 of file listProxy.h.

template<class _TypePolicy>
size_t SdfListProxy< _TypePolicy >::Find ( const value_type value) const
inline

Definition at line 519 of file listProxy.h.

template<class _TypePolicy>
reference SdfListProxy< _TypePolicy >::front ( void  )
inline

Return a reference to the item at the front of the sequence.

Definition at line 294 of file listProxy.h.

template<class _TypePolicy>
value_type SdfListProxy< _TypePolicy >::front ( void  ) const
inline

Return a copy of the item at the front of the sequence.

Definition at line 304 of file listProxy.h.

template<class _TypePolicy>
SdfLayerHandle SdfListProxy< _TypePolicy >::GetLayer ( ) const
inline

Returns the layer that this list editor belongs to.

Definition at line 497 of file listProxy.h.

template<class _TypePolicy>
SdfPath SdfListProxy< _TypePolicy >::GetPath ( ) const
inline

Returns the path to this list editor's value.

Definition at line 503 of file listProxy.h.

template<class _TypePolicy>
iterator SdfListProxy< _TypePolicy >::insert ( iterator  pos,
const value_type x 
)
inline

Insert x into this sequence at position pos.

Definition at line 324 of file listProxy.h.

template<class _TypePolicy>
template<class InputIterator >
void SdfListProxy< _TypePolicy >::insert ( iterator  pos,
InputIterator  f,
InputIterator  l 
)
inline

Insert copies of the elements in [f, l) into this sequence starting at position pos.

Definition at line 332 of file listProxy.h.

template<class _TypePolicy>
void SdfListProxy< _TypePolicy >::Insert ( int  index,
const value_type value 
)
inline

Definition at line 524 of file listProxy.h.

template<class _TypePolicy>
bool SdfListProxy< _TypePolicy >::IsExpired ( ) const
inline

Returns true if the list editor is expired.

Definition at line 509 of file listProxy.h.

template<class _TypePolicy>
template<class CB >
void SdfListProxy< _TypePolicy >::ModifyItemEdits ( CB  callback)
inline

Modify all edits in this list.

callback must be a callable that accepts an argument of type value_type and returns a hboost::optional<value_type>.

callback is called with every item in the list. If an invalid hboost::optional is returned, the item is removed. Otherwise it's replaced with the returned item. If a returned item matches an item that was previously returned, the returned item will be removed.

Definition at line 590 of file listProxy.h.

template<class _TypePolicy>
SdfListProxy< _TypePolicy >::operator bool ( ) const
inlineexplicit

Explicit bool conversion operator. The list proxy object converts to true if the list editor is valid, false otherwise.

Definition at line 489 of file listProxy.h.

template<class _TypePolicy>
SdfListProxy< _TypePolicy >::operator value_vector_type ( ) const
inline

Produce a copy of the contents of this sequence into a vector.

Definition at line 366 of file listProxy.h.

template<class _TypePolicy>
template<class T2 >
bool SdfListProxy< _TypePolicy >::operator!= ( const SdfListProxy< T2 > &  y) const
inline

Inequality comparison.

Definition at line 399 of file listProxy.h.

template<class _TypePolicy>
bool SdfListProxy< _TypePolicy >::operator!= ( const value_vector_type y) const
inline

Inequality comparison.

Definition at line 438 of file listProxy.h.

template<class _TypePolicy>
template<class T2 >
bool SdfListProxy< _TypePolicy >::operator< ( const SdfListProxy< T2 > &  y) const
inline

Less-than comparison.

Definition at line 405 of file listProxy.h.

template<class _TypePolicy>
bool SdfListProxy< _TypePolicy >::operator< ( const value_vector_type y) const
inline

Less-than comparison.

Definition at line 448 of file listProxy.h.

template<class _TypePolicy>
template<class T2 >
bool SdfListProxy< _TypePolicy >::operator<= ( const SdfListProxy< T2 > &  y) const
inline

Less-than-or-equal comparison.

Definition at line 411 of file listProxy.h.

template<class _TypePolicy>
bool SdfListProxy< _TypePolicy >::operator<= ( const value_vector_type y) const
inline

Less-than or equal to comparison.

Definition at line 468 of file listProxy.h.

template<class _TypePolicy>
template<class T2 >
This& SdfListProxy< _TypePolicy >::operator= ( const SdfListProxy< T2 > &  other)
inline

Replace all elements in this sequence with the elements in the other sequence.

Definition at line 373 of file listProxy.h.

template<class _TypePolicy>
This& SdfListProxy< _TypePolicy >::operator= ( const value_vector_type other)
inline

Replace all elements in this sequence with the given vector.

Definition at line 379 of file listProxy.h.

template<class _TypePolicy>
template<class Y >
This& SdfListProxy< _TypePolicy >::operator= ( const std::vector< Y > &  v)
inline

Replace all elements in this sequence with the given vector.

Definition at line 386 of file listProxy.h.

template<class _TypePolicy>
template<class T2 >
bool SdfListProxy< _TypePolicy >::operator== ( const SdfListProxy< T2 > &  y) const
inline

Equality comparison.

Definition at line 393 of file listProxy.h.

template<class _TypePolicy>
bool SdfListProxy< _TypePolicy >::operator== ( const value_vector_type y) const
inline

Equality comparison.

Definition at line 428 of file listProxy.h.

template<class _TypePolicy>
template<class T2 >
bool SdfListProxy< _TypePolicy >::operator> ( const SdfListProxy< T2 > &  y) const
inline

Greater-than comparison.

Definition at line 417 of file listProxy.h.

template<class _TypePolicy>
bool SdfListProxy< _TypePolicy >::operator> ( const value_vector_type y) const
inline

Greater-than comparison.

Definition at line 458 of file listProxy.h.

template<class _TypePolicy>
template<class T2 >
bool SdfListProxy< _TypePolicy >::operator>= ( const SdfListProxy< T2 > &  y) const
inline

Greater-than-or-equal comparison.

Definition at line 423 of file listProxy.h.

template<class _TypePolicy>
bool SdfListProxy< _TypePolicy >::operator>= ( const value_vector_type y) const
inline

Greater-than or equal to comparison.

Definition at line 478 of file listProxy.h.

template<class _TypePolicy>
reference SdfListProxy< _TypePolicy >::operator[] ( size_t  n)
inline

Return a reference to the item at index n.

Definition at line 284 of file listProxy.h.

template<class _TypePolicy>
value_type SdfListProxy< _TypePolicy >::operator[] ( size_t  n) const
inline

Return a copy of the item at index n.

Definition at line 289 of file listProxy.h.

template<class _TypePolicy>
void SdfListProxy< _TypePolicy >::pop_back ( )
inline

Remove the last element from this sequence.

Definition at line 319 of file listProxy.h.

template<class _TypePolicy>
void SdfListProxy< _TypePolicy >::push_back ( const value_type elem)
inline

Append elem to this sequence.

Definition at line 314 of file listProxy.h.

template<class _TypePolicy>
reverse_iterator SdfListProxy< _TypePolicy >::rbegin ( )
inline

Return a reverse iterator to the last item of the sequence.

Definition at line 246 of file listProxy.h.

template<class _TypePolicy>
const_reverse_iterator SdfListProxy< _TypePolicy >::rbegin ( ) const
inline

Return a const reverse iterator to the last item of the sequence.

Definition at line 264 of file listProxy.h.

template<class _TypePolicy>
void SdfListProxy< _TypePolicy >::Remove ( const value_type value)
inline

Definition at line 532 of file listProxy.h.

template<class _TypePolicy>
reverse_iterator SdfListProxy< _TypePolicy >::rend ( )
inline

Return a reverse iterator past the start item of the sequence.

Definition at line 250 of file listProxy.h.

template<class _TypePolicy>
const_reverse_iterator SdfListProxy< _TypePolicy >::rend ( ) const
inline

Return a const reverse iterator past the start item of the sequence.

Definition at line 269 of file listProxy.h.

template<class _TypePolicy>
void SdfListProxy< _TypePolicy >::Replace ( const value_type oldValue,
const value_type newValue 
)
inline

Definition at line 545 of file listProxy.h.

template<class _TypePolicy>
void SdfListProxy< _TypePolicy >::resize ( size_t  n,
const value_type t = value_type() 
)
inline

Resize the contents of the sequence.

Inserts or erases copies of t at the end such that the size becomes n.

Definition at line 355 of file listProxy.h.

template<class _TypePolicy>
size_t SdfListProxy< _TypePolicy >::size ( void  ) const
inline

Return the size of the sequence.

Definition at line 274 of file listProxy.h.

Friends And Related Function Documentation

template<class _TypePolicy>
friend class _ConstGetHelper
friend

Definition at line 136 of file listProxy.h.

template<class _TypePolicy>
friend class _GetHelper
friend

Definition at line 135 of file listProxy.h.

template<class _TypePolicy>
friend class _ItemProxy
friend

Definition at line 117 of file listProxy.h.

template<class _TypePolicy>
bool operator!= ( const value_vector_type x,
const SdfListProxy< _TypePolicy > &  y 
)
friend

Inequality comparision.

Definition at line 443 of file listProxy.h.

template<class _TypePolicy>
bool operator< ( const value_vector_type x,
const SdfListProxy< _TypePolicy > &  y 
)
friend

Less-than comparison.

Definition at line 453 of file listProxy.h.

template<class _TypePolicy>
bool operator<= ( const value_vector_type x,
const SdfListProxy< _TypePolicy > &  y 
)
friend

Less-than or equal to comparison.

Definition at line 473 of file listProxy.h.

template<class _TypePolicy>
bool operator== ( const value_vector_type x,
const SdfListProxy< _TypePolicy > &  y 
)
friend

Equality comparision.

Definition at line 433 of file listProxy.h.

template<class _TypePolicy>
bool operator> ( const value_vector_type x,
const SdfListProxy< _TypePolicy > &  y 
)
friend

Greater-than comparison.

Definition at line 463 of file listProxy.h.

template<class _TypePolicy>
bool operator>= ( const value_vector_type x,
const SdfListProxy< _TypePolicy > &  y 
)
friend

Greater-than or equal to comparison.

Definition at line 483 of file listProxy.h.

template<class _TypePolicy>
template<class >
friend class SdfPyWrapListProxy
friend

Definition at line 683 of file listProxy.h.


The documentation for this class was generated from the following file: