From b07616b31542cabab2c5ae7a9a0024167059be8b Mon Sep 17 00:00:00 2001 From: vng Date: Fri, 10 Feb 2012 02:50:13 +0300 Subject: [PATCH] Add DebugPrint for feature::TypesHolder. --- indexer/feature_data.cpp | 10 ++++++++++ indexer/feature_data.hpp | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/indexer/feature_data.cpp b/indexer/feature_data.cpp index 31e5c905ea..57e2a97ca6 100644 --- a/indexer/feature_data.cpp +++ b/indexer/feature_data.cpp @@ -13,6 +13,16 @@ TypesHolder::TypesHolder(FeatureBase const & f) f.ForEachTypeRef(*this); } +string TypesHolder::DebugPrint() const +{ + Classificator const & c = classif(); + + string s; + for (size_t i = 0; i < Size(); ++i) + s += c.GetFullObjectName(m_types[i]) + " "; + return s; +} + void FeatureParamsBase::MakeZero() { layer = 0; diff --git a/indexer/feature_data.hpp b/indexer/feature_data.hpp index 430f396f3e..fe208e6238 100644 --- a/indexer/feature_data.hpp +++ b/indexer/feature_data.hpp @@ -88,7 +88,14 @@ namespace feature return false; } //@} + + string DebugPrint() const; }; + + inline string DebugPrint(TypesHolder const & t) + { + return t.DebugPrint(); + } } /// Feature description struct.