Added/fixed some doxygen
authorRaj Bhattacharjea <raj.b@gatech.edu>
Fri, 11 May 2007 10:37:01 -0400
changeset 538 3cc417842b5f
parent 537 e8a4183dfe00
child 539 a59e11a8e2d9
child 600 fd944dbf33c6
Added/fixed some doxygen
doc/main.txt
src/applications/application.h
src/core/command-line.h
src/core/default-value.h
--- a/doc/main.txt	Mon May 07 12:01:51 2007 +0100
+++ b/doc/main.txt	Fri May 11 10:37:01 2007 -0400
@@ -19,6 +19,7 @@
  *    - a class to register regression tests with the test manager: ns3::Test and ns3::TestManager
  *    - debugging facilities: \ref debugging, \ref assert, \ref error
  *    - \ref randomvariable
+ *    - \ref config
  *    - a class to handle automatic deletion of multiple sets of objects of different types: 
  *      ns3::ObjectContainer
  *
--- a/src/applications/application.h	Mon May 07 12:01:51 2007 +0100
+++ b/src/applications/application.h	Fri May 11 10:37:01 2007 -0400
@@ -21,32 +21,6 @@
 #ifndef __APPLICATION_H__
 #define __APPLICATION_H__
 
-//
-// \brief The base class for all ns3 applicationes
-//
-// Class Application is the base class for all ns3 applications.
-// Applications are associated with individual nodes, and are created
-// using the AddApplication method in the ApplicationManager capability.
-// 
-// Conceptually, an application has zero or more Socket
-// objects associated with it, that are created using the Socket
-// creation API of the Kernel capability.  The Socket object
-// API is modeled after the
-// well-known BSD sockets interface, although it is somewhat 
-// simplified for use with ns3.  Further, any socket call that
-// would normally "block" in normal sockets will return immediately
-// in ns3.  A set of "upcalls" are defined that will be called when
-// the previous blocking call would normally exit.  THis is documented
-// in more detail Socket class in socket.h.
-// 
-// There is a second application class in ns3, called "ThreadedApplication"
-// that implements a true sockets interface, which should be used
-// when porting existing sockets code to ns3.  The true
-// sockets approach is significantly
-// less memory--efficient using private stacks for each defined application,
-// so that approach should be used with care.  The design and implementation
-// of the ThreadedApplication are still being discussed.
-
 #include "ns3/event-id.h"
 #include "ns3/nstime.h"
 #include "ns3/object.h"
@@ -56,6 +30,32 @@
 class Node;
 class RandomVariable;
   
