linking to convertion operators?

View: New views
3 Messages — Rating Filter:   Alert me  

linking to convertion operators?

by Simon Turner-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,
  I've just started using doxygen to improve my programming, and wow,
it helps a lot!  Specially with design issues (if you cant document
it, there's probably a design issue)!

  However, i ran into a few issues, i got a dirty work around but I'd
like to know the right way to do it.

##### EXAMPLE CODE #####
class A { };

class B {
public:
  operator A(){ ... }
};

/// some_other_func is used to convert Bs into As
/**
*  Long documentation of some_other_func here...
*  \see #B::operator A()
*/
void some_other_func(B* array_of_b){
  ...
}
##### EOF #####

In the above code I make a reference to the conversion operator A in
class B, the full name of this class member is "B::operator A()" which
has a space and causes doxygen to consider only the first part
"B::operator" and warns that it was unreferenced.
The best way i could acheive what I wanted was to add a custom \anchor
above the function and \ref that anchor name.  But it's not top
elegant...  is there a better way of linking to operator<space>X
(where X could be another type (conversion), or new/delete, etc...).

I'm not sure if this could complicate matters more if the type we
convert to is in another namespace like:
B::operator std::string( void );

Thanks for your help and suggestions! =)
  Simon

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Doxygen-users mailing list
Doxygen-users@...
https://lists.sourceforge.net/lists/listinfo/doxygen-users

Re: linking to convertion operators?

by Simon Turner-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just re-writting my example to make things clear and simple...

At some point I'd like to write something like this:

  \ref Geometry::Vertex::operator std::string()

To have a link to the Vertex class' std::string conversion operator.
But the doxygen code above will always produce:

  Warning: unable to resolve reference to `Geometry::Vertex::operator'
for \ref command

I've tried countless variations, aliases and nothing worked... is
there a way to escape the space between "operator" and the type so
\ref can read the whole thing?

Thanks for any help!
  Simon

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Doxygen-users mailing list
Doxygen-users@...
https://lists.sourceforge.net/lists/listinfo/doxygen-users

Re: linking to convertion operators?

by Simon Turner-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I've tried countless variations, aliases and nothing worked... is
> there a way to escape the space between "operator" and the type so
> \ref can read the whole thing?

OK I made some discoveries:

/**
Bad link to #Geometry::Vertex::operator std::string(void)
Bad link to #Geometry::Vertex::operator string(void)
Good link to #Geometry::Vertex::operator int(void)
*/

Seems like the "std::string" and "string" type conversion does not
work in this example.  The last one "operator int(void)" works top
shape, exactly as expected

This even though BUILTIN_STL_SUPPORT = YES while using doxygen 1.5.8.

Simon

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Doxygen-users mailing list
Doxygen-users@...
https://lists.sourceforge.net/lists/listinfo/doxygen-users