Predator  [unstable] git snapshot
Public Types | Public Member Functions | Private Types | Private Attributes
IntervalArena< TInt, TFld > Class Template Reference

ad-hoc implementation; wastes memory, performance, and human resources More...

#include <intarena.hh>

Public Types

typedef std::set< TFld > TSet
typedef std::pair< TInt, TInt > key_type
typedef std::pair< key_type, TFld > value_type
typedef std::vector< key_typeTKeySet

Public Member Functions

void add (const key_type &, TFld)
void sub (const key_type &, TFld)
void intersects (TSet &dst, const key_type &key) const
void exactMatch (TSet &dst, const key_type &key) const
void reverseLookup (TKeySet &dst, TFld) const
 return the set of all keys that map to this object
void clear ()
IntervalArenaoperator+= (const value_type &item)
IntervalArenaoperator-= (const value_type &item)

Private Types

typedef std::set< TFld > TLeaf
typedef std::map< TInt, TLeafTLine
typedef std::map< TInt, TLineTCont

Private Attributes

TCont cont_

Detailed Description

template<typename TInt, typename TFld>
class IntervalArena< TInt, TFld >

ad-hoc implementation; wastes memory, performance, and human resources

Definition at line 35 of file intarena.hh.

Member Typedef Documentation

typedef std::pair<TInt, TInt> key_type

Definition at line 40 of file intarena.hh.

typedef std::map< TInt, TLine> TCont
private

Definition at line 48 of file intarena.hh.

typedef std::vector<key_type> TKeySet

Definition at line 43 of file intarena.hh.

typedef std::set<TFld> TLeaf
private

Definition at line 46 of file intarena.hh.

typedef std::map< TInt, TLeaf> TLine
private

Definition at line 47 of file intarena.hh.

typedef std::set<TFld> TSet

Definition at line 37 of file intarena.hh.

typedef std::pair<key_type, TFld> value_type

Definition at line 41 of file intarena.hh.

Member Function Documentation

void add ( const key_type key,
TFld  fld 
)

Definition at line 76 of file intarena.hh.

References CL_BREAK_IF.

Referenced by IntervalArena< TInt, TFld >::operator+=().

void clear ( )
inline

Definition at line 60 of file intarena.hh.

References IntervalArena< TInt, TFld >::cont_.

void exactMatch ( TSet dst,
const key_type key 
) const

Definition at line 251 of file intarena.hh.

void intersects ( TSet dst,
const key_type key 
) const

Definition at line 185 of file intarena.hh.

References CL_BREAK_IF.

IntervalArena& operator+= ( const value_type item)
inline

Definition at line 64 of file intarena.hh.

References IntervalArena< TInt, TFld >::add().

IntervalArena& operator-= ( const value_type item)
inline

Definition at line 69 of file intarena.hh.

References IntervalArena< TInt, TFld >::sub().

void reverseLookup ( TKeySet dst,
TFld  fld 
) const

return the set of all keys that map to this object

Definition at line 230 of file intarena.hh.

References hasKey().

void sub ( const key_type key,
TFld  fld 
)

Definition at line 86 of file intarena.hh.

References CL_BREAK_IF.

Referenced by IntervalArena< TInt, TFld >::operator-=().

Field Documentation

TCont cont_
private

Definition at line 49 of file intarena.hh.

Referenced by IntervalArena< TInt, TFld >::clear().


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