0

I'm using doxygen for my C++ project document generation. I would like to delete some redundant API, and I would like to keep these APIs in header file and document, deleting thei implementation, and how can I use doxygen command, to mark these APIs as deleted? (I would not like to use deprecated).

ChrisZZ
  • 1,521
  • 2
  • 17
  • 24
  • 1
    Keeping the header file and document but deleting the implementation shouldn't work - how do you expect it to compile with no implementation, and what do you expect to happen to legacy code that uses those functions? If there is no legacy code, delete them from the header and documentation. Otherwise, `deprecated` is the warning you should give *in advance* to allow the legacy code to be modified to remove them, at which point you delete them *entirely from everything* in a subsequent version. – Ken White Sep 24 '21 at 01:51
  • You could move the obsolete include files into a separate *obsolete* directory that is in DOxygen's file-path but not in the include-path of your compiler, and update the DOxygen comments of the obsolete include files to say that they are obsolete/deleted/whatever. – Jeremy Friesner Sep 24 '21 at 01:56
  • @KenWhite Ok let me provide more details. There are several overloaded functions, I would like to delete one of them, and mark it as obsolete. Just wonder there is not `@obsolete` in doxygen and wonder if there's alternative. Legacy code that depends on the will-be-deleted function, can use other overloaded version, that was what I thought. – ChrisZZ Sep 24 '21 at 02:00
  • @JeremyFriesner I think you provide a good engineer practice. Since what I would like to delete/obsolete is a function, instead of a class member function, it is ok to do as you described. – ChrisZZ Sep 24 '21 at 02:01
  • @ChrisZZ some quick testing suggests that it would work even for class member functions, since if DOxygen finds the same class declared in two separate files, it combines the DOxygen documentation from both files into its output. – Jeremy Friesner Sep 24 '21 at 02:07
  • Which version of doxygen are you using? Can you give a small example? – albert Sep 24 '21 at 08:12
  • In the detailed description of the `delete`d function doygen does signal that the function has been `delete`d. – albert Sep 24 '21 at 09:51
  • @albert I'm using doxygen 1.9.2. Actually I search the word `delete` in doxygen documente page https://www.doxygen.nl/manual/commands.html but didn't find it. I'm not get the point that mentioned `delete`, does it mean `@delete` mark or something else? – ChrisZZ Sep 24 '21 at 11:15

2 Answers2

0

Not an answer, but to big for a comment and some images are included:

When I use some code from doxygen I see e.g. at 2 places the word delete:

enter image description here

This is the word delete that is also in the .h file (that it is pink is due to the fact that I searched for delete).

Furthermore at the right of the detailed description I see the word delete:

enter image description here

albert
  • 8,285
  • 3
  • 19
  • 32
0

The delete keyword in C++ is used to mark implicitly created default constructors and operators as deleted, telling the compiler to not create them automatically. see reference documentation This keyword has nothing to do with marking API as deleted in doxygen