// -*- C++ -*-

/**********************************************************************

  Sample C++ header file for the cce system

  Process this and example.cc with

     % cceExtHtml example.{cc,h}

**********************************************************************/

/**********************************************************************

  A one-line synopsis of this base class.

  @Description

    This should be a longer (multi-line) description of the class.
    This is where you should describe the contents of the class, its
    intended use, and anything else a user of the class might want to
    know.  <P>

    HTML tags, including things like
    <A HREF="http://www.eecs.berkeley.edu/~sedwards/cce">hyperlinks to
    the cce home page</A>, may be included in this field. <P>

    The default meaning of a comment is a one-line synopsis of the
    item following it, such as a class declaration or a method
    definition.  Other fields, a list of which can be obtained by
    running <TT>cceExtHtml --fields</TT>, are denoted by a field name
    starting with an at-sign.  All fields are optional.

  @Revision 1.1

  @Updated 7 March 1997

  @Author Stephen Edwards

**********************************************************************/
class Base {
public:
  Base() {}
  ~Base() {}

  /**********
    Do something

    @Description  The synopsis for a method should be an action
    sentence, e.g., "Compute today's date," instead of the more
    wishy-washy "This method computes today's date." <P>

    Since this method is defined (rather than just declared) in the
    header file, its comments should appear in the header file

    @Returns a value indicating whether it was possible to do
    something

    @SideEffects something happens.  (This field should only be
    included if invoking the method has some side effects.)

   **********/
  virtual int something(int a, int & b, char c[]) { return 1; } 

  // Do something else
  //
  // @Description The C++ single-line comment syntax also works and allows
  //   multi-line fields
  //
  // @Returns the sum of two and three
  int somethingElse() { return 2 + 3; }

  // Do nothing
  void doNothing( int a /* A commented argument */,
		  int b /* These comments <EM>follow</EM> their arguments */,
		  int c /* and precede the comma immediately following */) {}

  // The temperature of the base
  float temp;

protected:
  // This comment is overridden by the comment in the .cc file.
  // The rule is that definitions take precedent over declarations
  int getDate();

private:

};

/**********************************************************************

  A derived class

  @Description  <TT>cceExtHtml</TT> builds a list for each class that
  indicate which class(es) it was derived from, and which classes
  derive from it. <P>

  It also lists the class members in <EM>all</EM> classes it inherits
  from, truly showing all members of each class.

**********************************************************************/
class Derived : public Base
{
public:
  // The overridden constructor
  Derived() { }

  // The overridden destructor
  ~Derived() { }

  int something(int, int &, char c[]);
};

