git-svn-id: svn://db.shs.com.ru/pip@824 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -86,9 +86,9 @@ PIVector<PIIntrospection::ObjectInfo> PIIntrospection::getObjects() {
|
||||
}
|
||||
|
||||
|
||||
PIByteArray & operator <<(PIByteArray & s, const std::map<uint, PIIntrospectionContainers::Type> & v) {
|
||||
PIMap<uint, PIIntrospectionContainers::Type> m;
|
||||
for (typename std::map<uint, PIIntrospectionContainers::Type>::const_iterator i = v.cbegin(); i != v.cend(); ++i) {
|
||||
PIByteArray & operator <<(PIByteArray & s, const std::map<uint, PIIntrospectionContainers::_Type> & v) {
|
||||
PIMap<uint, PIIntrospectionContainers::_Type> m;
|
||||
for (typename std::map<uint, PIIntrospectionContainers::_Type>::const_iterator i = v.cbegin(); i != v.cend(); ++i) {
|
||||
m[i->first] = i->second;
|
||||
}
|
||||
s << m;
|
||||
@@ -205,27 +205,22 @@ void PIIntrospection::unpackProcStat(PIByteArray & ba, PIIntrospection::ProcessS
|
||||
|
||||
PIByteArray PIIntrospection::packContainers() {
|
||||
PIByteArray ret;
|
||||
std::map<uint, PIIntrospectionContainers::Type> data;
|
||||
std::map<uint, std::string> typenames;
|
||||
PIVector<PIIntrospectionContainers::TypeInfo> data;
|
||||
PIIntrospectionContainers * p = 0;
|
||||
#ifdef PIP_INTROSPECTION
|
||||
p = PIINTROSPECTION_CONTAINERS->p;
|
||||
#endif
|
||||
if (p) {
|
||||
p->mutex.lock();
|
||||
data = p->data;
|
||||
typenames = p->typenames;
|
||||
p->mutex.unlock();
|
||||
data = p->getInfo();
|
||||
}
|
||||
ret << data << typenames;
|
||||
ret << data;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void PIIntrospection::unpackContainers(PIByteArray & ba, PIMap<uint, PIIntrospectionContainers::Type> & data, PIMap<uint, PIString> & typenames) {
|
||||
void PIIntrospection::unpackContainers(PIByteArray & ba, PIVector<PIIntrospectionContainers::TypeInfo> & data) {
|
||||
data.clear();
|
||||
typenames.clear();
|
||||
ba >> data >> typenames;
|
||||
ba >> data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user