version 0.5.0_alpha
git-svn-id: svn://db.shs.com.ru/pip@8 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
Object, base class of some PIP classes, provide EVENT -> EVENT_HANDLER mechanism
|
||||
Copyright (C) 2014 Ivan Pelipenko peri4ko@gmail.com
|
||||
Copyright (C) 2015 Ivan Pelipenko peri4ko@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -339,26 +339,26 @@ bool PIObject::execute(const PIString & method) {
|
||||
|
||||
void PIObject::dump(const PIString & line_prefix) const {
|
||||
//printf("dump %s \"%s\"\n", className(), name().data());
|
||||
PICout(AddNewLine) << line_prefix << "class " << className() << " (" << (const void*)this << ", \"" << name() << "\") {";
|
||||
PICout(AddNewLine) << line_prefix << " properties {";
|
||||
PICout(AddNewLine) << line_prefix << " count: " << properties_.size_s();
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << "class " << className() << " (" << (const void*)this << ", \"" << name() << "\") {";
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " properties {";
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " count: " << properties_.size_s();
|
||||
//printf("dump %d properties\n", properties_.size());
|
||||
piForeachC (Property p, properties_)
|
||||
if (p.first != "name")
|
||||
PICout(AddNewLine) << line_prefix << " " << p.first << ": " << p.second;
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " " << p.first << ": " << p.second;
|
||||
//printf("dump %d properties ok\n", properties_.size());
|
||||
PICout(AddNewLine) << line_prefix << " }";
|
||||
PICout(AddNewLine) << line_prefix << " methodsEH {";
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " }";
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " methodsEH {";
|
||||
__EHData & ehd(__eh_data[className()]);
|
||||
PICout(AddNewLine) << line_prefix << " count: " << ehd.eh_func.size_s();
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " count: " << ehd.eh_func.size_s();
|
||||
//printf("dump %d methods\n", ehd.eh_func.size());
|
||||
piForeachC (__EHPair & eh, ehd.eh_func) {
|
||||
PICout(AddNewLine) << line_prefix << " " << eh.second.fullFormat();
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " " << eh.second.fullFormat();
|
||||
}
|
||||
//printf("dump %d methods ok\n", ehd.eh_func.size());
|
||||
PICout(AddNewLine) << line_prefix << " }";
|
||||
PICout(AddNewLine) << line_prefix << " connections {";
|
||||
PICout(AddNewLine) << line_prefix << " count: " << connections.size_s();
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " }";
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " connections {";
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " count: " << connections.size_s();
|
||||
//printf("dump %d connections\n",connections.size());
|
||||
piForeachC (Connection & c, connections) {
|
||||
PIObject * dst = c.dest_o;
|
||||
@@ -369,11 +369,11 @@ void PIObject::dump(const PIString & line_prefix) const {
|
||||
PIString src(c.event);
|
||||
if (!ef.func_name.isEmpty())
|
||||
src = ef.func_name + "(" + ef.arguments() + ")";
|
||||
PICout(AddNewLine) << line_prefix << " " << src << " -> " << dst->className() << " (" << c.dest << ", \"" << dst->name() << "\")::" << hf.func_name;
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " " << src << " -> " << dst->className() << " (" << c.dest << ", \"" << dst->name() << "\")::" << hf.func_name;
|
||||
}
|
||||
//printf("dump %d connections ok\n",connections.size());
|
||||
PICout(AddNewLine) << line_prefix << " }";
|
||||
PICout(AddNewLine) << line_prefix << "}";
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " }";
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << "}";
|
||||
}
|
||||
|
||||
|
||||
@@ -383,20 +383,20 @@ void dumpApplication() {
|
||||
//printf("dump application ...\n");
|
||||
PIDateTime cd = PIDateTime::current();
|
||||
PISystemInfo * pi = PISystemInfo::instance();
|
||||
PICout(AddNewLine) << "application {";
|
||||
PICout(AddNewLine) << " PIP version: " << PIPVersion();
|
||||
PICout(AddNewLine) << " processors: " << pi->processorsCount;
|
||||
PICout(AddNewLine) << " hostname: \"" << pi->hostname << "\"";
|
||||
PICout(AddNewLine) << " user: \"" << pi->user << "\"";
|
||||
PICout(AddNewLine) << " exec command: \"" << pi->execCommand << "\"";
|
||||
PICout(AddNewLine) << " started: " << pi->execDateTime.toString();
|
||||
PICout(AddNewLine) << " uptime, s: " << (cd.toSystemTime() - pi->execDateTime.toSystemTime()).toSeconds();
|
||||
PICout(AddNewLine) << " PIObjects {";
|
||||
PICout(AddNewLine) << " count: " << PIObject::objects.size_s();
|
||||
PICout(PICoutManipulators::AddNewLine) << "application {";
|
||||
PICout(PICoutManipulators::AddNewLine) << " PIP version: " << PIPVersion();
|
||||
PICout(PICoutManipulators::AddNewLine) << " processors: " << pi->processorsCount;
|
||||
PICout(PICoutManipulators::AddNewLine) << " hostname: \"" << pi->hostname << "\"";
|
||||
PICout(PICoutManipulators::AddNewLine) << " user: \"" << pi->user << "\"";
|
||||
PICout(PICoutManipulators::AddNewLine) << " exec command: \"" << pi->execCommand << "\"";
|
||||
PICout(PICoutManipulators::AddNewLine) << " started: " << pi->execDateTime.toString();
|
||||
PICout(PICoutManipulators::AddNewLine) << " uptime, s: " << (cd.toSystemTime() - pi->execDateTime.toSystemTime()).toSeconds();
|
||||
PICout(PICoutManipulators::AddNewLine) << " PIObjects {";
|
||||
PICout(PICoutManipulators::AddNewLine) << " count: " << PIObject::objects.size_s();
|
||||
piForeachC (PIObject * o, PIObject::objects)
|
||||
o->dump(" ");
|
||||
PICout(AddNewLine) << " }";
|
||||
PICout(AddNewLine) << "}";
|
||||
PICout(PICoutManipulators::AddNewLine) << " }";
|
||||
PICout(PICoutManipulators::AddNewLine) << "}";
|
||||
//printf("dump application done\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user