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

Function SerializeRankTable

libs/indexer/rank_table.cpp:105–118  ·  view source on GitHub ↗

Following two functions create a rank section and serialize |table| to it. If there was an old section with ranks, these functions overwrite it.

Source from the content-addressed store, hash-verified

103// to it. If there was an old section with ranks, these functions
104// overwrite it.
105void SerializeRankTable(RankTable & table, FilesContainerW & wcont, string const & sectionName)
106{
107 if (wcont.IsExist(sectionName))
108 wcont.DeleteSection(sectionName);
109
110 vector<char> buffer;
111 {
112 MemWriter<decltype(buffer)> writer(buffer);
113 table.Serialize(writer);
114 }
115
116 wcont.Write(buffer, sectionName);
117 wcont.Finish();
118}
119
120void SerializeRankTable(RankTable & table, string const & mapPath, string const & sectionName)
121{

Callers 2

CreateIfNotExistsMethod · 0.85
CreateMethod · 0.85

Calls 5

IsExistMethod · 0.80
DeleteSectionMethod · 0.80
SerializeMethod · 0.45
WriteMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected