7#ifndef PXR_USD_SDF_MAP_EDITOR_H
8#define PXR_USD_SDF_MAP_EDITOR_H
18PXR_NAMESPACE_OPEN_SCOPE
26template <
class MapType>
29 typedef typename MapType::key_type key_type;
30 typedef typename MapType::mapped_type mapped_type;
31 typedef typename MapType::value_type value_type;
32 typedef typename MapType::iterator iterator;
34 virtual ~Sdf_MapEditor() noexcept;
38 virtual
std::
string GetLocation() const = 0;
41 virtual SdfSpecHandle GetOwner() const = 0;
44 virtual
bool IsExpired() const = 0;
47 virtual const MapType* GetData() const = 0;
53 virtual MapType* GetData() = 0;
58 virtual
void Copy(const MapType& other) = 0;
59 virtual
void Set(const key_type& key, const mapped_type& other) = 0;
60 virtual
std::pair<iterator,
bool> Insert(const value_type& value) = 0;
61 virtual
bool Erase(const key_type& key) = 0;
63 virtual
SdfAllowed IsValidKey(const key_type& key) const = 0;
64 virtual
SdfAllowed IsValidValue(const mapped_type& value) const = 0;
74std::unique_ptr<Sdf_MapEditor<T> >
75Sdf_CreateMapEditor(const SdfSpecHandle& owner, const
TfToken& field);
77PXR_NAMESPACE_CLOSE_SCOPE
Indicates if an operation is allowed and, if not, why not.
Token for efficient comparison, assignment, and hashing of known strings.