class MapIndexDatabase {
public:
MapIndexDatabase() {}
~MapIndexDatabase() {}
bool Init(const std::string& file_path);
std::shared_ptr<std::set<MultiMapNodeIndex>> GetLinkNodeIndex(
const std::string& index_id);
std::shared_ptr<std::set<MultiMapNodeIndex>> GetLinkNodeIndex(
const MultiMapNodeIndex& multi_index);
std::shared_ptr<std::set<MultiMapNodeIndex>> GetLinkNodeIndex(
const MapNodeIndex& index, int level);
std::shared_ptr<std::set<MultiMapNodeIndex>> GetLinkNodeIndex(int m,
int n,
int level);
bool FindMapNodeIndex(const MultiMapNodeIndex& multi_index);
int MultiIndexLevels(const MapNodeIndex& index);
private:
std::map<MultiMapNodeIndex, std::shared_ptr<std::set<MultiMapNodeIndex>>>
data_base_;
};
class MapIndexUtil {
public:
MapIndexUtil(MapIndexUtil const&) = delete;
MapIndexUtil& operator=(MapIndexUtil const&) = delete;
static MapIndexDatabase& GetInstance() {
static MapIndexDatabase map_index_database_;
return map_index_database_;
}
private:
MapIndexUtil() = default;
};
05-21
05-21
05-23
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交