summaryrefslogtreecommitdiff
path: root/src/MXF.h
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2013-07-02 05:51:18 +0000
committerjhurst <>2013-07-02 05:51:18 +0000
commit0cc43cc3765c003d60196ff45213c2835281a0c3 (patch)
tree9e80d263f63dc09c5184943f8adb97ab562368bd /src/MXF.h
parentf2ecb6822ff3db70b40adb19a37eab6456e28ed8 (diff)
more optional stuff
Diffstat (limited to 'src/MXF.h')
-rwxr-xr-xsrc/MXF.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/MXF.h b/src/MXF.h
index cf28379..dc06c7f 100755
--- a/src/MXF.h
+++ b/src/MXF.h
@@ -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