mathieu@2602: #include mathieu@2602: #include "ns3/object.h" mathieu@1368: mathieu@1368: using namespace ns3; mathieu@1368: mathieu@2602: void mathieu@2602: PrintAttributes (TypeId tid, std::ostream &os) mathieu@2602: { mathieu@2602: os << "" << std::endl; mathieu@2602: } mathieu@1399: mathieu@1399: mathieu@1368: int main (int argc, char *argv[]) mathieu@1368: { mathieu@1368: mathieu@2602: for (uint32_t i = 0; i < TypeId::GetRegisteredN (); i++) mathieu@2602: { mathieu@2602: std::cout << "/*!" << std::endl; mathieu@2602: TypeId tid = TypeId::GetRegistered (i); mathieu@2602: if (tid.MustHideFromDocumentation ()) mathieu@2602: { mathieu@2602: continue; mathieu@2602: } mathieu@2602: std::cout << "\\fn static TypeId " << tid.GetName () << "::GetTypeId (void)" << std::endl; mathieu@2602: std::cout << "\\brief This method returns the TypeId associated to \\ref " << tid.GetName () << std::endl << std::endl; mathieu@2693: if (tid.GetAttributeN () == 0) mathieu@2602: { mathieu@2602: std::cout << "No Attributes defined for this type." << std::endl; mathieu@2602: } mathieu@2602: else mathieu@2602: { mathieu@2602: std::cout << "Attributes defined for this type:" << std::endl; mathieu@2602: PrintAttributes (tid, std::cout); mathieu@2602: } mathieu@2602: bool hasAttributesInParent = false; mathieu@2602: TypeId tmp = tid.GetParent (); mathieu@2602: while (tmp.GetParent () != tmp) mathieu@2602: { mathieu@2693: if (tmp.GetAttributeN () != 0) mathieu@2602: { mathieu@2602: hasAttributesInParent = true; mathieu@2602: } mathieu@2602: tmp = tmp.GetParent (); mathieu@2602: } mathieu@2602: if (hasAttributesInParent) mathieu@2602: { mathieu@2602: std::cout << "Attributes defined in parent classes:
" << std::endl; mathieu@2602: tmp = tid.GetParent (); mathieu@2602: while (tmp.GetParent () != tmp) mathieu@2602: { mathieu@2693: if (tmp.GetAttributeN () != 0) mathieu@2602: { mathieu@2602: std::cout << tmp.GetName () << std::endl; mathieu@2602: PrintAttributes (tmp, std::cout); mathieu@2602: } mathieu@2602: tmp = tmp.GetParent (); mathieu@2602: } mathieu@2602: } mathieu@2602: std::cout << "*/" << std::endl; mathieu@2602: } mathieu@1368: mathieu@1853: mathieu@1368: return 0; mathieu@1368: }