'ODTONE - Open Dot Twenty One'

PrevUpHomeNext

Class template bitmap

odtone::mih::bitmap

Synopsis

// 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 &);
};

Description

BITMAP data type.

[Note] Note

N must be a multiple of 8.

bitmap public construct/copy/destruct

  1. bitmap();

    Contruct an empty BITMAP data type.

bitmap private member functions

  1.  ODTONE_STATIC_ASSERT(!, "N must be a multiple of 8");

bitmap public member functions

  1. void clear();

    Clear the BITMAP data type.

  2. void clear(EnumT pos);

    Clear the position.

    Parameters:

    pos

    The position on the bitmap to clear.

  3. void set(EnumT pos);

    Set the position.

    Parameters:

    pos

    The position on the bitmap to set.

  4. bool get(EnumT pos) const;

    Get the position value.

    Parameters:

    pos

    The position on the bitmap to get.

  5. void merge(bitmap b);

    Merge the value of the bitmap with another BITMAP data type.

    [Note] Note

    Both bitmaps must have the same size

    Parameters:

    b

    The BITMAP data type to merge with.

  6. void common(bitmap b);

    Set the common values between the BITMAP and another BITMAP data type.

    [Note] Note

    Both bitmaps must have the same size

    Parameters:

    b

    The BITMAP data type to compare with.

  7. void except(bitmap b);

    Clear the values of the bitmap, if they are set on the given BITMAP.

    [Note] Note

    Both bitmaps must have the same size

    Parameters:

    b

    The BITMAP data type with the values to clear.

  8. void full();

    Set all poisition of the BITMAP data type.

  9. bool operator==(const bitmap & bit) const;

    Check if the two bitmaps are equal.

    [Note] Note

    Both bitmaps must have the same size

    Parameters:

    bit

    The BITMAP data type to compare with.

  10. template<typename ArchiveT> void serialize(ArchiveT & ar);

    Serialize/deserialize the BITMAP data type.

    Parameters:

    ar

    The archive to/from where serialize/deserialize the data type.


PrevUpHomeNext