[0.2.x] added: typeInfo doc strings

git-svn-id: https://pykd.svn.codeplex.com/svn@82053 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2012-12-27 09:46:28 +00:00 committed by Mikhail I. Izmestev
parent 0a9c658da6
commit 5c6d5e720c

View File

@ -399,19 +399,32 @@ BOOST_PYTHON_MODULE( pykd )
python::class_<TypeInfo, TypeInfoPtr, python::bases<intBase>, boost::noncopyable >("typeInfo", "Class representing typeInfo", python::no_init ) python::class_<TypeInfo, TypeInfoPtr, python::bases<intBase>, boost::noncopyable >("typeInfo", "Class representing typeInfo", python::no_init )
.def("__init__", python::make_constructor(TypeInfo::getTypeInfoByName ) ) .def("__init__", python::make_constructor(TypeInfo::getTypeInfoByName ) )
.def( "name", &TypeInfo::getName ) .def( "name", &TypeInfo::getName,
.def( "size", &TypeInfo::getSize ) "Return type name" )
.def( "staticOffset", &TypeInfo::getStaticOffsetByName ) .def( "size", &TypeInfo::getSize,
.def( "fieldOffset", &TypeInfo::getFieldOffsetByNameRecursive ) "Return type size" )
.def( "bitOffset", &TypeInfo::getBitOffset ) .def( "staticOffset", &TypeInfo::getStaticOffsetByName,
.def( "bitWidth", &TypeInfo::getBitWidth ) "Return offset of the static field" )
.def( "field", &TypeInfo::getField ) .def( "fieldOffset", &TypeInfo::getFieldOffsetByNameRecursive,
.def( "asMap", &TypeInfo::asMap ) "Return offset of the nonstatic field" )
.def( "deref", &TypeInfo::deref ) .def( "bitOffset", &TypeInfo::getBitOffset,
.def( "append", &TypeInfo::appendField ) "Return bit field's offset" )
.def( "ptrTo", &TypeInfo::ptrTo ) .def( "bitWidth", &TypeInfo::getBitWidth,
.def( "arrayOf", &TypeInfo::arrayOf ) "Return bit field's length" )
.def( "__str__", &TypeInfo::print ) .def( "field", &TypeInfo::getField,
"Return field's type" )
.def( "asMap", &TypeInfo::asMap,
"Return type as python dict ( for enum types )" )
.def( "deref", &TypeInfo::deref,
"Return type of pointer" )
.def( "append", &TypeInfo::appendField,
"Add a new field to custom defined struct" )
.def( "ptrTo", &TypeInfo::ptrTo,
"Return pointer to the type" )
.def( "arrayOf", &TypeInfo::arrayOf,
"Return array of the type" )
.def( "__str__", &TypeInfo::print,
"Return typa as a printable string" )
.def( "__getattr__", &TypeInfo::getField ) .def( "__getattr__", &TypeInfo::getField )
.def("__len__", &TypeInfo::getElementCount ) .def("__len__", &TypeInfo::getElementCount )
.def("__getitem__", &TypeInfo::getElementByIndex ); .def("__getitem__", &TypeInfo::getElementByIndex );