| 48 | }; |
| 49 | |
| 50 | int hadmapConnect(const char* fileInfo, const MAP_DATA_TYPE& type, txMapHandle** ppHandle) { |
| 51 | if ((*ppHandle) != NULL) delete (*ppHandle); |
| 52 | (*ppHandle) = new txMapHandle; |
| 53 | (*ppHandle)->dataType = type; |
| 54 | (*ppHandle)->searchPtr = SearchFactory::getInstance()->getSearchInterface(type, fileInfo, true); |
| 55 | if ((*ppHandle)->searchPtr->connSuccess()) { |
| 56 | return TX_HADMAP_HANDLE_OK; |
| 57 | } else { |
| 58 | delete (*ppHandle); |
| 59 | (*ppHandle) = NULL; |
| 60 | return TX_HADMAP_HANDLE_ERROR; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | int hadmapConnect(const char* fileInfo, const MAP_DATA_TYPE& type, txMapHandle** ppHandle, bool doubleRoad) { |
| 65 | if ((*ppHandle) != NULL) delete (*ppHandle); |