HDK
|
#include <listEditor.h>
Public Types | |
typedef TypePolicy::value_type | value_type |
typedef std::vector< value_type > | value_vector_type |
typedef std::function < std::optional< value_type > const value_type &) > | ModifyCallback |
typedef std::function < std::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 50 of file listEditor.h.
typedef std::function< std::optional<value_type>SdfListOpType, const value_type&) > Sdf_ListEditor< TypePolicy >::ApplyCallback |
Definition at line 136 of file listEditor.h.
typedef std::function< std::optional<value_type>const value_type&) > Sdf_ListEditor< TypePolicy >::ModifyCallback |
Definition at line 123 of file listEditor.h.
typedef TypePolicy::value_type Sdf_ListEditor< TypePolicy >::value_type |
Definition at line 58 of file listEditor.h.
typedef std::vector<value_type> Sdf_ListEditor< TypePolicy >::value_vector_type |
Definition at line 59 of file listEditor.h.
|
virtualdefault |
|
inlineprotected |
Definition at line 199 of file listEditor.h.
|
inlineprotected |
Definition at line 203 of file listEditor.h.
|
inlineprotected |
Definition at line 216 of file listEditor.h.
|
protectedpure virtual |
|
inlineprotected |
Definition at line 211 of file listEditor.h.
|
inlineprotected |
Definition at line 221 of file listEditor.h.
|
inlineprotectedvirtual |
Definition at line 288 of file listEditor.h.
|
inlineprotectedvirtual |
Definition at line 226 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 169 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 177 of file listEditor.h.
|
inline |
Returns the i'th
value in the specified list of operations.
Definition at line 156 of file listEditor.h.
|
inline |
Definition at line 63 of file listEditor.h.
|
inline |
Definition at line 68 of file listEditor.h.
|
inline |
Returns the number of elements in the specified list of operations.
Definition at line 150 of file listEditor.h.
|
inline |
Returns the specified list of operations.
Definition at line 162 of file listEditor.h.
|
inline |
Definition at line 83 of file listEditor.h.
|
inline |
Definition at line 78 of file listEditor.h.
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 73 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 103 of file listEditor.h.
|
pure virtual |
Replaces the operations in the specified list of operations in range [index, index + n) with the given elems
.