git-svn-id: svn://db.shs.com.ru/pip@467 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -142,10 +142,16 @@ PIStringList PIObject::events() {
|
||||
}
|
||||
*/
|
||||
|
||||
PIStringList PIObject::methodsEH() {
|
||||
PIMutexLocker ml(__eh_mutex());
|
||||
PIStringList PIObject::scopeList() const {
|
||||
PIMutexLocker ml(__meta_mutex());
|
||||
return __meta_data()[className()].scope_list;
|
||||
}
|
||||
|
||||
|
||||
PIStringList PIObject::methodsEH() const {
|
||||
PIMutexLocker ml(__meta_mutex());
|
||||
PIStringList ret;
|
||||
__EHData & ehd(__eh_data()[className()]);
|
||||
__MetaData & ehd(__meta_data()[className()]);
|
||||
piForeachC (__EHPair & eh, ehd.eh_func)
|
||||
ret << eh.second.fullFormat();
|
||||
return ret;
|
||||
@@ -153,8 +159,8 @@ PIStringList PIObject::methodsEH() {
|
||||
|
||||
|
||||
bool PIObject::isMethodEHContains(const PIString & name) const {
|
||||
PIMutexLocker ml(__eh_mutex());
|
||||
__EHData & ehd(__eh_data()[className()]);
|
||||
PIMutexLocker ml(__meta_mutex());
|
||||
__MetaData & ehd(__meta_data()[className()]);
|
||||
piForeachC (__EHPair & eh, ehd.eh_func)
|
||||
if (eh.second.func_name == name)
|
||||
return true;
|
||||
@@ -163,8 +169,8 @@ bool PIObject::isMethodEHContains(const PIString & name) const {
|
||||
|
||||
|
||||
PIString PIObject::methodEHArguments(const PIString & name) const {
|
||||
PIMutexLocker ml(__eh_mutex());
|
||||
__EHData & ehd(__eh_data()[className()]);
|
||||
PIMutexLocker ml(__meta_mutex());
|
||||
__MetaData & ehd(__meta_data()[className()]);
|
||||
piForeachC (__EHPair & eh, ehd.eh_func)
|
||||
if (eh.second.func_name == name)
|
||||
return eh.second.arguments();
|
||||
@@ -173,8 +179,8 @@ PIString PIObject::methodEHArguments(const PIString & name) const {
|
||||
|
||||
|
||||
PIString PIObject::methodEHFullFormat(const PIString & name) const {
|
||||
PIMutexLocker ml(__eh_mutex());
|
||||
__EHData & ehd(__eh_data()[className()]);
|
||||
PIMutexLocker ml(__meta_mutex());
|
||||
__MetaData & ehd(__meta_data()[className()]);
|
||||
piForeachC (__EHPair & eh, ehd.eh_func)
|
||||
if (eh.second.func_name == name)
|
||||
return eh.second.fullFormat();
|
||||
@@ -189,7 +195,7 @@ PIString PIObject::methodEHFromAddr(const void * addr) const {
|
||||
|
||||
PIVector<PIObject::__EHFunc> PIObject::findEH(const PIString & name) const {
|
||||
PIVector<__EHFunc> ret;
|
||||
__EHData & ehd(__eh_data()[className()]);
|
||||
__MetaData & ehd(__meta_data()[className()]);
|
||||
piForeachC (__EHPair & eh, ehd.eh_func)
|
||||
if (eh.second.func_name == name)
|
||||
ret << eh.second;
|
||||
@@ -198,8 +204,8 @@ PIVector<PIObject::__EHFunc> PIObject::findEH(const PIString & name) const {
|
||||
|
||||
|
||||
PIObject::__EHFunc PIObject::methodEH(const void * addr) const {
|
||||
PIMutexLocker ml(__eh_mutex());
|
||||
return __eh_data()[className()].eh_func.value(addr);
|
||||
PIMutexLocker ml(__meta_mutex());
|
||||
return __meta_data()[className()].eh_func.value(addr);
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +235,7 @@ bool PIObject::piConnectU(PIObject * src, const PIString & ename, PIObject * des
|
||||
piCout << "[piConnectU] \"" << ename << "\" -> \"" << hname << "\" error: destination object is not PIObject! (" << loc << ")";
|
||||
return false;
|
||||
}
|
||||
PIMutexLocker ml(__eh_mutex());
|
||||
PIMutexLocker ml(__meta_mutex());
|
||||
PIMutexLocker mls(src->mutex_connect);
|
||||
PIMutexLocker mld(dest_o->mutex_connect, src != dest_o);
|
||||
PIVector<__EHFunc> m_src = src->findEH(ename), m_dest = dest_o->findEH(hname);
|
||||
@@ -348,14 +354,14 @@ void PIObject::updateConnectors() {
|
||||
}
|
||||
|
||||
|
||||
PIMutex & PIObject::__eh_mutex() {
|
||||
PIMutex & PIObject::__meta_mutex() {
|
||||
static PIMutex ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
PIMap<PIString, PIObject::__EHData> & PIObject::__eh_data() {
|
||||
static PIMap<PIString, PIObject::__EHData> ret;
|
||||
PIMap<PIString, PIObject::__MetaData> & PIObject::__meta_data() {
|
||||
static PIMap<PIString, PIObject::__MetaData> ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -427,7 +433,7 @@ void PIObject::dump(const PIString & line_prefix) const {
|
||||
//printf("dump %d properties ok\n", properties_.size());
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " }";
|
||||
PICout(PICoutManipulators::AddNewLine) << line_prefix << " methodsEH {";
|
||||
__EHData & ehd(__eh_data()[className()]);
|
||||
__MetaData & ehd(__meta_data()[className()]);
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user