Contents Previous Next

Classes, Structures, and Unions

Each class, structure, and union must have a comment block immediately before the definition, and each member must be documented in accordance with the function and variable documentation requirements, as follows:

    /*
     * This structure is for foobar options.
     */
    struct this_struct_s
    {
      int this_member;   /* Current state for this */
      int that_member;   /* Current state for that */
    };

    /*
     * This class is for barfoo options.
     */
    class this_class_c
    {
      int this_member;   /* Current state for this */
      int that_member;   /* Current state for that */

      /*
       * 'get_this()' - Get the current state for this.
       */
      int                /* O - Current state for this */
      get_this()
      {
        return (this_member);
      }
    };

Contents Previous Next