[Insight-developers] doxygen warnings

Aljaz Noe noe@grasp.cis.upenn.edu
Fri, 12 Apr 2002 13:56:24 -0400


Hi!

I've noticed a lot of doxygen warnings in both FEM and other files. Since
we'll have to rewrite the whole FEM library in the near future, it would be
nice to know how to correct for these warnings as well.

Typical warning from the FEM code:
------------------------------

/mounts/raid/projects/Insight/Testing/Insight/Code/Numerics/FEM/itkFEMElemen
tBar2D.cxx:43: Warning: @{ may only be used in a group block!


<<itkFEMElementBar2D.cxx>>
...
/**
 * Construct a Bar2D element by specifying two nodes and material
propertites
 */
Bar2D::Bar2D( Node::ConstPointer n1_, Node::ConstPointer n2_,
Material::ConstPointer const mat_ )
{
 /**
<<line 43>>   * Initialize the pointers to nodes and check that
   * we were given the pointers to the right node class.
   * if the node class was incorrect a bad_cast exception is thrown
   */
  try
  {
    m_node[0]=&dynamic_cast<const NodeXY&>(*n1_);
    m_node[1]=&dynamic_cast<const NodeXY&>(*n2_);
    m_mat=&dynamic_cast<const MaterialStandard&>(*mat_);
  }
  catch ( std::bad_cast )
  {
    throw FEMExceptionWrongClass(__FILE__,__LINE__,"Bar2D::Bar2D()");
  }

}
...

------------------------------

/mounts/raid/projects/Insight/Testing/Insight/Code/Numerics/FEM/itkFEMLoadGr
av.h:66: Warning: end of group without matching begin.



<<itkFEMLoadGrav.h>>
...
/**
 * \class LoadGravConst
 * \brief Constant gravity load class.
 *
 * This is a special case of LoadGrav. The load vector is the same on
 * every point in space.
 */
class LoadGravConst : public LoadGrav
{
FEM_CLASS(LoadGravConst,LoadGrav)
public:
  vnl_vector<Float> Fg_value;
  virtual vnl_vector<Float> Fg(vnl_vector<Float>) {
    return Fg_value;
  };
<<line 66>>
  /**
   * Read an object from input stream.
   */
  virtual void Read( std::istream& f, void* info );

  /**
   * Write an object to the output stream
   */
  virtual void Write( std::ostream& f, int ofid ) const;

};

-------------------------------

It looks like the perl script, which does the preprocessing, sometimes gets
stuck on doxygen comments (/**). I don't know, however, what is the real
cause and what is the proper way to correct the problem.

Aljaz