Panda3D

Loading...
Searching...
No Matches
Public Member Functions | List of all members
IndexRemapper Class Reference

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'.
void | clear ()
| Removes all mappings from the object.
bool | in_map (int from) const
| Returns true if the given 'from' integer has been assigned a mapping, false if it has not.
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.

## Detailed Description

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.

## Constructor & Destructor Documentation

## ◆ IndexRemapper()

IndexRemapper::IndexRemapper | ( |  | ) |

Definition at line 20 of file indexRemapper.cxx.

## ◆ ~IndexRemapper()

IndexRemapper::~IndexRemapper | ( |  | ) |

Definition at line 27 of file indexRemapper.cxx.

## Member Function Documentation

## ◆ add_mapping()

void IndexRemapper::add_mapping | ( | int | from,
|  | int | to )

Adds a mapping from the integer 'from' to 'to'.

Definition at line 42 of file indexRemapper.cxx.

Referenced by InterrogateDatabase::remap_indices().

## ◆ clear()

void IndexRemapper::clear | ( |  | ) |

Removes all mappings from the object.

Definition at line 34 of file indexRemapper.cxx.

Referenced by InterrogateDatabase::remap_indices().

## ◆ in_map()

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 51 of file indexRemapper.cxx.

## ◆ map_from()

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 60 of file indexRemapper.cxx.

Referenced by InterrogateDatabase::remap_indices(), InterrogateElement::remap_indices(), InterrogateFunction::remap_indices(), InterrogateFunctionWrapper::remap_indices(), InterrogateMakeSeq::remap_indices(), InterrogateManifest::remap_indices(), and InterrogateType::remap_indices().

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

- dtool/src/interrogatedb/indexRemapper.h
- dtool/src/interrogatedb/indexRemapper.cxx