24 #ifndef PXR_USD_SDF_MAP_EDITOR_H
25 #define PXR_USD_SDF_MAP_EDITOR_H
31 #include <boost/noncopyable.hpp>
32 #include <boost/shared_ptr.hpp>
36 PXR_NAMESPACE_OPEN_SCOPE
44 template <
class MapType>
47 typedef typename MapType::key_type key_type;
48 typedef typename MapType::mapped_type mapped_type;
49 typedef typename MapType::value_type value_type;
50 typedef typename MapType::iterator iterator;
52 virtual ~Sdf_MapEditor();
56 virtual std::string GetLocation()
const = 0;
59 virtual SdfSpecHandle GetOwner()
const = 0;
62 virtual bool IsExpired()
const = 0;
65 virtual const MapType* GetData()
const = 0;
71 virtual MapType* GetData() = 0;
76 virtual void Copy(
const MapType& other) = 0;
77 virtual void Set(
const key_type& key,
const mapped_type& other) = 0;
78 virtual std::pair<iterator, bool> Insert(
const value_type& value) = 0;
79 virtual bool Erase(
const key_type& key) = 0;
81 virtual SdfAllowed IsValidKey(
const key_type& key)
const = 0;
82 virtual SdfAllowed IsValidValue(
const mapped_type& value)
const = 0;
92 boost::shared_ptr<Sdf_MapEditor<T> >
93 Sdf_CreateMapEditor(
const SdfSpecHandle& owner,
const TfToken& field);
95 PXR_NAMESPACE_CLOSE_SCOPE
97 #endif // PXR_USD_SDF_MAP_EDITOR_H
Token for efficient comparison, assignment, and hashing of known strings.
Indicates if an operation is allowed and, if not, why not.