foobar2000 SDK  2015-01-14
Public Member Functions | Private Attributes
bit_array_range

#include <bit_array_impl.h>

+ Inheritance diagram for bit_array_range:

Public Member Functions

 bit_array_range (t_size first, t_size count, bool p_state=true)
 
bool get (t_size n) const
 
- Public Member Functions inherited from pfc::bit_array
t_size calc_count (bool val, t_size start, t_size count, t_size count_max=~0) const
 
virtual t_size find (bool val, t_size start, t_ssize count) const
 
t_size find_first (bool val, t_size start, t_size max) const
 
t_size find_next (bool val, t_size previous, t_size max) const
 
bool operator[] (t_size n) const
 

Private Attributes

t_size begin
 
t_size end
 
bool state
 

Additional Inherited Members

- Protected Member Functions inherited from pfc::bit_array
 bit_array ()
 
 ~bit_array ()
 

Detailed Description

Definition at line 49 of file bit_array_impl.h.

Constructor & Destructor Documentation

bit_array_range::bit_array_range ( t_size  first,
t_size  count,
bool  p_state = true 
)
inline

Definition at line 54 of file bit_array_impl.h.

54 : begin(first), end(first+count), state(p_state) {}

Member Function Documentation

bool bit_array_range::get ( t_size  n) const
inlinevirtual

Implements pfc::bit_array.

Definition at line 56 of file bit_array_impl.h.

57  {
58  bool rv = n>=begin && n<end;
59  if (!state) rv = !rv;
60  return rv;
61  }

Field Documentation

t_size bit_array_range::begin
private

Definition at line 51 of file bit_array_impl.h.

t_size bit_array_range::end
private

Definition at line 51 of file bit_array_impl.h.

bool bit_array_range::state
private

Definition at line 52 of file bit_array_impl.h.


The documentation for this class was generated from the following file: