utils/print-introspected-doxygen.cc
changeset 2971 75780f899be3
parent 2969 9d05d2a95dfa
child 2989 b7eb3929096c
equal deleted inserted replaced
2970:0384d6f6cca1 2971:75780f899be3
    17   for (uint32_t j = 0; j < tid.GetAttributeN (); j++)
    17   for (uint32_t j = 0; j < tid.GetAttributeN (); j++)
    18     {
    18     {
    19       os << "<li><b>" << tid.GetAttributeName (j) << "</b>: "
    19       os << "<li><b>" << tid.GetAttributeName (j) << "</b>: "
    20 		<< tid.GetAttributeHelp (j) << std::endl;
    20 		<< tid.GetAttributeHelp (j) << std::endl;
    21       Ptr<const AttributeChecker> checker = tid.GetAttributeChecker (j);
    21       Ptr<const AttributeChecker> checker = tid.GetAttributeChecker (j);
    22       os << "  <ul>" << std::endl << "    <li>Set with class: \\ref " 
    22       os << "  <ul>" << std::endl 
    23 	 <<  checker->GetValueTypeName () << "</li>" << std::endl;
    23 	 << "    <li>Set with class: \\ref " <<  checker->GetValueTypeName () << "</li>" << std::endl;
    24       if (checker->HasUnderlyingTypeInformation ())
    24       if (checker->HasUnderlyingTypeInformation ())
    25 	{
    25 	{
    26 	  os << "    <li>Underlying type: \\ref " << checker->GetUnderlyingTypeInformation () << "</li>" << std::endl;
    26 	  os << "    <li>Underlying type: \\ref " << checker->GetUnderlyingTypeInformation () << "</li>" << std::endl;
    27 	}
    27 	}
    28       uint32_t flags = tid.GetAttributeFlags (j);
    28       uint32_t flags = tid.GetAttributeFlags (j);
    29       Ptr<const AttributeAccessor> accessor = tid.GetAttributeAccessor (j);
    29       Ptr<const AttributeAccessor> accessor = tid.GetAttributeAccessor (j);
       
    30       if (flags & TypeId::ATTR_CONSTRUCT && accessor->HasSetter ())
       
    31 	{
       
    32 	  Ptr<const AttributeValue> initial = tid.GetAttributeInitialValue (j);
       
    33 	  os << "    <li>Initial value: " << initial->SerializeToString (checker) << "</li>" << std::endl;
       
    34 	}
    30       os << "    <li>Flags: ";
    35       os << "    <li>Flags: ";
       
    36       if (flags & TypeId::ATTR_CONSTRUCT && accessor->HasSetter ())
       
    37 	{
       
    38 	  os << "construct ";
       
    39 	}
    31       if (flags & TypeId::ATTR_SET && accessor->HasSetter ())
    40       if (flags & TypeId::ATTR_SET && accessor->HasSetter ())
    32 	{
    41 	{
    33 	  os << "write ";
    42 	  os << "write ";
    34 	}
    43 	}
    35       if (flags & TypeId::ATTR_GET && accessor->HasGetter ())
    44       if (flags & TypeId::ATTR_GET && accessor->HasGetter ())
    36 	{
    45 	{
    37 	  os << "read ";
    46 	  os << "read ";
    38 	}
       
    39       if (flags & TypeId::ATTR_CONSTRUCT && accessor->HasSetter ())
       
    40 	{
       
    41 	  os << "construct ";
       
    42 	}
    47 	}
    43       os << "</li>" << std::endl;
    48       os << "</li>" << std::endl;
    44       os << "  </ul> " << std::endl;
    49       os << "  </ul> " << std::endl;
    45       
    50       
    46     }
    51     }
   270 	    }
   275 	    }
   271 	  std::cout << "</ul>" << std::endl;
   276 	  std::cout << "</ul>" << std::endl;
   272 	}
   277 	}
   273       if (tid.GetAttributeN () == 0)
   278       if (tid.GetAttributeN () == 0)
   274 	{
   279 	{
   275 	  std::cout << "No Attributes defined for this type." << std::endl;
   280 	  std::cout << "No Attributes defined for this type.<br>" << std::endl;
   276 	}
   281 	}
   277       else
   282       else
   278 	{
   283 	{
   279 	  std::cout << "Attributes defined for this type:" << std::endl;
   284 	  std::cout << "Attributes defined for this type:<br>" << std::endl;
   280 	  PrintAttributes (tid, std::cout);
   285 	  PrintAttributes (tid, std::cout);
   281 	}
   286 	}
   282       {
   287       {
   283 	TypeId tmp = tid.GetParent ();
   288 	TypeId tmp = tid.GetParent ();
   284 	while (tmp.GetParent () != tmp)
   289 	while (tmp.GetParent () != tmp)
   291 	    tmp = tmp.GetParent ();
   296 	    tmp = tmp.GetParent ();
   292 	  }
   297 	  }
   293       }
   298       }
   294       if (tid.GetTraceSourceN () == 0)
   299       if (tid.GetTraceSourceN () == 0)
   295 	{
   300 	{
   296 	  std::cout << "No TraceSources defined for this type." << std::endl;
   301 	  std::cout << "No TraceSources defined for this type.<br>" << std::endl;
   297 	}
   302 	}
   298       else
   303       else
   299 	{
   304 	{
   300 	  std::cout << "TraceSources defined for this type:" << std::endl;
   305 	  std::cout << "TraceSources defined for this type:<br>" << std::endl;
   301 	  PrintTraceSources (tid, std::cout);
   306 	  PrintTraceSources (tid, std::cout);
   302 	}
   307 	}
   303       {
   308       {
   304 	TypeId tmp = tid.GetParent ();
   309 	TypeId tmp = tid.GetParent ();
   305 	while (tmp.GetParent () != tmp)
   310 	while (tmp.GetParent () != tmp)