HDK
|
#include <listEditor.h>
Public Types | |
typedef TypePolicy::value_type | value_type |
typedef std::vector< value_type > | value_vector_type |
typedef std::function < hboost::optional< value_type > const value_type &) > | ModifyCallback |
typedef std::function < hboost::optional< value_type > SdfListOpType, const value_type &) > | ApplyCallback |
Public Member Functions | |
virtual | ~Sdf_ListEditor ()=default |
SdfLayerHandle | GetLayer () const |
SdfPath | GetPath () const |
bool | IsValid () const |
bool | IsExpired () const |
bool | HasKeys () const |
virtual bool | IsExplicit () const =0 |
virtual bool | IsOrderedOnly () const =0 |
virtual SdfAllowed | PermissionToEdit (SdfListOpType op) const |
virtual bool | CopyEdits (const Sdf_ListEditor &rhs)=0 |
virtual bool | ClearEdits ()=0 |
virtual bool | ClearEditsAndMakeExplicit ()=0 |
virtual void | ModifyItemEdits (const ModifyCallback &cb)=0 |
virtual void | ApplyEditsToList (value_vector_type *vec, const ApplyCallback &cb=ApplyCallback())=0 |
size_t | GetSize (SdfListOpType op) const |
Returns the number of elements in the specified list of operations. More... | |
value_type | Get (SdfListOpType op, size_t i) const |
Returns the i'th value in the specified list of operations. More... | |
value_vector_type | GetVector (SdfListOpType op) const |
Returns the specified list of operations. More... | |
size_t | Count (SdfListOpType op, const value_type &val) const |
size_t | Find (SdfListOpType op, const value_type &val) const |
virtual bool | ReplaceEdits (SdfListOpType op, size_t index, size_t n, const value_vector_type &elems)=0 |
virtual void | ApplyList (SdfListOpType op, const Sdf_ListEditor &rhs)=0 |
Applies a rhs opinions about a given operation list to this one. More... | |
Protected Member Functions | |
Sdf_ListEditor () | |
Sdf_ListEditor (const SdfSpecHandle &owner, const TfToken &field, const TypePolicy &typePolicy) | |
const SdfSpecHandle & | _GetOwner () const |
const TfToken & | _GetField () const |
const TypePolicy & | _GetTypePolicy () const |
virtual bool | _ValidateEdit (SdfListOpType op, const value_vector_type &oldValues, const value_vector_type &newValues) const |
virtual void | _OnEdit (SdfListOpType op, const value_vector_type &oldValues, const value_vector_type &newValues) const |
virtual const value_vector_type & | _GetOperations (SdfListOpType op) const =0 |
Base class for list editor implementations in which list editing operations are stored in data field(s) associated with an owning spec.
Definition at line 51 of file listEditor.h.
typedef std::function< hboost::optional<value_type>SdfListOpType, const value_type&) > Sdf_ListEditor< TypePolicy >::ApplyCallback |
Definition at line 137 of file listEditor.h.
typedef std::function< hboost::optional<value_type>const value_type&) > Sdf_ListEditor< TypePolicy >::ModifyCallback |
Definition at line 124 of file listEditor.h.
typedef TypePolicy::value_type Sdf_ListEditor< TypePolicy >::value_type |
Definition at line 59 of file listEditor.h.
typedef std::vector<value_type> Sdf_ListEditor< TypePolicy >::value_vector_type |
Definition at line 60 of file listEditor.h.
|
virtualdefault |
|
inlineprotected |
Definition at line 200 of file listEditor.h.
|
inlineprotected |
Definition at line 204 of file listEditor.h.
|
inlineprotected |
Definition at line 217 of file listEditor.h.
|
protectedpure virtual |
|
inlineprotected |
Definition at line 212 of file listEditor.h.
|
inlineprotected |
Definition at line 222 of file listEditor.h.
|
inlineprotectedvirtual |
Definition at line 289 of file listEditor.h.
|
inlineprotectedvirtual |
Definition at line 227 of file listEditor.h.
|
pure virtual |
Apply the list operations represented by this interface to the given vector of values vec
. If callback
is valid then it's called for every key in the editor before applying it to vec
. If the returned key is empty then the key will not be applied. Otherwise the returned key is applied, allowing callbacks to perform key translation. Note that this means list editors can't meaningfully hold the empty key.
|
pure virtual |
Applies a rhs
opinions about a given operation list to this one.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
inline |
Returns the number of occurrences of val
in the specified list of operations.
Definition at line 170 of file listEditor.h.
|
inline |
Returns the index of val
in the specified list of operations, -1 if val
is not found.
Definition at line 178 of file listEditor.h.
|
inline |
Returns the i'th
value in the specified list of operations.
Definition at line 157 of file listEditor.h.
|
inline |
Definition at line 64 of file listEditor.h.
|
inline |
Definition at line 69 of file listEditor.h.
|
inline |
Returns the number of elements in the specified list of operations.
Definition at line 151 of file listEditor.h.
|
inline |
Returns the specified list of operations.
Definition at line 163 of file listEditor.h.
|
inline |
Definition at line 84 of file listEditor.h.
|
inline |
Definition at line 79 of file listEditor.h.
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 74 of file listEditor.h.
|
pure virtual |
Modifies the operations stored in all operation lists. callback
is called for every key. If the returned key is invalid then the key is removed, otherwise it's replaced with the returned key. If the returned key matches a key that was previously returned for the list being processed, the returned key will be removed.
|
inlinevirtual |
Definition at line 104 of file listEditor.h.
|
pure virtual |
Replaces the operations in the specified list of operations in range [index, index + n) with the given elems
.