foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
bit_array_xor

#include <bit_array_impl.h>

+ Inheritance diagram for bit_array_xor:

Public Member Functions

 bit_array_xor (const bit_array &p_a1, const bit_array &p_a2)
 
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

const bit_arraya1
 
const bit_arraya2
 

Additional Inherited Members

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

Detailed Description

Combines two arrays using the XOR logical operator.
Valid index range is an intersection of valid index ranges of the parameter arrays.

Definition at line 86 of file bit_array_impl.h.

Constructor & Destructor Documentation

bit_array_xor::bit_array_xor ( const bit_array p_a1,
const bit_array p_a2 
)
inline

Definition at line 90 of file bit_array_impl.h.

90 : a1(p_a1), a2(p_a2) {}
const bit_array & a2
const bit_array & a1

Member Function Documentation

bool bit_array_xor::get ( t_size  n) const
inlinevirtual

Implements pfc::bit_array.

Definition at line 91 of file bit_array_impl.h.

92  {
93  bool v1 = a1.get(n), v2 = a2.get(n);
94  return (v1 && !v2) || (!v1 && v2);
95  }
virtual bool get(t_size n) const =0
const bit_array & a2
const bit_array & a1

Field Documentation

const bit_array& bit_array_xor::a1
private

Definition at line 88 of file bit_array_impl.h.

const bit_array & bit_array_xor::a2
private

Definition at line 88 of file bit_array_impl.h.


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