Search code examples
cocoadocumentationdoxygennsmanagedobject

Documenting autogenerated code (NSManageObjects) with Doxygen


Im about to documentate a library I have that uses NSManageObjects using Doxygen. Since NSManageObjects are autogenerated from the data model, if I change something in the model, the file containing the modified managedobject is going to be generated again.

I don´t want to rewrite documentation everytime a change is made in the model.

Do you know any way to accomplish this?

Thanks.


Solution

  • I found out how to achieve it. Doxygen allow you to document classes from other files. There is no need to do it in the .h.

    Doxygen parses the .h file and he creates the documentation skeleton for that class. Then you can add documentation from any other custom file.

    The problem is that you have to manually specify some labels in order to link the information from the .doc file with the class declared in the .h file.

    Please see: Doxygen documentation at other places

    and this: Properties not being documented

    Should be enough to get an idea of how I did managed to do it.