Lumiera  0.pre.03
»edityourfreedom«
IndexTable< VAL > Class Template Reference

#include "lib/diff/index-table.hpp"

Description

template<typename VAL>
class lib::diff::IndexTable< VAL >

data snapshot and lookup table

Definition at line 61 of file index-table.hpp.

Public Types

using const_iterator = typename std::vector< VAL >::const_iterator
 
using iterator = typename std::vector< VAL >::iterator
 

Public Member Functions

template<class SEQ >
 IndexTable (SEQ const &seq)
 
iterator begin ()
 
const_iterator begin () const
 
bool contains (VAL const &elm) const
 
iterator end ()
 
const_iterator end () const
 
VAL const & getElement (size_t i) const
 
size_t pos (VAL const &elm) const
 
size_t size () const
 

Private Member Functions

void __rejectDuplicate (VAL const &elm)
 

Private Attributes

std::vector< VAL > data_
 
std::map< VAL, size_t > idx_
 

Member Typedef Documentation

◆ iterator

using iterator = typename std::vector<VAL>::iterator

Definition at line 81 of file index-table.hpp.

◆ const_iterator

using const_iterator = typename std::vector<VAL>::const_iterator

Definition at line 82 of file index-table.hpp.

Constructor & Destructor Documentation

◆ IndexTable()

IndexTable ( SEQ const &  seq)
inline

Definition at line 68 of file index-table.hpp.

Member Function Documentation

◆ begin() [1/2]

iterator begin ( )
inline

Definition at line 84 of file index-table.hpp.

Referenced by DiffDetector< SEQ >::isChanged().

+ Here is the caller graph for this function:

◆ end() [1/2]

iterator end ( )
inline

Definition at line 85 of file index-table.hpp.

Referenced by DiffDetector< SEQ >::isChanged().

+ Here is the caller graph for this function:

◆ begin() [2/2]

const_iterator begin ( ) const
inline

Definition at line 86 of file index-table.hpp.

◆ end() [2/2]

const_iterator end ( ) const
inline

Definition at line 87 of file index-table.hpp.

◆ size()

size_t size ( ) const
inline

Definition at line 89 of file index-table.hpp.

Referenced by IndexTable< Val >::contains(), IndexTable< Val >::getElement(), DiffDetector< SEQ >::DiffFrame::hasNew(), DiffDetector< SEQ >::DiffFrame::hasOld(), and IndexTable< Val >::pos().

+ Here is the caller graph for this function:

◆ getElement()

VAL const& getElement ( size_t  i) const
inline

Definition at line 95 of file index-table.hpp.

Referenced by DiffDetector< SEQ >::DiffFrame::consumeNew(), DiffDetector< SEQ >::DiffFrame::consumeOld(), DiffDetector< SEQ >::DiffFrame::newElm(), and DiffDetector< SEQ >::DiffFrame::oldElm().

+ Here is the caller graph for this function:

◆ contains()

bool contains ( VAL const &  elm) const
inline

Definition at line 103 of file index-table.hpp.

Referenced by DiffDetector< SEQ >::DiffFrame::canDelete(), and DiffDetector< SEQ >::DiffFrame::canInsert().

+ Here is the caller graph for this function:

◆ pos()

size_t pos ( VAL const &  elm) const
inline

Definition at line 110 of file index-table.hpp.

Referenced by IndexTable< Val >::contains(), DiffDetector< SEQ >::DiffFrame::needFetch(), and DiffDetector< SEQ >::DiffFrame::obsoleted().

+ Here is the caller graph for this function:

◆ __rejectDuplicate()

void __rejectDuplicate ( VAL const &  elm)
inlineprivate

Definition at line 119 of file index-table.hpp.

Referenced by IndexTable< Val >::IndexTable().

+ Here is the caller graph for this function:

Member Data Documentation

◆ data_

std::vector<VAL> data_
private

Definition at line 63 of file index-table.hpp.

◆ idx_

std::map<VAL,size_t> idx_
private

Definition at line 64 of file index-table.hpp.

+ Inheritance diagram for IndexTable< VAL >:
+ Collaboration diagram for IndexTable< VAL >:

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