Go to the documentation of this file.00001 #ifndef UT_BIJECTION_H
00002 #define UT_BIJECTION_H
00003
00004 #include <stdlib.h>
00005
00006
00007
00008
00009
00010 #ifndef UT_TYPES_H
00011 #include "ut_types.h"
00012 #endif
00013
00014 class ABI_EXPORT UT_Bijection
00015 {
00016 public:
00017
00018 UT_Bijection();
00019 ~UT_Bijection();
00020
00021
00022 const char *lookupByTarget(const char *s) const;
00023 const char *lookupBySource(const char *s) const;
00024 void add(const char *f, const char *s);
00025
00026 struct pair_data
00027 {
00028 const char *s1,*s2;
00029 };
00030
00031
00032 void add(const pair_data* items);
00033 size_t size() const;
00034 const char* nth1(size_t idx) const;
00035 const char* nth2(size_t idx) const;
00036 void clear();
00037
00038 private:
00039 int m_n;
00040 char **m_first;
00041 char **m_second;
00042 };
00043
00044 #endif