+/**
+ * \brief The base class for all ns3 applicationes
+ * 
+ * Class Application is the base class for all ns3 applications.
+ * Applications are associated with individual nodes, and are created
+ * using the AddApplication method in the ApplicationManager capability.
+ * 
+ * Conceptually, an application has zero or more Socket
+ * objects associated with it, that are created using the Socket
+ * creation API of the Kernel capability.  The Socket object
+ * API is modeled after the
+ * well-known BSD sockets interface, although it is somewhat 
+ * simplified for use with ns3.  Further, any socket call that
+ * would normally "block" in normal sockets will return immediately
+ * in ns3.  A set of "upcalls" are defined that will be called when
+ * the previous blocking call would normally exit.  THis is documented
+ * in more detail Socket class in socket.h.
+ * 
+ * There is a second application class in ns3, called "ThreadedApplication"
+ * that implements a true sockets interface, which should be used
+ * when porting existing sockets code to ns3.  The true
+ * sockets approach is significantly
+ * less memory--efficient using private stacks for each defined application,
+ * so that approach should be used with care.  The design and implementation
+ * of the ThreadedApplication are still being discussed.
+ */
 class Application : public Object
 {
 public:
@@ -66,43 +66,60 @@
   
   virtual Application* Copy() const = 0; // All applications must provide
   
-  // \brief Specify application start time
-  // Applications start at various times in the simulation scenario.
-  // The Start method specifies when the application should be
-  // started.  The application subclasses should override the
-  // private "StartApplication" method defined below, which is called at the
-  // time specified, to cause the application to begin.
-  // \param Start time for this application, relative to the
-  // current simulation time.
+  /**
+   * \brief Specify application start time
+   *
+   * Applications start at various times in the simulation scenario.
+   * The Start method specifies when the application should be
+   * started.  The application subclasses should override the
+   * private "StartApplication" method defined below, which is called at the
+   * time specified, to cause the application to begin.
+   * \param Start time for this application, relative to the
+   * current simulation time.
+   */
   void Start(const Time&);
 
-  // \brief Same as above, but uses a random variable for start time
-  // The random variable returns the desired start time in units of
-  // Seconds.
+  /**
+   * \brief Same as above, but uses a random variable for start time
+   *
+   * The random variable returns the desired start time in units of
+   * Seconds.
+   */
   
 void Start(const RandomVariable&);
   
-  // \brief Specify application stop time
-  // Once an application has started, it is sometimes useful
-  // to stop the application.  The Stop method specifies when an
-  // application is to stop.  The application subclasses should override
-  // the private StopApplication method defined below, to cause the application
-  // to stop.
-  // \param Stop time for this application, relative to the
-  // current simulation time.
+  /**
+   * \brief Specify application stop time
+   *
+   * Once an application has started, it is sometimes useful
+   * to stop the application.  The Stop method specifies when an
+   * application is to stop.  The application subclasses should override
+   * the private StopApplication method defined below, to cause the application
+   * to stop.
+   * \param Stop time for this application, relative to the
+   * current simulation time.
+   */
   void Stop(const Time&);
 
-  // \brief Same as above, but uses a random variable for stop time
-  // The random variable returns the desired stop time in units of
-  // Seconds.
+  /**
+   * \brief Same as above, but uses a random variable for stop time
+   *
+   * The random variable returns the desired stop time in units of
+   * Seconds.
+   */
   void Stop(const RandomVariable&);
   
-  // \brief Attaches an application to a specific node
-  // Specifies which node object this application is associated with.
-  // \param Node object to associate with this application.
+  /**
+   * \brief Attaches an application to a specific node
+   *
+   * Specifies which node object this application is associated with.
+   * \param Node object to associate with this application.
+   */
   void SetNode(Node *);
 
-  // \brief Returns the pointer to the attached node.
+  /**
+   * \brief Returns the pointer to the attached node.
+   */
   Node* PeekNode() const;
   
   // Members
--- a/src/core/command-line.h	Mon May 07 12:01:51 2007 +0100
+++ b/src/core/command-line.h	Fri May 11 10:37:01 2007 -0400
@@ -8,16 +8,48 @@
 
 namespace ns3 {
 
+/**
+ * \brief Command line argument processing class
+ * \ingroup config
+ *
+ * Often times in simulations, the user will want the ability to change and
+ * tweak simulation parameters without having to recompile the entire 
+ * simulation.  This can be done by passing arguments in from the command
+ * line invocation of a simulation.
+ * This class is a collection of static functions to aid in this facility.
+ * By using it, users get the automatic things like support for --help command
+ * line arguments.  See samples/main-default-value.cc for more info.
+ */
 class CommandLine
 {
 public:
+  /**
+   * \brief Add a command line argument to the system
+   * \param name Name of the string to expect on the command line
+   * \param help A help string for this param, displayed --help is used.
+   * \param value The desination to store the value read from the command line
+   */
   template <typename T>
   static void AddArgValue (const std::string &name,
 			   const std::string &help, 
 			   T &value);
+  /**
+   * \brief Add a command line triggered function call to the system
+   * \param name Name of the string to expect on the command line
+   * \param help A help string for this param, displayed --help is used.
+   * \param value An ns3::Callback that gets called if name is present as a
+   * commandline argument.
+   */
   static void AddArgCommand (const std::string &name,
 			     const std::string &help,
 			     Callback<void> cb);
+  /**
+   * \brief Parse the command line for arguments thus far added
+   * \param argc Number of strings on the command line; pass this directly from
+   * the first argument of your main(int,char**) function 
+   * \param argv Array of strings passed in as arguments; pass this directly from
+   * the second argument of your main(int,char**) function
+   */
   static void Parse (int argc, char *argv[]);
  private:
   template <typename T>
--- a/src/core/default-value.h	Mon May 07 12:01:51 2007 +0100
+++ b/src/core/default-value.h	Fri May 11 10:37:01 2007 -0400
@@ -6,6 +6,11 @@
 #include <list>
 #include "callback.h"
 
+/**
+ * \defgroup config Simulation configuration
+ *
+ */
+
 namespace ns3 {
 
 class DefaultValueBase
@@ -45,6 +50,7 @@
 };
 
 /**
+ * \ingroup config
  * \param name name of variable to bind
  * \param value value to bind to the specified variable
  *
@@ -58,6 +64,7 @@
 
 /**
  * \brief A Boolean variable for ns3::Bind
+ * \ingroup config
  *
  * Every instance of this type is automatically 
  * registered in the variable pool which is used
@@ -95,6 +102,7 @@
 
 /**
  * \brief An Integer variable for ns3::Bind
+ * \ingroup config
  *
  * Every instance of this type is automatically 
  * registered in the variable pool which is used
@@ -147,6 +155,14 @@
   T m_value;
 };
 
+/**
+ * \brief Named enumeration defaults
+ * \ingroup config
+ *
+ * Every instance of this type is automatically 
+ * registered in the variable pool which is used
+ * by ns3::Bind. 
+ */
 class StringEnumDefaultValue : public DefaultValueBase
 {
 public:
@@ -168,6 +184,7 @@
 
 /**
  * \brief An enum variable for ns3::Bind
+ * \ingroup config
  *
  * Every instance of this type is automatically 
  * registered in the variable pool which is used
@@ -232,6 +249,11 @@
   T m_value;
 };
 
+/**
+ * \brief Class used to call a certain function during the configuration of the
+ * simulation
+ * \ingroup config
+ */
 class CommandDefaultValue : public DefaultValueBase
 {
 public: