forked from organicmaps/organicmaps
[generator] Added DebugPrint function.
This commit is contained in:
parent
9d38563556
commit
b1b61d8635
4 changed files with 11 additions and 3 deletions
|
@ -549,6 +549,11 @@ uint64_t FeatureBuilder1::GetWayIDForRouting() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
string DebugPrint(FeatureBuilder2 const & f)
|
||||
{
|
||||
return DebugPrint(static_cast<FeatureBuilder1 const &>(f));
|
||||
}
|
||||
|
||||
bool FeatureBuilder2::PreSerialize(SupportingData const & data)
|
||||
{
|
||||
// make flags actual before header serialization
|
||||
|
|
|
@ -220,8 +220,10 @@ class FeatureBuilder2 : public FeatureBuilder1
|
|||
|
||||
static void SerializeOffsets(uint32_t mask, TOffsets const & offsets, TBuffer & buffer);
|
||||
|
||||
public:
|
||||
/// For debugging
|
||||
friend string DebugPrint(FeatureBuilder2 const & f);
|
||||
|
||||
public:
|
||||
struct SupportingData
|
||||
{
|
||||
/// @name input
|
||||
|
|
|
@ -28,6 +28,7 @@ public:
|
|||
|
||||
bool operator<(Id const & other) const { return m_encodedId < other.m_encodedId; }
|
||||
bool operator==(Id const & other) const { return m_encodedId == other.m_encodedId; }
|
||||
bool operator==(uint64_t other) const { return OsmId() == other; }
|
||||
};
|
||||
|
||||
string DebugPrint(osm::Id const & id);
|
||||
|
|
|
@ -526,9 +526,9 @@ string DebugPrint(FeatureParams const & p)
|
|||
{
|
||||
Classificator const & c = classif();
|
||||
|
||||
string res = "Types";
|
||||
string res = "Types: ";
|
||||
for (size_t i = 0; i < p.m_Types.size(); ++i)
|
||||
res += (" : " + c.GetReadableObjectName(p.m_Types[i]));
|
||||
res = res + c.GetReadableObjectName(p.m_Types[i]) + "; ";
|
||||
|
||||
return (res + p.DebugString());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue