odtone::mih::bitmap
// In header: </home/carlos/Projectos/odtone/inc/odtone/mih/types/base.hpp> template<size_t N, typename EnumT> class bitmap { public: // construct/copy/destruct bitmap(); // private member functions ODTONE_STATIC_ASSERT(!, "N must be a multiple of 8"); // public member functions void clear(); void clear(EnumT); void set(EnumT); bool get(EnumT) const; void merge(bitmap); void common(bitmap); void except(bitmap); void full(); bool operator==(const bitmap &) const; template<typename ArchiveT> void serialize(ArchiveT &); };
BITMAP data type.
Note | |
---|---|
N must be a multiple of 8. |
bitmap
public member functionsvoid clear();
Clear the BITMAP data type.
void clear(EnumT pos);
Clear the position.
Parameters: |
|
void set(EnumT pos);
Set the position.
Parameters: |
|
bool get(EnumT pos) const;
Get the position value.
Parameters: |
|
void merge(bitmap b);
Merge the value of the bitmap with another BITMAP data type.
Note | |
---|---|
Both bitmaps must have the same size |
Parameters: |
|
void common(bitmap b);
Set the common values between the BITMAP and another BITMAP data type.
Note | |
---|---|
Both bitmaps must have the same size |
Parameters: |
|
void except(bitmap b);
Clear the values of the bitmap, if they are set on the given BITMAP.
Note | |
---|---|
Both bitmaps must have the same size |
Parameters: |
|
void full();
Set all poisition of the BITMAP data type.
bool operator==(const bitmap & bit) const;
Check if the two bitmaps are equal.
Note | |
---|---|
Both bitmaps must have the same size |
Parameters: |
|
template<typename ArchiveT> void serialize(ArchiveT & ar);
Serialize/deserialize the BITMAP data type.
Parameters: |
|