utils/print-introspected-doxygen.cc
changeset 2945 8e9f4dc59d8b
parent 2944 d8806baadedb
child 2951 2a3db8645225
     1.1 --- a/utils/print-introspected-doxygen.cc	Thu Apr 10 11:50:47 2008 -0700
     1.2 +++ b/utils/print-introspected-doxygen.cc	Thu Apr 10 12:24:36 2008 -0700
     1.3 @@ -46,6 +46,21 @@
     1.4    os << "</ul>" << std::endl;
     1.5  }
     1.6  
     1.7 +void
     1.8 +PrintTraceSources (TypeId tid, std::ostream &os)
     1.9 +{
    1.10 +  os << "<ul>"<<std::endl;
    1.11 +  for (uint32_t i = 0; i < tid.GetTraceSourceN (); ++i)
    1.12 +    {
    1.13 +      os << "<li><b>" << tid.GetTraceSourceName (i) << "</b>: "
    1.14 +	 << tid.GetTraceSourceHelp (i)
    1.15 +	 << std::endl;
    1.16 +      os << "</li>" << std::endl;
    1.17 +    }
    1.18 +  os << "</ul>"<<std::endl;
    1.19 +}
    1.20 +
    1.21 +
    1.22  class StaticInformation
    1.23  {
    1.24  public:
    1.25 @@ -263,29 +278,39 @@
    1.26  	  std::cout << "Attributes defined for this type:" << std::endl;
    1.27  	  PrintAttributes (tid, std::cout);
    1.28  	}
    1.29 -      bool hasAttributesInParent = false;
    1.30 -      TypeId tmp = tid.GetParent ();
    1.31 -      while (tmp.GetParent () != tmp)
    1.32 +      {
    1.33 +	TypeId tmp = tid.GetParent ();
    1.34 +	while (tmp.GetParent () != tmp)
    1.35 +	  {
    1.36 +	    if (tmp.GetAttributeN () != 0)
    1.37 +	      {
    1.38 +		std::cout << "Attributes defined in parent class " << tmp.GetName () << ":<br>" << std::endl;
    1.39 +		PrintAttributes (tmp, std::cout);
    1.40 +	      }
    1.41 +	    tmp = tmp.GetParent ();
    1.42 +	  }
    1.43 +      }
    1.44 +      if (tid.GetTraceSourceN () == 0)
    1.45  	{
    1.46 -	  if (tmp.GetAttributeN () != 0)
    1.47 -	    {
    1.48 -	      hasAttributesInParent = true;
    1.49 -	    }
    1.50 -	  tmp = tmp.GetParent ();
    1.51 +	  std::cout << "No TraceSources defined for this type." << std::endl;
    1.52  	}
    1.53 -      if (hasAttributesInParent)
    1.54 +      else
    1.55  	{
    1.56 -	  tmp = tid.GetParent ();
    1.57 -	  while (tmp.GetParent () != tmp)
    1.58 -	    {
    1.59 -	      if (tmp.GetAttributeN () != 0)
    1.60 -		{
    1.61 -		  std::cout << "Attributes defined in parent class " << tmp.GetName () << ":<br>" << std::endl;
    1.62 -		  PrintAttributes (tmp, std::cout);
    1.63 -		}
    1.64 -	      tmp = tmp.GetParent ();
    1.65 -	    }
    1.66 +	  std::cout << "TraceSources defined for this type:" << std::endl;
    1.67 +	  PrintTraceSources (tid, std::cout);
    1.68  	}
    1.69 +      {
    1.70 +	TypeId tmp = tid.GetParent ();
    1.71 +	while (tmp.GetParent () != tmp)
    1.72 +	  {
    1.73 +	    if (tmp.GetTraceSourceN () != 0)
    1.74 +	      {
    1.75 +		std::cout << "TraceSources defined in parent class " << tmp.GetName () << ":<br>" << std::endl;
    1.76 +		PrintTraceSources (tmp, std::cout);
    1.77 +	      }
    1.78 +	    tmp = tmp.GetParent ();
    1.79 +	  }
    1.80 +      }
    1.81        std::cout << "*/" << std::endl;
    1.82      }
    1.83