MCPcopy Create free account
hub / github.com/comaps/comaps / Load

Function Load

libs/indexer/classificator_loader.cpp:44–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42namespace classificator
43{
44void Load()
45{
46 LOG(LDEBUG, ("Reading of classificator started"));
47
48 Platform & p = GetPlatform();
49
50 MapStyle const originMapStyle = GetStyleReader().GetCurrentStyle();
51
52 for (size_t i = 0; i < MapStyleCount; ++i)
53 {
54 auto const mapStyle = static_cast<MapStyle>(i);
55 // Read the merged style only if it was requested.
56 if (mapStyle != MapStyleMerged || originMapStyle == MapStyleMerged)
57 {
58 GetStyleReader().SetCurrentStyle(mapStyle);
59 ReadCommon(p.GetReader("classificator.txt"), p.GetReader("types.txt"));
60
61 drule::LoadRules();
62 }
63 }
64
65 GetStyleReader().SetCurrentStyle(originMapStyle);
66
67 LOG(LDEBUG, ("Reading of classificator finished"));
68}
69
70void LoadTypes(std::string const & classificatorFileStr, std::string const & typesFileStr)
71{

Callers 15

SetTableMethod · 0.70
LoadMethod · 0.70
InitMethod · 0.70
DataHeaderMethod · 0.70
LoadMethod · 0.70
GetMethod · 0.70
CreateValueMethod · 0.70
FeaturesVectorTestMethod · 0.70
LoadRankTableFunction · 0.70
DeserializeV0Method · 0.70
DeserializeV0ToMemMethod · 0.70
CentersTableTestMethod · 0.50

Calls 5

ReadCommonFunction · 0.85
LoadRulesFunction · 0.85
GetCurrentStyleMethod · 0.80
SetCurrentStyleMethod · 0.80
GetReaderMethod · 0.45

Tested by 12

CentersTableTestMethod · 0.40
UNIT_TESTFunction · 0.40
UNIT_TESTFunction · 0.40
UNIT_TESTFunction · 0.40
TestTableFunction · 0.40
UNIT_TESTFunction · 0.40
UNIT_TESTFunction · 0.40
UNIT_TESTFunction · 0.40
UNIT_TESTFunction · 0.40
UNIT_TESTFunction · 0.40
UNIT_TESTFunction · 0.40
UNIT_TESTFunction · 0.40