Skip to topic | Skip to bottom
Home
TModeling
TModeling.CommentingClassesr1.1 - 19 Jun 2008 - 12:05 - Main.guesttopic end

Start of topic | Skip to actions
Commenting Classes
  • Describe the design approach to the class
  • Describe limitations, usage assumptions, and so on
  • Comment the class interface, can someone easily understand how to use the class without actually looking at the implementation
  • Don't document implementation details in the class interface

   Here is an example:

   /*-------------------------------------
     Class Declarations
   -------------------------------------*/

   /*-------------------------------------------------------
     Class:  PerfTimer
     Desc:   Simple Performance Timer
     Notes:   
       1. Wrapper around WIN32 QueryPerformanceCounter() 
          API function.
     Usage:
       Create PerfTimer variable 
       wrap code to be timed with calls to start()/stop()
       call Dump() to display results to user.
   -------------------------------------------------------*/


-- Main.ShawnDB - 16 Jun 2008

to top

You are here: TModeling > Software > CodeGuide > StyleGuide > Comments > CommentingClasses

to top

Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback