ICF 3.1.1.10
Technical documentation of ICF Libraries
istd::CFastBinaryIndex Class Reference

#include <CFastBinaryIndex.h>

Collaboration diagram for istd::CFastBinaryIndex:

Classes

class  iterator
 

Public Types

enum  { MAX_ELEMENTS_COUNT = 31 }
 
typedef int IndexType
 

Public Member Functions

 CFastBinaryIndex ()
 Default constructor without member initialization.
 
 CFastBinaryIndex (int size, int value=0)
 Constructor initializing all member to specified value.
 
 CFastBinaryIndex (quint32 bits, int size, int dummy)
 Constructor initializing all internal members.
 
 CFastBinaryIndex (const CFastBinaryIndex &index)
 Copy constructor.
 
bool IsValid () const
 Check if this index is valid.
 
bool IsZero () const
 Check if this index point at zero element.
 
void Reset ()
 Reset this object.
 
void Clear ()
 Set all components to 0 (false).
 
bool IsDimensionsCountFixed () const
 Check, if number dimensions is fixed.
 
int GetDimensionsCount () const
 Get number of dimensions of this index.
 
bool SetDimensionsCount (int count)
 Set number of dimensions of this index.
 
int GetAt (int index) const
 Get element stored at specified index.
 
void SetAt (int index, int value)
 Set element at specified index.
 
quint32 GetBits () const
 Get bit coded value of this index.
 
void SetAllTo (int value)
 Set all components to specified value.
 
bool IncreaseAt (int index)
 Increase single component at specified position.
 
bool DecreaseAt (int index)
 Decrease single component at specified position.
 
int GetProductVolume () const
 Get total number of elements if this index is treated as size.
 
bool IsInside (const CFastBinaryIndex &boundaries) const
 Check if index is inside boundaries.
 
bool Increase (const CFastBinaryIndex &boundaries)
 Increase this index inside the boundaries.
 
bool Decrease (const CFastBinaryIndex &boundaries)
 Decrese this index inside the boundaries.
 
iterator Begin () const
 Get begin value of element access iterator.
 
iterator End () const
 Get end value of element access iterator.
 
int operator[] (int index) const
 
bool operator== (const CFastBinaryIndex &index) const
 
bool operator!= (const CFastBinaryIndex &index) const
 

Detailed Description

Definition at line 17 of file CFastBinaryIndex.h.

Member Typedef Documentation

◆ IndexType

Definition at line 20 of file CFastBinaryIndex.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_ELEMENTS_COUNT 

Definition at line 22 of file CFastBinaryIndex.h.

Constructor & Destructor Documentation

◆ CFastBinaryIndex() [1/4]

istd::CFastBinaryIndex::CFastBinaryIndex ( )
inline

Default constructor without member initialization.

Definition at line 197 of file CFastBinaryIndex.h.

◆ CFastBinaryIndex() [2/4]

istd::CFastBinaryIndex::CFastBinaryIndex ( int size,
int value = 0 )
inlineexplicit

Constructor initializing all member to specified value.

Definition at line 203 of file CFastBinaryIndex.h.

References SetAllTo().

◆ CFastBinaryIndex() [3/4]

istd::CFastBinaryIndex::CFastBinaryIndex ( quint32 bits,
int size,
int dummy )
inlineexplicit

Constructor initializing all internal members.

Parameters
bitsbit coded value of this index. The index of higher set bit must be smaller than 'size' value.
sizenumber of components of index.
dummynot used parameter using to distinguish between this constructor and the previous one.

Definition at line 211 of file CFastBinaryIndex.h.

References istd::CBitManip::instance.

◆ CFastBinaryIndex() [4/4]

istd::CFastBinaryIndex::CFastBinaryIndex ( const CFastBinaryIndex & index)
inline

Copy constructor.

Definition at line 218 of file CFastBinaryIndex.h.

References MAX_ELEMENTS_COUNT.

Member Function Documentation

◆ Begin()

CFastBinaryIndex::iterator istd::CFastBinaryIndex::Begin ( ) const
inline

Get begin value of element access iterator.

Please refer to general description of ICF iterators, STL iterators or Qt iterators concept.

Definition at line 371 of file CFastBinaryIndex.h.

◆ Clear()

void istd::CFastBinaryIndex::Clear ( )
inline

Set all components to 0 (false).

Definition at line 245 of file CFastBinaryIndex.h.

◆ Decrease()

bool istd::CFastBinaryIndex::Decrease ( const CFastBinaryIndex & boundaries)
inline

Decrese this index inside the boundaries.

Returns
in this implementation always false.

Definition at line 359 of file CFastBinaryIndex.h.

◆ DecreaseAt()

bool istd::CFastBinaryIndex::DecreaseAt ( int index)
inline

