+ DIA symbol comparator
 + DIA symbol hash

git-svn-id: https://pykd.svn.codeplex.com/svn@74770 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\EreTIk_cp 2012-03-07 18:38:44 +00:00 committed by Mikhail I. Izmestev
parent 07c4634708
commit 234c60d1f2
3 changed files with 11 additions and 1 deletions

View File

@ -725,7 +725,9 @@ BOOST_PYTHON_MODULE( pykd )
.def( "__str__", &pyDia::Symbol::print) .def( "__str__", &pyDia::Symbol::print)
.def("__getitem__", &pyDia::Symbol::getChildByName) .def("__getitem__", &pyDia::Symbol::getChildByName)
.def("__len__", &pyDia::Symbol::getChildCount ) .def("__len__", &pyDia::Symbol::getChildCount )
.def("__getitem__", &pyDia::Symbol::getChildByIndex); .def("__getitem__", &pyDia::Symbol::getChildByIndex)
.def("__eq__", &pyDia::Symbol::eq)
.def("__hash__", &pyDia::Symbol::getIndexId);
python::class_<pyDia::GlobalScope, pyDia::GlobalScopePtr, python::bases<pyDia::Symbol> >( python::class_<pyDia::GlobalScope, pyDia::GlobalScopePtr, python::bases<pyDia::Symbol> >(
"DiaScope", "class wrapper for MS DIA Symbol", python::no_init ) "DiaScope", "class wrapper for MS DIA Symbol", python::no_init )

View File

@ -378,6 +378,13 @@ std::string Symbol::print()
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
bool Symbol::eq(Symbol &rhs)
{
return getIndexId() == rhs.getIndexId();
}
////////////////////////////////////////////////////////////////////////////////
GlobalScope::GlobalScope( GlobalScope::GlobalScope(
__inout DiaDataSourcePtr &_scope, __inout DiaDataSourcePtr &_scope,
__inout DiaSessionPtr &_session, __inout DiaSessionPtr &_session,

View File

@ -140,6 +140,7 @@ public:
std::string print(); std::string print();
bool eq(Symbol &rhs);
public: public:
typedef std::pair<ULONG, const char *> ValueNameEntry; typedef std::pair<ULONG, const char *> ValueNameEntry;