55#include < vector>
66#include < stdint.h>
77
8- #ifndef HAVE_JUDY
9- # include < set>
10- # include < map>
11- # include < unordered_map>
12- #else // HAVE_JUDY
13- # include " judyLArray.h"
14- # include " judySArray.h"
15- # include " judyL2Array.h"
16- # include " judyS2Array.h"
17- #endif // HAVE_JUDY
8+ #include " judyLArray.h"
9+ #include " judySArray.h"
10+ #include " judyL2Array.h"
11+ #include " judyS2Array.h"
1812
1913class SDAI_Application_instance ;
2014class lazyDataSectionReader ;
@@ -39,7 +33,7 @@ typedef int16_t fileID; ///< the index of a lazyFileReader in a lazyFileRea
3933 */
4034typedef uint64_t positionAndSection;
4135
42- typedef std::vector< instanceID > * instanceRefs;
36+ typedef std::vector< instanceID > instanceRefs;
4337
4438// TODO: create a "unique instance id" from the sectionID and instanceID, and use it everywhere?
4539
@@ -59,46 +53,21 @@ typedef struct {
5953typedef struct {
6054 lazyInstanceLoc loc;
6155 const char * name;
62- instanceRefs refs;
56+ instanceRefs * refs;
6357} namedLazyInstance;
6458
6559// instanceRefs - map between an instanceID and instances that refer to it
66- #ifdef HAVE_JUDY
6760typedef judyL2Array< instanceID, instanceID > instanceRefs_t;
68- #else // HAVE_JUDY
69- typedef std::unordered_multimap< instanceID, instanceID > instanceRefs_t;
70- typedef std::pair< instanceID, instanceID > instanceRefs_pair;
71- typedef std::pair< instanceRefs_t::const_iterator, instanceRefs_t::const_iterator > instanceRefs_range;
72- #endif // HAVE_JUDY
7361
7462// instanceType_t - multimap from instance type to instanceID's
75- #ifdef HAVE_JUDY
7663typedef judyS2Array< instanceID > instanceTypes_t;
77- #else // HAVE_JUDY
78- typedef std::unordered_multimap< std::string, instanceID > instanceTypes_t;
79- typedef std::pair< std::string, instanceID > instanceTypes_pair;
80- typedef std::pair< instanceTypes_t::const_iterator, instanceTypes_t::const_iterator > instanceTypes_range;
81- #endif // HAVE_JUDY
8264
8365// instancesLoaded - fully created instances
84- #ifdef HAVE_JUDY
8566typedef judyLArray< instanceID, SDAI_Application_instance * > instancesLoaded_t;
86- #else // HAVE_JUDY
87- typedef std::map< instanceID, SDAI_Application_instance * > instancesLoaded_t;
88- typedef std::pair< instanceID, SDAI_Application_instance * > instancesLoaded_pair;
89- #endif // HAVE_JUDY
9067
9168// instanceStreamPos - map instance id to a streampos and data section
9269// there could be multiple instances with the same ID, but in different files (or different sections of the same file?)
93- #ifdef HAVE_JUDY
9470typedef judyL2Array< instanceID, positionAndSection > instanceStreamPos_t;
95- // typedef std::pair< instanceID, positionAndSection > instanceStreamPos_pair;
96- // typedef std::pair< instanceStreamPos_t::cvector::const_iterator, instanceStreamPos_t::cvector::const_iterator > instanceStreamPos_range;
97- #else // HAVE_JUDY
98- typedef std::unordered_multimap< instanceID, positionAndSection > instanceStreamPos_t;
99- typedef std::pair< instanceID, positionAndSection > instanceStreamPos_pair;
100- typedef std::pair< instanceStreamPos_t::const_iterator, instanceStreamPos_t::const_iterator > instanceStreamPos_range;
101- #endif // HAVE_JUDY
10271
10372
10473// data sections
0 commit comments