RE: [Doxygen-users] Documenting IDL
Brought to you by:
dimitri
|
From: Victor A. W. Jr. <va...@ru...> - 2001-05-08 11:19:23
|
Slightly off topic (maybe this is C++ style):
Is there some reason you chose to write IsValid() rather than overloading a
conversion to void*:
operator void*() {return static_cast<void*>(IsValid());}
would suffice.
Then you could write (like the 'real pointer' you're emulating:
ThingPtr fred;
.
.
.
if (fred)
fred->DoSomething();
similarly for operator !()
so you can write:
if (!fred)
blah....blah...
At Tuesday 2001/05/08 04:02, you wrote:
> > -----Original Message-----
> > From: dox...@li...
> > [mailto:dox...@li...]On Behalf Of Dale
> > Ogilvie
> > Sent: 08 May 2001 06:27
> > To: 'dox...@li...'
> > Subject: [Doxygen-users] Documenting IDL
>[deleted]
>There is a problem though - many "smart-pointer" classes also declare
>their own
>methods: quick example, I have a ref counting pointer that declares
>IsValid() to
>check for whatever-the-condition-is-that-corresponds-to-a-non-null-pointer:
>
> ThingPtr fred;
> ..blah..
> if (fred.IsValid())
> fred->DoSomething();
>
>[I have less trivial methods on some pseudo-pointer classes as well]
>
>So if you convert from ThingPtr to Thing every time there is the risk of the
>documentation's reader missing out on the other methods of ThingPtr.
>
>Regards,
>Stephen Goudge
>
>
>_______________________________________________
>Doxygen-users mailing list
>Dox...@li...
>http://lists.sourceforge.net/lists/listinfo/doxygen-users
Victor A. Wagner, Jr.
PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
The five most dangerous words in the English language:
"There oughta be a law"
|