Decrease single component at specified position.

Parameters
indexindex of component should be increased. It must be valid.
Returns
true if bit at index was enabled and it was possible to realize increasing.

Definition at line 332 of file CFastBinaryIndex.h.

◆ End()

CFastBinaryIndex::iterator istd::CFastBinaryIndex::End ( ) const
inline

Get end value of element access iterator.

Please refer to general description of ICF iterators, STL iterators or Qt iterators concept.

Definition at line 377 of file CFastBinaryIndex.h.

◆ GetAt()

int istd::CFastBinaryIndex::GetAt ( int index) const
inline

Get element stored at specified index.

Definition at line 277 of file CFastBinaryIndex.h.

Referenced by operator[]().

◆ GetBits()

quint32 istd::CFastBinaryIndex::GetBits ( ) const
inline

Get bit coded value of this index.

Definition at line 300 of file CFastBinaryIndex.h.

◆ GetDimensionsCount()

int istd::CFastBinaryIndex::GetDimensionsCount ( ) const
inline

Get number of dimensions of this index.

Definition at line 258 of file CFastBinaryIndex.h.

◆ GetProductVolume()

int istd::CFastBinaryIndex::GetProductVolume ( ) const
inline

Get total number of elements if this index is treated as size.

Returns
multiplication of all elements.

Definition at line 365 of file CFastBinaryIndex.h.

◆ Increase()

bool istd::CFastBinaryIndex::Increase ( const CFastBinaryIndex & boundaries)
inline

Increase this index inside the boundaries.

Returns
in this implementation always false.

Definition at line 353 of file CFastBinaryIndex.h.

◆ IncreaseAt()

bool istd::CFastBinaryIndex::IncreaseAt ( int index)
inline

Increase single component at specified position.

Parameters
indexindex of component should be increased. It must be valid.
Returns
true if bit at index was disabled and it was possible to realize increasing.

Definition at line 317 of file CFastBinaryIndex.h.

◆ IsDimensionsCountFixed()

bool istd::CFastBinaryIndex::IsDimensionsCountFixed ( ) const
inline

Check, if number dimensions is fixed.

It is provided for template implementations. It returns always true.

Definition at line 252 of file CFastBinaryIndex.h.

◆ IsInside()

bool istd::CFastBinaryIndex::IsInside ( const CFastBinaryIndex & boundaries) const
inline

Check if index is inside boundaries.

Index is inside boundaries, if all its components are smaller than according boundary components.

Definition at line 347 of file CFastBinaryIndex.h.

◆ IsValid()

bool istd::CFastBinaryIndex::IsValid ( ) const
inline

Check if this index is valid.

Index is valid, if all its components are bigger or equal 0. This method is provided for template compatibility with other imlementations. It returns always true.

Definition at line 226 of file CFastBinaryIndex.h.

◆ IsZero()

bool istd::CFastBinaryIndex::IsZero ( ) const
inline

Check if this index point at zero element.

In other words, it checks if all components are 0.

Definition at line 232 of file CFastBinaryIndex.h.

◆ operator!=()

bool istd::CFastBinaryIndex::operator!= ( const CFastBinaryIndex & index) const
inline

Definition at line 395 of file CFastBinaryIndex.h.

◆ operator==()

bool istd::CFastBinaryIndex::operator== ( const CFastBinaryIndex & index) const
inline

Definition at line 389 of file CFastBinaryIndex.h.

◆ operator[]()

int istd::CFastBinaryIndex::operator[] ( int index) const
inline

Definition at line 383 of file CFastBinaryIndex.h.

References GetAt().

◆ Reset()

void istd::CFastBinaryIndex::Reset ( )
inline

Reset this object.

For this implementation, it does the same as clear.

See also
Clear()

Definition at line 238 of file CFastBinaryIndex.h.

◆ SetAllTo()

void istd::CFastBinaryIndex::SetAllTo ( int value)
inline

Set all components to specified value.

Definition at line 306 of file CFastBinaryIndex.h.

Referenced by CFastBinaryIndex().

◆ SetAt()

void istd::CFastBinaryIndex::SetAt ( int index,
int value )
inline

Set element at specified index.

Definition at line 286 of file CFastBinaryIndex.h.

◆ SetDimensionsCount()

bool istd::CFastBinaryIndex::SetDimensionsCount ( int count)
inline

Set number of dimensions of this index.

It is provided to allows template implementations to use fixed-size or variable arrays.

Parameters
countnumber of dimensions will be set.
Returns
true, if number of set dimensions equals template parameter or false if isn't.

Definition at line 264 of file CFastBinaryIndex.h.

References MAX_ELEMENTS_COUNT.


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

© Witold Gantzke and Kirill Lepskiy