24#ifndef PXR_USD_SDF_MAP_EDITOR_H
25#define PXR_USD_SDF_MAP_EDITOR_H
35PXR_NAMESPACE_OPEN_SCOPE
43template <
class MapType>
46 typedef typename MapType::key_type key_type;
47 typedef typename MapType::mapped_type mapped_type;
48 typedef typename MapType::value_type value_type;
49 typedef typename MapType::iterator iterator;
51 virtual ~Sdf_MapEditor() noexcept;
55 virtual
std::
string GetLocation() const = 0;
58 virtual SdfSpecHandle GetOwner() const = 0;
61 virtual
bool IsExpired() const = 0;
64 virtual const MapType* GetData() const = 0;
70 virtual MapType* GetData() = 0;
75 virtual
void Copy(const MapType& other) = 0;
76 virtual
void Set(const key_type& key, const mapped_type& other) = 0;
77 virtual
std::pair<iterator,
bool> Insert(const value_type& value) = 0;
78 virtual
bool Erase(const key_type& key) = 0;
80 virtual
SdfAllowed IsValidKey(const key_type& key) const = 0;
81 virtual
SdfAllowed IsValidValue(const mapped_type& value) const = 0;
91std::unique_ptr<Sdf_MapEditor<T> >
92Sdf_CreateMapEditor(const SdfSpecHandle& owner, const
TfToken& field);
94PXR_NAMESPACE_CLOSE_SCOPE
Indicates if an operation is allowed and, if not, why not.
Token for efficient comparison, assignment, and hashing of known strings.