This class manages a mapping of integers to integers. More...
#include "indexRemapper.h"
Public Member Functions | |
void | add_mapping (int from, int to) |
Adds a mapping from the integer 'from' to 'to'. More... | |
void | clear () |
Removes all mappings from the object. More... | |
bool | in_map (int from) const |
Returns true if the given 'from' integer has been assigned a mapping, false if it has not. More... | |
int | map_from (int from) const |
Returns the integer that the given 'from' integer had been set to map to, or the same integer if nothing had been set for it. More... | |
This class manages a mapping of integers to integers.
It's used in this package to resequence some or all of the index numbers in the database to a different sequence.
This class is just a wrapper around STL map. The only reason it exists is because Microsoft can't export STL map outside of the DLL.
Definition at line 29 of file indexRemapper.h.
void IndexRemapper::add_mapping | ( | int | from, |
int | to | ||
) |
Adds a mapping from the integer 'from' to 'to'.
Definition at line 43 of file indexRemapper.cxx.
Referenced by InterrogateDatabase::remap_indices().
void IndexRemapper::clear | ( | ) |
Removes all mappings from the object.
Definition at line 35 of file indexRemapper.cxx.
Referenced by InterrogateDatabase::remap_indices().
bool IndexRemapper::in_map | ( | int | from | ) | const |
Returns true if the given 'from' integer has been assigned a mapping, false if it has not.
Definition at line 52 of file indexRemapper.cxx.
int IndexRemapper::map_from | ( | int | from | ) | const |
Returns the integer that the given 'from' integer had been set to map to, or the same integer if nothing had been set for it.
Definition at line 61 of file indexRemapper.cxx.
Referenced by InterrogateManifest::remap_indices(), InterrogateMakeSeq::remap_indices(), InterrogateFunctionWrapper::remap_indices(), InterrogateFunction::remap_indices(), InterrogateElement::remap_indices(), InterrogateDatabase::remap_indices(), and InterrogateType::remap_indices().