Commit 129298f6 authored by David Bommes's avatar David Bommes

added | and |= operator for UpdateType

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@9514 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d050bf08
......@@ -37,6 +37,22 @@ bool UpdateType::operator==(const UpdateType& _type) const {
return ((type_ & _type.type_).any());
};
UpdateType
UpdateType::operator|(const UpdateType& _type) const
{
return (type_ | _type.type_);
}
UpdateType&
UpdateType::operator|=(const UpdateType& _type)
{
type_ |= _type.type_;
return(*this);
}
/// Check if this update contains the given UpdateType
bool UpdateType::contains( const UpdateType& _type ) const {
......@@ -203,4 +219,4 @@ QString updateTypeName(UpdateType _id) {
/// Return the number of registered types
uint updateTypeCount() {
return updateTypes.size();
}
\ No newline at end of file
}
......@@ -16,6 +16,10 @@ class DLLEXPORT UpdateType {
/// Exact compare operator
bool operator==(const UpdateType& _type) const;
UpdateType operator|(const UpdateType& _type) const;
UpdateType& operator|=(const UpdateType& _type);
UpdateType& operator++();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment