Diffstat (limited to 'include/konforka/pointer_map.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | include/konforka/pointer_map.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/konforka/pointer_map.h b/include/konforka/pointer_map.h index d706e71..00dd486 100644 --- a/include/konforka/pointer_map.h +++ b/include/konforka/pointer_map.h | |||
@@ -1,63 +1,64 @@ | |||
1 | #ifndef __KONFORKA_POINTER_MAP_H | 1 | #ifndef __KONFORKA_POINTER_MAP_H |
2 | #define __KONFORKA_POINTER_MAP_H | 2 | #define __KONFORKA_POINTER_MAP_H |
3 | 3 | ||
4 | #include <typeinfo> | 4 | #include <typeinfo> |
5 | 5 | ||
6 | /** | 6 | /** |
7 | * @file | 7 | * @file |
8 | * @brief mapping of pointers. | 8 | * @brief mapping of pointers. |
9 | * | 9 | * |
10 | * The support for global mapping of pointers. Useful when using third-party | 10 | * The support for global mapping of pointers. Useful when using third-party |
11 | * libraries callbacks when the library does not provide mechanism for passing | 11 | * libraries callbacks when the library does not provide mechanism for passing |
12 | * along custom context-dependent data. | 12 | * along custom context-dependent data. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | namespace konforka { | 15 | namespace konforka { |
16 | using std::type_info; | ||
16 | 17 | ||
17 | /** | 18 | /** |
18 | * @brief internally used actual implementation of mapping pointer. | 19 | * @brief internally used actual implementation of mapping pointer. |
19 | * | 20 | * |
20 | * @param tf the typeid of the key pointer. | 21 | * @param tf the typeid of the key pointer. |
21 | * @param pf the key pointer. | 22 | * @param pf the key pointer. |
22 | * @param tt the typeid of the value pointer. | 23 | * @param tt the typeid of the value pointer. |
23 | * @param pt the value pointer. | 24 | * @param pt the value pointer. |
24 | */ | 25 | */ |
25 | void _map_pointer(const type_info& tf,void *pf,const type_info& tt,void *pt); | 26 | void _map_pointer(const type_info& tf,void *pf,const type_info& tt,void *pt); |
26 | /** | 27 | /** |
27 | * @brief internally used actual implementation of destroying mapped | 28 | * @brief internally used actual implementation of destroying mapped |
28 | * pointer. | 29 | * pointer. |
29 | * | 30 | * |
30 | * @param tf the typeid of the key pointer. | 31 | * @param tf the typeid of the key pointer. |
31 | * @param pf the key pointer. | 32 | * @param pf the key pointer. |
32 | * @param tt the typeid of the value pointer. | 33 | * @param tt the typeid of the value pointer. |
33 | * @param pt the value pointer. | 34 | * @param pt the value pointer. |
34 | */ | 35 | */ |
35 | void _unmap_pointer(const type_info& tf,void *pf,const type_info& tt,void *pt); | 36 | void _unmap_pointer(const type_info& tf,void *pf,const type_info& tt,void *pt); |
36 | /** | 37 | /** |
37 | * @brief internally used actual implementation of retrieving mapped | 38 | * @brief internally used actual implementation of retrieving mapped |
38 | * pointer. | 39 | * pointer. |
39 | * | 40 | * |
40 | * @param tf the typeid of the key pointer. | 41 | * @param tf the typeid of the key pointer. |
41 | * @param pf the key pointer. | 42 | * @param pf the key pointer. |
42 | * @param tt the typeid of the value pointer. | 43 | * @param tt the typeid of the value pointer. |
43 | * @return the value. | 44 | * @return the value. |
44 | */ | 45 | */ |
45 | void *_mapped_pointer(const type_info& tf,void *pf,const type_info& tt); | 46 | void *_mapped_pointer(const type_info& tf,void *pf,const type_info& tt); |
46 | 47 | ||
47 | /** | 48 | /** |
48 | * @brief the object, maintaining mapped pointer. | 49 | * @brief the object, maintaining mapped pointer. |
49 | * | 50 | * |
50 | * @param from_t the key type. | 51 | * @param from_t the key type. |
51 | * @param to_t the value type. | 52 | * @param to_t the value type. |
52 | */ | 53 | */ |
53 | template<typename from_t,typename to_t> | 54 | template<typename from_t,typename to_t> |
54 | class map_pointer { | 55 | class map_pointer { |
55 | public: | 56 | public: |
56 | /** | 57 | /** |
57 | * stored key. | 58 | * stored key. |
58 | */ | 59 | */ |
59 | from_t _from; | 60 | from_t _from; |
60 | /** | 61 | /** |
61 | * stored value. | 62 | * stored value. |
62 | */ | 63 | */ |
63 | to_t _to; | 64 | to_t _to; |