open_toontown_panda3d/dtool/src/interrogatedb/indexRemapper.h

43 lines
1.0 KiB
C++

// Filename: indexRemapper.h
// Created by: drose (05Aug00)
//
////////////////////////////////////////////////////////////////////
#ifndef INDEXREMAPPER_H
#define INDEXREMAPPER_H
#include <dtoolbase.h>
#include <map>
////////////////////////////////////////////////////////////////////
// Class : IndexRemapper
// 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.
////////////////////////////////////////////////////////////////////
class EXPCL_DTOOL IndexRemapper {
public:
IndexRemapper();
~IndexRemapper();
void clear();
void add_mapping(int from, int to);
bool in_map(int from) const;
int map_from(int from) const;
private:
map<int, int> _map_int;
};
#endif