How to add comment support?

Help
tangxinfa
2009-06-02
2013-06-05
  • tangxinfa
    tangxinfa
    2009-06-02

    I want to add a comment field for every object, such as class, member function and member variable, when i dump a class object it will display like bellow:
        class person
        {"type":"class", "name":"person", "comment" : "comment of class person"}
        {
            ...
            //properties:
            {"type":"string", "name":"name", "comment" : "name of a person"}
            {"type":"int", "name":"age", "comment" : "age of a person"}
        }
       
    the comment support is useful when i want to mark a class is serializable, and then generate serializer method for that class, a example c++ header file:

    /// login message, it is marked as serializable.
    /// @serializable
    class login
    {
         string name;         /**< name */
         string password;  /**< password */
    };
       

     
    • Currently CppHeaderParser.py does not support parsing comments.  I will add it to the wishlist.  Keep your eyes open for a future release.

       
  • Please try version 1.8.  It parses doxygen comments and creates a key called "doxygen"