git-svn-id: svn://db.shs.com.ru/pip@470 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-04-25 12:55:47 +00:00
parent 826db9e87d
commit ed059005f9
15 changed files with 101 additions and 78 deletions

View File

@@ -237,12 +237,14 @@ bool PIConfig::Entry::entryExists(const Entry * e, const PIString & name) const
}
#ifdef PIP_STD_IOSTREAM
void PIConfig::Entry::coutt(std::ostream & s, const PIString & p) const {
PIString nl = p + " ";
if (!_value.isEmpty()) s << p << _name << " = " << _value << std::endl;
else std::cout << p << _name << std::endl;
piForeachC (Entry * i, _children) i->coutt(s, nl);
}
#endif
void PIConfig::Entry::piCoutt(PICout s, const PIString & p) const {
@@ -815,6 +817,7 @@ void PIConfig::parse() {
}
#ifdef PIP_STD_IOSTREAM
std::ostream &operator <<(std::ostream & s, const PIConfig::Entry & v) {
s << v.value();
return s;
@@ -825,3 +828,4 @@ std::ostream &operator <<(std::ostream & s, const PIConfig::Branch & v) {
v.coutt(s, "");
return s;
}
#endif