diff options
| author | jhurst <jhurst@cinecert.com> | 2013-07-02 05:51:18 +0000 |
|---|---|---|
| committer | jhurst <> | 2013-07-02 05:51:18 +0000 |
| commit | 0cc43cc3765c003d60196ff45213c2835281a0c3 (patch) | |
| tree | 9e80d263f63dc09c5184943f8adb97ab562368bd /src/MXF.h | |
| parent | f2ecb6822ff3db70b40adb19a37eab6456e28ed8 (diff) | |
more optional stuff
Diffstat (limited to 'src/MXF.h')
| -rwxr-xr-x | src/MXF.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -229,12 +229,15 @@ namespace ASDCP optional_property() : m_has_value(false) {} optional_property(const PropertyType& value) : m_property(value), m_has_value(false) {} const optional_property<PropertyType>& operator=(const PropertyType& rhs) { this->m_property = rhs; this->m_has_value = true; return *this; } + bool operator==(const PropertyType& rhs) const { return this->m_property == rhs; } + bool operator==(const optional_property<PropertyType>& rhs) const { return this->m_property == rhs.m_property; } operator PropertyType&() { return this->m_property; } void set(const PropertyType& rhs) { this->m_property = rhs; this->m_has_value = true; } void set_has_value(bool has_value = true) { this->m_has_value = has_value; } void reset(const PropertyType& rhs) { this->m_has_value = false; } bool empty() const { return ! m_has_value; } PropertyType& get() { return m_property; } + const PropertyType& cget() const { return m_property; } }; // base class of all metadata objects |
