33
44#pragma once
55
6+ #include " opentimelineio/export.h"
67#include " opentimelineio/version.h"
78
89#include < any>
@@ -24,13 +25,13 @@ namespace opentimelineio { namespace OPENTIMELINEIO_VERSION {
2425// / This allows us to hand out iterators that can be aware of mutation and moves
2526// / and take steps to safe-guard themselves from causing a crash. (Yes, I'm
2627// / talking to you, Python...)
27- class AnyDictionary : private std ::map<std::string, std::any>
28+ class OTIO_API AnyDictionary : private std::map<std::string, std::any>
2829{
2930public:
3031 using map::map;
3132
3233 // / @brief Create an empty dictionary.
33- AnyDictionary ()
34+ OTIO_API AnyDictionary ()
3435 : map{}
3536 , _mutation_stamp{}
3637 {}
@@ -39,13 +40,13 @@ class AnyDictionary : private std::map<std::string, std::any>
3940 // /
4041 // / To be safe, avoid brace-initialization so as to not trigger
4142 // / list initialization behavior in older compilers:
42- AnyDictionary (const AnyDictionary& other)
43+ OTIO_API AnyDictionary (const AnyDictionary& other)
4344 : map(other)
4445 , _mutation_stamp{}
4546 {}
4647
4748 // / @brief Destructor.
48- ~AnyDictionary ()
49+ OTIO_API ~AnyDictionary ()
4950 {
5051 if (_mutation_stamp)
5152 {
@@ -55,15 +56,15 @@ class AnyDictionary : private std::map<std::string, std::any>
5556 }
5657
5758 // / @brief Copy operator.
58- AnyDictionary& operator =(const AnyDictionary& other)
59+ OTIO_API AnyDictionary& operator =(const AnyDictionary& other)
5960 {
6061 mutate ();
6162 map::operator =(other);
6263 return *this ;
6364 }
6465
6566 // / @brief Move operator.
66- AnyDictionary& operator =(AnyDictionary&& other)
67+ OTIO_API AnyDictionary& operator =(AnyDictionary&& other)
6768 {
6869 mutate ();
6970 other.mutate ();
@@ -72,7 +73,7 @@ class AnyDictionary : private std::map<std::string, std::any>
7273 }
7374
7475 // / @brief Copy operator.
75- AnyDictionary& operator =(std::initializer_list<value_type> ilist)
76+ OTIO_API AnyDictionary& operator =(std::initializer_list<value_type> ilist)
7677 {
7778 mutate ();
7879 map::operator =(ilist);
@@ -94,7 +95,7 @@ class AnyDictionary : private std::map<std::string, std::any>
9495 using map::rend;
9596
9697 // / @brief Clear the dictionary.
97- void clear () noexcept
98+ OTIO_API void clear () noexcept
9899 {
99100 mutate ();
100101 map::clear ();
@@ -104,28 +105,28 @@ class AnyDictionary : private std::map<std::string, std::any>
104105 using map::insert;
105106
106107 // / @brief Erase an item.
107- iterator erase (const_iterator pos)
108+ OTIO_API iterator erase (const_iterator pos)
108109 {
109110 mutate ();
110111 return map::erase (pos);
111112 }
112113
113114 // / @brief Erase a range of items.
114- iterator erase (const_iterator first, const_iterator last)
115+ OTIO_API iterator erase (const_iterator first, const_iterator last)
115116 {
116117 mutate ();
117118 return map::erase (first, last);
118119 }
119120
120121 // / @brief Erase an item with the given key.
121- size_type erase (const key_type& key)
122+ OTIO_API size_type erase (const key_type& key)
122123 {
123124 mutate ();
124125 return map::erase (key);
125126 }
126127
127128 // / @brief Swap dictionaries.
128- void swap (AnyDictionary& other)
129+ OTIO_API void swap (AnyDictionary& other)
129130 {
130131 mutate ();
131132 other.mutate ();
0 commit comments