diff --git a/doc/manual/source/documentation.rst b/doc/manual/source/documentation.rst index 072e0802c..0437b67d6 100644 --- a/doc/manual/source/documentation.rst +++ b/doc/manual/source/documentation.rst @@ -302,8 +302,11 @@ The preferred style for Doxygen comments is the JavaDoc style:: * \note Note any limitations or gotchas. * * (For functions with arguments or return valued:) - * \param foo Brief noun phrase describing this argument. - * \param bar Note Sentence case, and terminating period. + * \param [in] foo Brief noun phrase describing this argument. Note + * that we indicate if the argument is input, + * output, or both. + * \param [in,out] bar Note Sentence case, and terminating period. + * \param [in] baz Indicate boolean values with \c true or \c false. * \return Brief noun phrase describing the value. * * \internal @@ -312,7 +315,7 @@ The preferred style for Doxygen comments is the JavaDoc style:: * Understanding this material shouldn't be necessary to using * the class or method. */ - class Example + void ExampleFunction (const int foo, double & bar, const bool baz); In this style the Doxygen comment block begins with two \`*' characters: ``/**``, and precedes the item being documented. @@ -531,7 +534,7 @@ usage for |ns3|. The symbol ``foo`` is how other items can add themselves to this group. The string following that will be the title for the group. Any futher - text will be the detailed descriptionf for the group page. + text will be the detailed description for the group page. * Document each file, assigning it to the relevant group. In a header file:: @@ -579,7 +582,7 @@ usage for |ns3|. * ``\RFC{301}`` will create a link to RFC 301. -* Document the direction of function arguments with ``\param [in]``, _etc_. +* Document the direction of function arguments with ``\param [in]``, *etc*. The allowed values of the direction token are ``[in]``, ``[out]``, and ``[in,out]`` (note the explicit square brackets), as discussed in the Doxygen docs for ``\param``. @@ -590,7 +593,13 @@ usage for |ns3|. * For template arguments, indicate if they will be deduced or must be given explicitly:: - template void Function (U a); + /** + * A templated function. + * \tparam T \explicit The return type. + * \tparam U \deduced The argument type. + * \param [in] a The argument. + */ + template T Function (U a); * Use ``\tparam U \deduced`` because the type ``U`` can be deduced at the site where the template is invoked. Basically deduction can only diff --git a/src/core/model/abort.h b/src/core/model/abort.h index 49e1bc296..600ed9f6a 100644 --- a/src/core/model/abort.h +++ b/src/core/model/abort.h @@ -34,7 +34,7 @@ * * \brief Unconditional abnormal program termination with a message. * - * \param msg The message to output when this macro is hit. + * \param [in] msg The message to output when this macro is hit. * * This macro is essentially equivalent to NS_FATAL_ERROR, * except it prepends the error message with the string @@ -59,7 +59,7 @@ * * \brief Abnormal program termination if a condition is \c true. * - * \param cond The condition to be evaluated. + * \param [in] cond The condition to be evaluated. * * This is similar to \c NS_ASSERT(!(cond)), except this check * is enabled in all builds. If \c cond is evaluated to \c true, @@ -89,8 +89,8 @@ * \brief Abnormal program termination if a condition is \c true, * with a message. * - * \param cond The ondition to be evaluated. - * \param msg The message to output when cond is \c true. + * \param [in] cond The condition to be evaluated. + * \param [in] msg The message to output when cond is \c true. * * This is similar to NS_ASSERT_MSG(!(cond)), except this * check is enabled in all builds. If \c cond is evaluated to @@ -119,7 +119,7 @@ * * \brief Abnormal program termination if a condition is \c false. * - * \param cond The condition to be evaluated. + * \param [in] cond The condition to be evaluated. * * This is an alias for NS_ABORT_IF(!(cond)) * @@ -134,8 +134,8 @@ * \brief Abnormal program termination if a condition is \c false, * with a message. * - * \param cond Thecondition to be evaluated. - * \param msg The message to output if cond is false. + * \param [in] cond The condition to be evaluated. + * \param [in] msg The message to output if cond is false. * * This is an alias for NS_ABORT_MSG_IF(!(cond)) * diff --git a/src/core/model/assert.h b/src/core/model/assert.h index 22c25d818..e618b7b55 100644 --- a/src/core/model/assert.h +++ b/src/core/model/assert.h @@ -62,7 +62,7 @@ * true, the program prints the source file, line number and * unverified condition and halts by calling std::terminate * - * \param condition condition to verify. + * \param [in] condition Condition to verify. */ #define NS_ASSERT(condition) \ do \ @@ -84,8 +84,8 @@ * true, the program prints the message to output and * halts by calling std::terminate. * - * \param condition condition to verify. - * \param message message to output + * \param [in] condition Condition to verify. + * \param [in] message Message to output */ #define NS_ASSERT_MSG(condition, message) \ do \ diff --git a/src/core/model/attribute-accessor-helper.h b/src/core/model/attribute-accessor-helper.h index 025251253..7487e9898 100644 --- a/src/core/model/attribute-accessor-helper.h +++ b/src/core/model/attribute-accessor-helper.h @@ -62,7 +62,7 @@ namespace ns3 { * as "MakeAccessor" * \tparam T1 \deduced The type of the class data member, * or the type of the class get functor or set method. - * \param a1 The address of the data member, + * \param [in] a1 The address of the data member, * or the get or set method. * \returns The AttributeAccessor */ @@ -107,8 +107,8 @@ MakeAccessorHelper (T1 a1); * or the type of the class get functor or set method. * * \tparam T2 \deduced The type of the getter class functor method. - * \param a2 The address of the class method to set the attribute. - * \param a1 The address of the data member, + * \param [in] a2 The address of the class method to set the attribute. + * \param [in] a1 The address of the data member, * or the get or set method. * \returns The AttributeAccessor */ @@ -170,8 +170,8 @@ public: * * Forwards to DoSet method. * - * \param object Generic object pointer, to upcast to \p T. - * \param val Generic AttributeValue, to upcast to \p U. + * \param [in] object Generic object pointer, to upcast to \p T. + * \param [in] val Generic AttributeValue, to upcast to \p U. * \returns true if the member was set successfully. */ virtual bool Set (ObjectBase * object, const AttributeValue & val) const { @@ -196,8 +196,8 @@ public: * * Forwards to DoGet method. * - * \param object Generic object pointer, to upcast to \p T. - * \param val Generic AttributeValue, to upcast to \p U. + * \param [out] object Generic object pointer, to upcast to \p T. + * \param [out] val Generic AttributeValue, to upcast to \p U. * \returns true if the member value could be retrieved successfully */ virtual bool Get (const ObjectBase * object, AttributeValue &val) const { @@ -219,8 +219,8 @@ private: * Setter implementation. * * \see Set() - * \param object The parent object holding the attribute. - * \param v The specific AttributeValue to set. + * \param [in] object The parent object holding the attribute. + * \param [in] v The specific AttributeValue to set. * \returns true if the member was set successfully. */ virtual bool DoSet (T *object, const U *v) const = 0; @@ -228,8 +228,8 @@ private: * Getter implementation. * * \see Get() - * \param object The parent object holding the attribute. - * \param v The specific AttributeValue to set. + * \param [out] object The parent object holding the attribute. + * \param [out] v The specific AttributeValue to set. * \returns true if the member value could be retrieved successfully */ virtual bool DoGet (const T *object, U *v) const = 0; @@ -246,7 +246,7 @@ private: * the Attribute. * \tparam T \deduced The class holding the data member. * \tparam U \deduced The type of the data member. - * \param memberVariable The address of the data member. + * \param [in] memberVariable The address of the data member. * \returns The AttributeAccessor. */ template @@ -260,7 +260,7 @@ DoMakeAccessorHelperOne (U T::*memberVariable) public: /* * Construct from a class data member address. - * \param memberVariable The class data member address. + * \param [in] memberVariable The class data member address. */ MemberVariable (U T::*memberVariable) : AccessorHelper (), @@ -303,7 +303,7 @@ private: * the Attribute. * \tparam T \deduced The class holding the get functor method. * \tparam U \deduced The return type of the get functor method. - * \param getter The address of the class get functor method. + * \param [in] getter The address of the class get functor method. * \returns The AttributeAccessor. */ template @@ -317,7 +317,7 @@ DoMakeAccessorHelperOne (U (T::*getter)(void) const) public: /* * Construct from a class get functor method. - * \param getter The class get functor method pointer. + * \param [in] getter The class get functor method pointer. */ MemberMethod (U (T::*getter)(void) const) : AccessorHelper (), @@ -353,7 +353,7 @@ private: * the Attribute. * \tparam T \deduced The class holding the set method. * \tparam U \deduced The argument type of the set method. - * \param setter The address of the class set method, returning void. + * \param [in] setter The address of the class set method, returning void. * \returns The AttributeAccessor. */ template @@ -367,7 +367,7 @@ DoMakeAccessorHelperOne (void (T::*setter)(U)) public: /* * Construct from a class set method. - * \param setter The class set method pointer. + * \param [in] setter The class set method pointer. */ MemberMethod (void (T::*setter)(U)) : AccessorHelper (), @@ -412,8 +412,8 @@ private: * \tparam T \deduced The class holding the functor methods. * \tparam U \deduced The argument type of the set method. * \tparam V \deduced The return type of the get functor method. - * \param setter The address of the class set method, returning void. - * \param getter The address of the class get functor method. + * \param [in] setter The address of the class set method, returning void. + * \param [in] getter The address of the class get functor method. * \returns The AttributeAccessor. */ template @@ -431,8 +431,8 @@ DoMakeAccessorHelperTwo (void (T::*setter)(U), public: /* * Construct from class get functor and set methods. - * \param setter The class set method pointer, returning void. - * \param getter The class get functor method pointer. + * \param [in] setter The class set method pointer, returning void. + * \param [in] getter The class get functor method pointer. */ MemberMethod (void (T::*setter)(U), V (T::*getter)(void) const) @@ -495,8 +495,8 @@ DoMakeAccessorHelperTwo (V (T::*getter)(void) const, * \tparam T \deduced The class holding the functor methods. * \tparam U \deduced The argument type of the set method. * \tparam V \deduced The return type of the get functor method. - * \param setter The address of the class set method, returning bool. - * \param getter The address of the class get functor method. + * \param [in] setter The address of the class set method, returning bool. + * \param [in] getter The address of the class get functor method. * \returns The AttributeAccessor. */ template @@ -514,8 +514,8 @@ DoMakeAccessorHelperTwo (bool (T::*setter)(U), public: /* * Construct from class get functor and set method, returning bool. - * \param setter The class set method pointer, returning bool. - * \param getter The class get functor method pointer. + * \param [in] setter The class set method pointer, returning bool. + * \param [in] getter The class get functor method pointer. */ MemberMethod (bool (T::*setter)(U), V (T::*getter)(void) const) diff --git a/src/core/model/attribute-helper.h b/src/core/model/attribute-helper.h index bd720080c..5507508d0 100644 --- a/src/core/model/attribute-helper.h +++ b/src/core/model/attribute-helper.h @@ -141,7 +141,7 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * Define the attribute accessor functions \c MakeTypeAccessor * for class \p type. * - * \param type the name of the class + * \param [in] type The name of the class * * This macro defines and generates the code for the implementation * of the \c MakeTypeAccessor template functions. This macro is typically @@ -167,8 +167,8 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * Declare the attribute value class \p \Value * for underlying class \p type. * - * \param type The underlying type name - * \param name The token to use in defining the accessor name. + * \param [in] type The underlying type name + * \param [in] name The token to use in defining the accessor name. * * This macro declares the class \c TypeValue associated with class \c type. * This macro is typically invoked in the class header file. @@ -207,7 +207,7 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * Declare the attribute value class \p \Value * for the class \p Name * - * \param Name the name of the class. + * \param [in] Name The name of the class. * * This macro declares the class \c NameValue associated to class \c Name. * This macro is typically invoked in the class header file. @@ -222,7 +222,7 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * Define the conversion operators class \p type and * Attribute instances. * - * \param type the name of the class + * \param [in] type The name of the class * * This macro defines the conversion operators for class \c type to and * from instances of type Attribute. @@ -239,7 +239,7 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * Declare the AttributeChecker class \p \Checker * and the \c MakeTypeChecker function for class \p type. * - * \param type the name of the class + * \param [in] type The name of the class * * This macro declares the \p \Checker class and the associated * \c MakeTypeChecker function. @@ -261,8 +261,8 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * the attribute value class \p \Value * of the underlying class \p type. * - * \param type The underlying type name - * \param name The token to use in defining the accessor name. + * \param [in] type The underlying type name + * \param [in] name The token to use in defining the accessor name. * * This macro implements the \p \Value class methods * (including the \p \Value::SerializeToString @@ -305,7 +305,7 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * Define the class methods belonging to * attribute value class \p \Value for class \p type. * - * \param type the name of the class. + * \param [in] type The name of the class. * * This macro implements the \p \Value class methods * (including the \p \Value::SerializeToString @@ -322,7 +322,7 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * * Define the \c MakeTypeChecker function for class \p type. * - * \param type the name of the class + * \param [in] type The name of the class * * This macro implements the \c MakeTypeChecker function. * @@ -339,8 +339,8 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * * Define the \c MakeTypeChecker function for class \p type. * - * \param type the name of the class. - * \param name the string name of the underlying type. + * \param [in] type The name of the class. + * \param [in] name The string name of the underlying type. * * This macro implements the \c MakeTypeChecker function * for class \p type. @@ -358,7 +358,7 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * * Declare the attribute value, accessor and checkers for class \p type * - * \param type the name of the class + * \param [in] type The name of the class * * This macro declares: * @@ -384,7 +384,7 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * * Define the attribute value, accessor and checkers for class \p type * - * \param type the name of the class + * \param [in] type The name of the class * * This macro implements * diff --git a/src/core/model/attribute.h b/src/core/model/attribute.h index 44b2f082c..695e57a57 100644 --- a/src/core/model/attribute.h +++ b/src/core/model/attribute.h @@ -76,8 +76,8 @@ public: */ virtual Ptr Copy (void) const = 0; /** - * \param checker the checker associated to the attribute - * \returns a string representation of this value. + * \param [in] checker The checker associated to the attribute + * \returns A string representation of this value. * * In most cases, this method will not make any use of the checker argument. * However, in a very limited set of cases, the checker argument is needed to @@ -86,8 +86,8 @@ public: */ virtual std::string SerializeToString (Ptr checker) const = 0; /** - * \param value a string representation of the value - * \param checker a pointer to the checker associated to the attribute. + * \param [in] value A string representation of the value + * \param [in] checker A pointer to the checker associated to the attribute. * \returns true if the input string was correctly-formatted and could be * successfully deserialized, false otherwise. * @@ -118,8 +118,8 @@ public: virtual ~AttributeAccessor (); /** - * \param object the object instance to set the value in - * \param value the value to set + * \param [in,out] object The object instance to set the value in + * \param [in] value The value to set * \returns true if the value could be set successfully, false otherwise. * * This method expects that the caller has checked that the input value is @@ -127,8 +127,8 @@ public: */ virtual bool Set (ObjectBase * object, const AttributeValue &value) const = 0; /** - * \param object the object instance to get the value from - * \param attribute a pointer to where the value should be set. + * \param [in,out] object The object instance to get the value from + * \param [out] attribute A pointer to where the value should be set. * \returns true if the value could be read successfully, and * stored in the input value, false otherwise. * @@ -173,12 +173,12 @@ public: * Create a valid value from the argument value, * or reinterpret the argument as a string. * - * \param value the AttributeValue to check + * \param [in] value The AttributeValue to check * \return Ptr to a valid value */ Ptr CreateValidValue (const AttributeValue &value) const; /** - * \param value a pointer to the value to check + * \param [in] value A pointer to the value to check * \returns true if the input value is both of the right type * and if its value is within the requested range. Returns * false otherwise. @@ -217,8 +217,8 @@ public: /** * Copy the source to the destination - * \param source source AttributeValue - * \param destination destination AttributeValue + * \param [in] source Source AttributeValue + * \param [out] destination Destination AttributeValue * \return true if copy was successful */ virtual bool Copy (const AttributeValue &source, AttributeValue &destination) const = 0; @@ -242,15 +242,15 @@ private: */ virtual Ptr Copy (void) const; /** - * \param checker the checker associated to the attribute + * \param [in] checker The checker associated to the attribute * \returns a string representation of this value. * * In the EmptyAttributeValue case, the string returned will be simply "" */ virtual std::string SerializeToString (Ptr checker) const; /** - * \param value a string representation of the value - * \param checker a pointer to the checker associated to the attribute. + * \param [in] value A string representation of the value + * \param [in] checker A pointer to the checker associated to the attribute. * \returns true if the input string was correctly-formatted and could be * successfully deserialized, false otherwise. * diff --git a/src/core/model/callback.h b/src/core/model/callback.h index 392e4976a..45764a63e 100644 --- a/src/core/model/callback.h +++ b/src/core/model/callback.h @@ -122,8 +122,8 @@ template struct CallbackTraits { /** - * \param p object pointer - * \return a reference to the object pointed to by p + * \param [in] p Object pointer + * \return A reference to the object pointed to by p */ static T & GetReference (T * const p) { @@ -144,8 +144,8 @@ public: /** * Equality test * - * \param other Callback Ptr - * \return true if we are equal + * \param [in] other Callback Ptr + * \return \c true if we are equal */ virtual bool IsEqual (Ptr other) const = 0; }; @@ -246,7 +246,7 @@ public: /** * Construct from a functor * - * \param functor the functor + * \param [in] functor The functor */ FunctorCallbackImpl (T const &functor) : m_functor (functor) {} @@ -260,99 +260,99 @@ public: return m_functor (); } /** - * \param a1 first argument + * \param [in] a1 First argument * \return Callback value */ R operator() (T1 a1) { return m_functor (a1); } /** - * \param a1 first argument - * \param a2 second argument + * \param [in] a1 First argument + * \param [in] a2 Second argument * \return Callback value */ R operator() (T1 a1,T2 a2) { return m_functor (a1,a2); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3) { return m_functor (a1,a2,a3); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4) { return m_functor (a1,a2,a3,a4); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) { return m_functor (a1,a2,a3,a4,a5); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) { return m_functor (a1,a2,a3,a4,a5,a6); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument - * \param a7 seventh argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument + * \param [in] a7 Seventh argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) { return m_functor (a1,a2,a3,a4,a5,a6,a7); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument - * \param a7 seventh argument - * \param a8 eighth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument + * \param [in] a7 Seventh argument + * \param [in] a8 eighth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) { return m_functor (a1,a2,a3,a4,a5,a6,a7,a8); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument - * \param a7 seventh argument - * \param a8 eighth argument - * \param a9 ninth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument + * \param [in] a7 Seventh argument + * \param [in] a8 eighth argument + * \param [in] a9 ninth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9) { @@ -362,8 +362,8 @@ public: /** * Equality test. * - * \param other CallbackImpl Ptr - * \return true if this and other have the same functor + * \param [in] other CallbackImpl Ptr + * \return \c true if this and other have the same functor */ virtual bool IsEqual (Ptr other) const { FunctorCallbackImpl const *otherDerived = @@ -392,8 +392,8 @@ public: /** * Construct from an object pointer and member function pointer * - * \param objPtr the object pointer - * \param memPtr the object class member function + * \param [in] objPtr The object pointer + * \param [in] memPtr The object class member function */ MemPtrCallbackImpl (OBJ_PTR const&objPtr, MEM_PTR memPtr) : m_objPtr (objPtr), m_memPtr (memPtr) {} @@ -407,99 +407,99 @@ public: return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(); } /** - * \param a1 first argument + * \param [in] a1 First argument * \return Callback value */ R operator() (T1 a1) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1); } /** - * \param a1 first argument - * \param a2 second argument + * \param [in] a1 First argument + * \param [in] a2 Second argument * \return Callback value */ R operator() (T1 a1,T2 a2) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument - * \param a7 seventh argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument + * \param [in] a7 Seventh argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6, a7); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument - * \param a7 seventh argument - * \param a8 eighth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument + * \param [in] a7 Seventh argument + * \param [in] a8 Eighth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) { return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6, a7, a8); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument - * \param a7 seventh argument - * \param a8 eighth argument - * \param a9 ninth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument + * \param [in] a7 Seventh argument + * \param [in] a8 Eighth argument + * \param [in] a9 Ninth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, T9 a9) { @@ -509,8 +509,8 @@ public: /** * Equality test. * - * \param other Callback Ptr - * \return true if we have the same object and member function + * \param [in] other Callback Ptr + * \return \c true if we have the same object and member function */ virtual bool IsEqual (Ptr other) const { MemPtrCallbackImpl const *otherDerived = @@ -540,8 +540,8 @@ class BoundFunctorCallbackImpl : public CallbackImpl BoundFunctorCallbackImpl (FUNCTOR functor, ARG a) @@ -556,84 +556,84 @@ public: return m_functor (m_a); } /** - * \param a1 first argument + * \param [in] a1 First argument * \return Callback value */ R operator() (T1 a1) { return m_functor (m_a,a1); } /** - * \param a1 first argument - * \param a2 second argument + * \param [in] a1 First argument + * \param [in] a2 Second argument * \return Callback value */ R operator() (T1 a1,T2 a2) { return m_functor (m_a,a1,a2); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3) { return m_functor (m_a,a1,a2,a3); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4) { return m_functor (m_a,a1,a2,a3,a4); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) { return m_functor (m_a,a1,a2,a3,a4,a5); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) { return m_functor (m_a,a1,a2,a3,a4,a5,a6); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument - * \param a7 seventh argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument + * \param [in] a7 Seventh argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) { return m_functor (m_a,a1,a2,a3,a4,a5,a6,a7); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument - * \param a7 seventh argument - * \param a8 eighth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument + * \param [in] a7 Seventh argument + * \param [in] a8 Eighth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) { @@ -643,8 +643,8 @@ public: /** * Equality test. * - * \param other Callback Ptr - * \return true if we have the same functor and bound arguments + * \param [in] other Callback Ptr + * \return \c true if we have the same functor and bound arguments */ virtual bool IsEqual (Ptr other) const { BoundFunctorCallbackImpl const *otherDerived = @@ -674,9 +674,9 @@ class TwoBoundFunctorCallbackImpl : public CallbackImpl TwoBoundFunctorCallbackImpl (FUNCTOR functor, ARG1 arg1, ARG2 arg2) @@ -691,70 +691,70 @@ public: return m_functor (m_a1,m_a2); } /** - * \param a1 first argument + * \param [in] a1 First argument * \return Callback value */ R operator() (T1 a1) { return m_functor (m_a1,m_a2,a1); } /** - * \param a1 first argument - * \param a2 second argument + * \param [in] a1 First argument + * \param [in] a2 Second argument * \return Callback value */ R operator() (T1 a1,T2 a2) { return m_functor (m_a1,m_a2,a1,a2); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3) { return m_functor (m_a1,m_a2,a1,a2,a3); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4) { return m_functor (m_a1,m_a2,a1,a2,a3,a4); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) { return m_functor (m_a1,m_a2,a1,a2,a3,a4,a5); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) { return m_functor (m_a1,m_a2,a1,a2,a3,a4,a5,a6); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument - * \param a7 seventh argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument + * \param [in] a7 Seventh argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) { @@ -764,8 +764,8 @@ public: /** * Equality test. * - * \param other Callback Ptr - * \return true if we have the same functor and bound arguments + * \param [in] other Callback Ptr + * \return \c true if we have the same functor and bound arguments */ virtual bool IsEqual (Ptr other) const { TwoBoundFunctorCallbackImpl const *otherDerived = @@ -796,10 +796,10 @@ class ThreeBoundFunctorCallbackImpl : public CallbackImpl ThreeBoundFunctorCallbackImpl (FUNCTOR functor, ARG1 arg1, ARG2 arg2, ARG3 arg3) @@ -814,57 +814,57 @@ public: return m_functor (m_a1,m_a2,m_a3); } /** - * \param a1 first argument + * \param [in] a1 First argument * \return Callback value */ R operator() (T1 a1) { return m_functor (m_a1,m_a2,m_a3,a1); } /** - * \param a1 first argument - * \param a2 second argument + * \param [in] a1 First argument + * \param [in] a2 Second argument * \return Callback value */ R operator() (T1 a1,T2 a2) { return m_functor (m_a1,m_a2,m_a3,a1,a2); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3) { return m_functor (m_a1,m_a2,m_a3,a1,a2,a3); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4) { return m_functor (m_a1,m_a2,m_a3,a1,a2,a3,a4); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) { return m_functor (m_a1,m_a2,m_a3,a1,a2,a3,a4,a5); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument * \return Callback value */ R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) { @@ -874,8 +874,8 @@ public: /** * Equality test. * - * \param other Callback Ptr - * \return true if we have the same functor and bound arguments + * \param [in] other Callback Ptr + * \return \c true if we have the same functor and bound arguments */ virtual bool IsEqual (Ptr other) const { ThreeBoundFunctorCallbackImpl const *otherDerived = @@ -906,19 +906,19 @@ private: class CallbackBase { public: CallbackBase () : m_impl () {} - /** \return the impl pointer */ + /** \return The impl pointer */ Ptr GetImpl (void) const { return m_impl; } protected: /** * Construct from a pimpl - * \param impl the CallbackImplBase Ptr + * \param [in] impl The CallbackImplBase Ptr */ CallbackBase (Ptr impl) : m_impl (impl) {} Ptr m_impl; //!< the pimpl /** - * \param mangled the mangled string - * \return the demangled form of mangled + * \param [in] mangled The mangled string + * \return The demangled form of mangled */ static std::string Demangle (const std::string& mangled); }; @@ -988,7 +988,7 @@ public: /** * Construct a functor call back, supporting operator() calls * - * \param functor the functor to run on this callback + * \param [in] functor The functor to run on this callback * * \internal * There are two dummy args below to ensure that this constructor is @@ -1002,8 +1002,8 @@ public: /** * Construct a member function pointer call back. * - * \param objPtr pointer to the object - * \param memPtr pointer to the member function + * \param [in] objPtr Pointer to the object + * \param [in] memPtr Pointer to the member function */ template Callback (OBJ_PTR const &objPtr, MEM_PTR memPtr) @@ -1013,7 +1013,7 @@ public: /** * Construct from a CallbackImpl pointer * - * \param impl the CallbackImpl Ptr + * \param [in] impl The CallbackImpl Ptr */ Callback (Ptr > const &impl) : CallbackBase (impl) @@ -1022,8 +1022,8 @@ public: /** * Bind the first arguments * - * \param a argument to bind - * \return the bound callback + * \param [in] a Argument to bind + * \return The bound callback */ template Callback Bind (T a) { @@ -1038,9 +1038,9 @@ public: /** * Bind the first two arguments * - * \param a1 first argument to bind - * \param a2 second argument to bind - * \return the bound callback + * \param [in] a1 First argument to bind + * \param [in] a2 Second argument to bind + * \return The bound callback */ template Callback TwoBind (TX1 a1, TX2 a2) { @@ -1055,10 +1055,10 @@ public: /** * Bind the first three arguments * - * \param a1 first argument to bind - * \param a2 second argument to bind - * \param a3 third argument to bind - * \return the bound callback + * \param [in] a1 First argument to bind + * \param [in] a2 Second argument to bind + * \param [in] a3 Third argument to bind + * \return The bound callback */ template Callback ThreeBind (TX1 a1, TX2 a2, TX3 a3) { @@ -1073,7 +1073,7 @@ public: /** * Check for null implementation * - * \return true if I don't have an implementation + * \return \c true if I don't have an implementation */ bool IsNull (void) const { return (DoPeekImpl () == 0) ? true : false; @@ -1092,99 +1092,99 @@ public: return (*(DoPeekImpl ()))(); } /** - * \param a1 first argument + * \param [in] a1 First argument * \return Callback value */ R operator() (T1 a1) const { return (*(DoPeekImpl ()))(a1); } /** - * \param a1 first argument - * \param a2 second argument + * \param [in] a1 First argument + * \param [in] a2 Second argument * \return Callback value */ R operator() (T1 a1, T2 a2) const { return (*(DoPeekImpl ()))(a1,a2); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument * \return Callback value */ R operator() (T1 a1, T2 a2, T3 a3) const { return (*(DoPeekImpl ()))(a1,a2,a3); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument * \return Callback value */ R operator() (T1 a1, T2 a2, T3 a3, T4 a4) const { return (*(DoPeekImpl ()))(a1,a2,a3,a4); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument * \return Callback value */ R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5) const { return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument * \return Callback value */ R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6) const { return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5,a6); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument - * \param a7 seventh argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument + * \param [in] a7 Seventh argument * \return Callback value */ R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7) const { return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument - * \param a7 seventh argument - * \param a8 seventh argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument + * \param [in] a7 Seventh argument + * \param [in] a8 Eighth argument * \return Callback value */ R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) const { return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7,a8); } /** - * \param a1 first argument - * \param a2 second argument - * \param a3 third argument - * \param a4 fourth argument - * \param a5 fifth argument - * \param a6 sixth argument - * \param a7 seventh argument - * \param a8 eighth argument - * \param a9 ninth argument + * \param [in] a1 First argument + * \param [in] a2 Second argument + * \param [in] a3 Third argument + * \param [in] a4 Fourth argument + * \param [in] a5 Fifth argument + * \param [in] a6 Sixth argument + * \param [in] a7 Seventh argument + * \param [in] a8 Eighth argument + * \param [in] a9 Ninth argument * \return Callback value */ R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, T9 a9) const { @@ -1195,8 +1195,8 @@ public: /** * Equality test. * - * \param other Callback - * \return true if we are equal + * \param [in] other Callback + * \return \c true if we are equal */ bool IsEqual (const CallbackBase &other) const { return m_impl->IsEqual (other.GetImpl ()); @@ -1205,8 +1205,8 @@ public: /** * Check for compatible types * - * \param other Callback Ptr - * \return true if other can be dynamic_cast to my type + * \param [in] other Callback Ptr + * \return \c true if other can be dynamic_cast to my type */ bool CheckType (const CallbackBase & other) const { return DoCheckType (other.GetImpl ()); @@ -1214,21 +1214,21 @@ public: /** * Adopt the other's implementation, if type compatible * - * \param other Callback + * \param [in] other Callback */ void Assign (const CallbackBase &other) { DoAssign (other.GetImpl ()); } private: - /** \return the pimpl pointer */ + /** \return The pimpl pointer */ CallbackImpl *DoPeekImpl (void) const { return static_cast *> (PeekPointer (m_impl)); } /** * Check for compatible types * - * \param other Callback Ptr - * \return true if other can be dynamic_cast to my type + * \param [in] other Callback Ptr + * \return \c true if other can be dynamic_cast to my type */ bool DoCheckType (Ptr other) const { if (other != 0 && dynamic_cast *> (PeekPointer (other)) != 0) @@ -1247,7 +1247,7 @@ private: /** * Adopt the other's implementation, if type compatible * - * \param other Callback Ptr to adopt from + * \param [in] other Callback Ptr to adopt from */ void DoAssign (Ptr other) { if (!DoCheckType (other)) @@ -1267,10 +1267,10 @@ private: /** * Inequality test. * - * \param a Callback - * \param b Callback + * \param [in] a Callback + * \param [in] b Callback * - * \return true if the Callbacks are not equal + * \return \c true if the Callbacks are not equal */ template a, Callback MakeCallback (R (T::*memPtr)(T1,T2,T3,T4, * @{ */ /** - * \param fnPtr function pointer - * \return a wrapper Callback + * \param [in] fnPtr Function pointer + * \return A wrapper Callback * * Build Callbacks for functions which take varying numbers of arguments * and potentially returning a value. @@ -1434,7 +1434,7 @@ Callback MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T * @{ */ /** - * \return a wrapper Callback + * \return A wrapper Callback * * Build null Callbacks which take no arguments, * for varying number of template arguments, @@ -1487,9 +1487,9 @@ Callback MakeNullCallback (void) { * \ingroup makeboundcallback * @{ * Make Callbacks with one bound argument. - * \param fnPtr function pointer - * \param a1 first bound argument - * \return a bound Callback + * \param [in] fnPtr Function pointer + * \param [in] a1 First bound argument + * \return A bound Callback */ template Callback MakeBoundCallback (R (*fnPtr)(TX), ARG a1) { @@ -1559,10 +1559,10 @@ Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4 * \ingroup makeboundcallback * @{ * Make Callbacks with two bound arguments. - * \param fnPtr function pointer - * \param a1 first bound argument - * \param a2 second bound argument - * \return a bound Callback + * \param [in] fnPtr Function pointer + * \param [in] a1 First bound argument + * \param [in] a2 Second bound argument + * \return A bound Callback */ template Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2), ARG1 a1, ARG2 a2) { @@ -1625,11 +1625,11 @@ Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3, * \ingroup makeboundcallback * @{ * Make Callbacks with three bound arguments. - * \param a1 first bound argument - * \param a2 second bound argument - * \param a3 third bound argument - * \param fnPtr function pointer - * \return a bound Callback + * \param [in] a1 First bound argument + * \param [in] a2 Second bound argument + * \param [in] a3 Third bound argument + * \param [in] fnPtr Function pointer + * \return A bound Callback */ template Callback MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3), ARG1 a1, ARG2 a2, ARG3 a3) { @@ -1693,35 +1693,35 @@ public: CallbackValue (); /** * Copy constructor - * \param base Callback to copy + * \param [in] base Callback to copy */ CallbackValue (const CallbackBase &base); /** Destructor */ virtual ~CallbackValue (); - /** \param base The CallbackBase to use */ + /** \param [in] base The CallbackBase to use */ void Set (CallbackBase base); /** * Give value my callback, if type compatible * - * \param value destination callback - * \returns true if successful + * \param [out] value Destination callback + * \returns \c true if successful */ template bool GetAccessor (T &value) const; - /** \return a copy of this CallBack */ + /** \return A copy of this CallBack */ virtual Ptr Copy (void) const; /** * Serialize to string - * \param checker the checker to validate with - * \return serialize this pimpl + * \param [in] checker The checker to validate with + * \return Serialized form of this Callback. */ virtual std::string SerializeToString (Ptr checker) const; /** * Deserialize from string (not implemented) * - * \param value source string - * \param checker checker to validate with - * \return true if successful + * \param [in] value Source string + * \param [in] checker Checker to validate with + * \return \c true if successful */ virtual bool DeserializeFromString (std::string value, Ptr checker); private: diff --git a/src/core/model/command-line.h b/src/core/model/command-line.h index dbe3b8440..6e21ec7a8 100644 --- a/src/core/model/command-line.h +++ b/src/core/model/command-line.h @@ -206,14 +206,14 @@ public: /** * Copy constructor * - * \param cmd the CommandLine to copy from + * \param [in] cmd The CommandLine to copy from */ CommandLine (const CommandLine &cmd); /** * Assignment * - * \param cmd the CommandLine to assign from - * \return the CommandLine + * \param [in] cmd The CommandLine to assign from + * \return The CommandLine */ CommandLine &operator = (const CommandLine &cmd); /** Destructor */ @@ -222,16 +222,16 @@ public: /** * Supply the program usage and documentation. * - * \param usage Program usage message to write with \c --help. + * \param [in] usage Program usage message to write with \c --help. */ void Usage (const std::string usage); /** * Add a program argument, assigning to POD * - * \param name the name of the program-supplied argument - * \param help the help text used by \c \-\-PrintHelp - * \param value a reference to the variable where the + * \param [in] name The name of the program-supplied argument + * \param [in] help The help text used by \c \-\-PrintHelp + * \param [out] value A reference to the variable where the * value parsed will be stored (if no value * is parsed, this variable is not modified). */ @@ -243,9 +243,9 @@ public: /** * Add a program argument, using a Callback to parse the value * - * \param name the name of the program-supplied argument - * \param help the help text used by \c --help - * \param callback a Callback function that will be invoked to parse and + * \param [in] name The name of the program-supplied argument + * \param [in] help The help text used by \c --help + * \param [in] callback A Callback function that will be invoked to parse and * store the value. * * The callback should have the signature @@ -258,8 +258,8 @@ public: /** * Add a program argument as a shorthand for an Attribute. * - * \param name the name of the program-supplied argument. - * \param attributePath the fully-qualified name of the Attribute + * \param [in] name The name of the program-supplied argument. + * \param [out] attributePath The fully-qualified name of the Attribute */ void AddValue (const std::string &name, const std::string &attributePath); @@ -267,9 +267,9 @@ public: /** * Parse the program arguments * - * \param argc the 'argc' variable: number of arguments (including the + * \param [in] argc The 'argc' variable: number of arguments (including the * main program name as first element). - * \param argv the 'argv' variable: a null-terminated array of strings, + * \param [in] argv The 'argv' variable: a null-terminated array of strings, * each of which identifies a command-line argument. * * Obviously, this method will parse the input command-line arguments and @@ -283,7 +283,7 @@ public: /** * Get the program name * - * \return the program name. Only valid after calling Parse() + * \return The program name. Only valid after calling Parse() */ std::string GetName () const; @@ -320,16 +320,16 @@ private: /** * Parse from a string. * - * \param value the string representation - * \return true if parsing the value succeeded + * \param [in] value The string representation + * \return \c true if parsing the value succeeded */ virtual bool Parse (const std::string value) = 0; /** - * \return true if this item have a default value? + * \return \c true if this item have a default value? */ virtual bool HasDefault () const; /** - * \return the default value + * \return The default value */ virtual std::string GetDefault () const; }; @@ -345,8 +345,8 @@ private: /** * Parse from a string. * - * \param value the string representation - * \return true if parsing the value succeeded + * \param [in] value The string representation + * \return \c true if parsing the value succeeded */ virtual bool Parse (const std::string value); @@ -367,8 +367,8 @@ private: /** * Parse from a string. * - * \param value the string representation - * \return true if parsing the value succeeded + * \param [in] value The string representation + * \return \c true if parsing the value succeeded */ virtual bool Parse (const std::string value); Callback m_callback; /**< The Callback */ @@ -378,16 +378,16 @@ private: * Match name against the program or general arguments, * and dispatch to the appropriate handler. * - * \param name the argument name - * \param value the command line value + * \param [in] name The argument name + * \param [in] value The command line value */ void HandleArgument (const std::string &name, const std::string &value) const; /** * Callback function to handle attributes. * - * \param name The full name of the Attribute. - * \param value The value to assign to \p name. - * \return true if the value was set successfully, false otherwise. + * \param [in] name The full name of the Attribute. + * \param [in] value The value to assign to \p name. + * \return \c true if the value was set successfully, false otherwise. */ static bool HandleAttribute (const std::string name, const std::string value); @@ -396,33 +396,33 @@ private: /** * Handler for \c \-\-PrintAttributes: print the attributes for a given type. * - * \param os the output stream. - * \param type the TypeId whose Attributes should be displayed + * \param [in,out] os the output stream. + * \param [in] type The TypeId whose Attributes should be displayed */ void PrintAttributes (std::ostream &os, const std::string &type) const; /** * Handler for \c \-\-PrintGroup: print all types belonging to a given group. * - * \param os the output stream. - * \param group the name of the TypeId group to display + * \param [in,out] os The output stream. + * \param [in] group The name of the TypeId group to display */ void PrintGroup (std::ostream &os, const std::string &group) const; /** * Handler for \c \-\-PrintTypeIds: print all TypeId names. * - * \param os the output stream. + * \param [in,out] os The output stream. */ void PrintTypeIds (std::ostream &os) const; /** * Handler for \c \-\-PrintGroups: print all TypeId group names * - * \param os the output stream. + * \param [in,out] os The output stream. */ void PrintGroups (std::ostream &os) const; /** * Copy constructor * - * \param cmd CommandLine to copy + * \param [in] cmd CommandLine to copy */ void Copy (const CommandLine &cmd); /** Remove all arguments, Usage(), name */ @@ -448,9 +448,9 @@ namespace CommandLineHelper { * \ingroup commandlinehelper * \brief Helpers to specialize CommandLine::UserItem::Parse() on bool * - * \param value the argument name - * \param val the argument location - * \return true if parsing was successful + * \param [in] value The argument name + * \param [out] val The argument location + * \return \c true if parsing was successful * @{ */ template @@ -463,8 +463,8 @@ namespace CommandLineHelper { * \ingroup commandlinehelper * \brief Helper to specialize CommandLine::UserItem::GetDefault() on bool * - * \param val the argument value - * \return the string representation of value + * \param [in] val The argument value + * \return The string representation of value * @{ */ template diff --git a/src/core/model/config.h b/src/core/model/config.h index 1930b7214..9daf54caa 100644 --- a/src/core/model/config.h +++ b/src/core/model/config.h @@ -57,8 +57,8 @@ void Reset (void); /** * \ingroup config - * \param path a path to match attributes. - * \param value the value to set in all matching attributes. + * \param [in] path A path to match attributes. + * \param [in] value The value to set in all matching attributes. * * This function will attempt to find attributes which * match the input path and will then set their value to the input @@ -67,8 +67,8 @@ void Reset (void); void Set (std::string path, const AttributeValue &value); /** * \ingroup config - * \param name the full name of the attribute - * \param value the value to set. + * \param [in] name The full name of the attribute + * \param [in] value The value to set. * * This method overrides the initial value of the * matching attribute. This method cannot fail: it will @@ -77,9 +77,9 @@ void Set (std::string path, const AttributeValue &value); void SetDefault (std::string name, const AttributeValue &value); /** * \ingroup config - * \param name the full name of the attribute - * \param value the value to set. - * \returns true if the value was set successfully, false otherwise. + * \param [in] name The full name of the attribute + * \param [in] value The value to set. + * \returns \c true if the value was set successfully, false otherwise. * * This method overrides the initial value of the * matching attribute. @@ -87,16 +87,16 @@ void SetDefault (std::string name, const AttributeValue &value); bool SetDefaultFailSafe (std::string name, const AttributeValue &value); /** * \ingroup config - * \param name the name of the requested GlobalValue. - * \param value the value to set + * \param [in] name The name of the requested GlobalValue. + * \param [in] value The value to set * * This method is equivalent to GlobalValue::Bind */ void SetGlobal (std::string name, const AttributeValue &value); /** * \ingroup config - * \param name the name of the requested GlobalValue. - * \param value the value to set + * \param [in] name The name of the requested GlobalValue. + * \param [in] value The value to set * \return \c true if the GlobalValue could be set. * * This method is equivalent to GlobalValue::BindFailSafe @@ -104,8 +104,8 @@ void SetGlobal (std::string name, const AttributeValue &value); bool SetGlobalFailSafe (std::string name, const AttributeValue &value); /** * \ingroup config - * \param path a path to match trace sources. - * \param cb the callback to connect to the matching trace sources. + * \param [in] path A path to match trace sources. + * \param [in] cb The callback to connect to the matching trace sources. * * This function will attempt to find all trace sources which * match the input path and will then connect the input callback @@ -114,16 +114,16 @@ bool SetGlobalFailSafe (std::string name, const AttributeValue &value); void ConnectWithoutContext (std::string path, const CallbackBase &cb); /** * \ingroup config - * \param path a path to match trace sources. - * \param cb the callback to disconnect to the matching trace sources. + * \param [in] path A path to match trace sources. + * \param [in] cb The callback to disconnect to the matching trace sources. * * This function undoes the work of Config::Connect. */ void DisconnectWithoutContext (std::string path, const CallbackBase &cb); /** * \ingroup config - * \param path a path to match trace sources. - * \param cb the callback to connect to the matching trace sources. + * \param [in] path A path to match trace sources. + * \param [in] cb The callback to connect to the matching trace sources. * * This function will attempt to find all trace sources which * match the input path and will then connect the input callback @@ -133,8 +133,8 @@ void DisconnectWithoutContext (std::string path, const CallbackBase &cb); void Connect (std::string path, const CallbackBase &cb); /** * \ingroup config - * \param path a path to match trace sources. - * \param cb the callback to connect to the matching trace sources. + * \param [in] path A path to match trace sources. + * \param [in] cb The callback to connect to the matching trace sources. * * This function undoes the work of Config::ConnectWithContext. */ @@ -166,38 +166,38 @@ public: std::string path); /** - * \returns an iterator which points to the first item in the container + * \returns An iterator which points to the first item in the container */ MatchContainer::Iterator Begin (void) const; /** - * \returns an iterator which points to the last item in the container + * \returns An iterator which points to the last item in the container */ MatchContainer::Iterator End (void) const; /** - * \returns the number of items in the container + * \returns The number of items in the container */ uint32_t GetN (void) const; /** - * \param i index of item to lookup ([0,n[) - * \returns the item requested. + * \param [in] i Index of item to lookup ([0,n[) + * \returns The item requested. */ Ptr Get (uint32_t i) const; /** - * \param i index of item to lookup ([0,n[) - * \returns the fully-qualified matching path associated + * \param [in] i Index of item to lookup ([0,n[) + * \returns The fully-qualified matching path associated * to the requested item. * * The matching patch uniquely identifies the requested object. */ std::string GetMatchedPath (uint32_t i) const; /** - * \returns the path used to perform the object matching. + * \returns The path used to perform the object matching. */ std::string GetPath (void) const; /** - * \param name name of attribute to set - * \param value value to set to the attribute + * \param [in] name Name of attribute to set + * \param [in] value Value to set to the attribute * * Set the specified attribute value to all the objects stored in this * container. @@ -205,8 +205,8 @@ public: */ void Set (std::string name, const AttributeValue &value); /** - * \param name the name of the trace source to connect to - * \param cb the sink to connect to the trace source + * \param [in] name The name of the trace source to connect to + * \param [in] cb The sink to connect to the trace source * * Connect the specified sink to all the objects stored in this * container. @@ -214,8 +214,8 @@ public: */ void Connect (std::string name, const CallbackBase &cb); /** - * \param name the name of the trace source to connect to - * \param cb the sink to connect to the trace source + * \param [in] name The name of the trace source to connect to + * \param [in] cb The sink to connect to the trace source * * Connect the specified sink to all the objects stored in this * container. @@ -223,8 +223,8 @@ public: */ void ConnectWithoutContext (std::string name, const CallbackBase &cb); /** - * \param name the name of the trace source to disconnect from - * \param cb the sink to disconnect from the trace source + * \param [in] name The name of the trace source to disconnect from + * \param [in] cb The sink to disconnect from the trace source * * Disconnect the specified sink from all the objects stored in this * container. @@ -232,8 +232,8 @@ public: */ void Disconnect (std::string name, const CallbackBase &cb); /** - * \param name the name of the trace source to disconnect from - * \param cb the sink to disconnect from the trace source + * \param [in] name The name of the trace source to disconnect from + * \param [in] cb The sink to disconnect from the trace source * * Disconnect the specified sink from all the objects stored in this * container. @@ -252,15 +252,15 @@ private: /** * \ingroup config - * \param path the path to perform a match against - * \returns a container which contains all the objects which match the input + * \param [in] path The path to perform a match against + * \returns A container which contains all the objects which match the input * path. */ MatchContainer LookupMatches (std::string path); /** * \ingroup config - * \param obj a new root object + * \param [in] obj A new root object * * Each root object is used during path matching as * the root of the path by Config::Connect, and Config::Set. @@ -268,7 +268,7 @@ MatchContainer LookupMatches (std::string path); void RegisterRootNamespaceObject (Ptr obj); /** * \ingroup config - * \param obj a new root object + * \param [in] obj A new root object * * This function undoes the work of Config::RegisterRootNamespaceObject. */ @@ -276,14 +276,14 @@ void UnregisterRootNamespaceObject (Ptr obj); /** * \ingroup config - * \returns the number of registered root namespace objects. + * \returns The number of registered root namespace objects. */ uint32_t GetRootNamespaceObjectN (void); /** * \ingroup config - * \param i the index of the requested object. - * \returns the requested root namespace object + * \param [in] i The index of the requested object. + * \returns The requested root namespace object */ Ptr GetRootNamespaceObject (uint32_t i); diff --git a/src/core/model/double.cc b/src/core/model/double.cc index 8907e975f..b79614a56 100644 --- a/src/core/model/double.cc +++ b/src/core/model/double.cc @@ -41,9 +41,9 @@ namespace internal { * \ingroup attribute_Double * Make a Double attribute checker with embedded numeric type name. * - * \param min The minimum allowed value. - * \param max The maximum allowed value. - * \param name The original type name ("float", "double"). + * \param [in] min The minimum allowed value. + * \param [in] max The maximum allowed value. + * \param [in] name The original type name ("float", "double"). * \returns The AttributeChecker. */ Ptr MakeDoubleChecker (double min, double max, std::string name) diff --git a/src/core/model/event-id.h b/src/core/model/event-id.h index 53952f44f..816f9ecaf 100644 --- a/src/core/model/event-id.h +++ b/src/core/model/event-id.h @@ -100,15 +100,15 @@ public: private: /** * Test if two EventId's are equal. - * \param a The first EventId. - * \param b The second EventId. + * \param [in] a The first EventId. + * \param [in] b The second EventId. * \return \c true if the \p a and \p b represent the same event. */ friend bool operator == (const EventId &a, const EventId &b); /** * Test if two EventId's are not equal. - * \param a The first EventId. - * \param b The second EventId. + * \param [in] a The first EventId. + * \param [in] b The second EventId. * \return \c true if the \p a and \p b are not the same event. */ friend bool operator != (const EventId &a, const EventId &b); diff --git a/src/core/model/fatal-error.h b/src/core/model/fatal-error.h index 862ef70df..b7248c682 100644 --- a/src/core/model/fatal-error.h +++ b/src/core/model/fatal-error.h @@ -83,7 +83,7 @@ * * \brief Fatal error handling * - * \param msg message to output when this macro is hit. + * \param [in] msg message to output when this macro is hit. * * When this macro is hit at runtime, the user-specified * error message is printed to stderr, followed by a call diff --git a/src/core/model/fatal-impl.cc b/src/core/model/fatal-impl.cc index 6307f7633..958138658 100644 --- a/src/core/model/fatal-impl.cc +++ b/src/core/model/fatal-impl.cc @@ -158,7 +158,7 @@ namespace { * * This is private to the fatal implementation. * - * \param sig The signal condition. + * \param [in] sig The signal condition. */ void sigHandler (int sig) { diff --git a/src/core/model/fatal-impl.h b/src/core/model/fatal-impl.h index dee13bf9b..a4f378e9c 100644 --- a/src/core/model/fatal-impl.h +++ b/src/core/model/fatal-impl.h @@ -53,7 +53,7 @@ namespace FatalImpl { * this function should ensure the stream remains valid until * it had been unregistered. * - * \param stream The stream to be flushed on abnormal exit. + * \param [in] stream The stream to be flushed on abnormal exit. */ void RegisterStream (std::ostream* stream); @@ -68,7 +68,7 @@ void RegisterStream (std::ostream* stream); * * If the stream is not registered, nothing will happen. * - * \param stream The stream to be unregistered. + * \param [in] stream The stream to be unregistered. */ void UnregisterStream (std::ostream* stream); diff --git a/src/core/model/global-value.h b/src/core/model/global-value.h index 6881d011b..cd6baf01e 100644 --- a/src/core/model/global-value.h +++ b/src/core/model/global-value.h @@ -62,12 +62,12 @@ public: /** * Constructor. - * \param name the name of this global value. - * \param help some help text which describes the purpose of this + * \param [in] name the name of this global value. + * \param [in] help some help text which describes the purpose of this * global value. - * \param initialValue the value to assign to this global value + * \param [in] initialValue the value to assign to this global value * during construction. - * \param checker a pointer to an AttributeChecker which can verify + * \param [in] checker a pointer to an AttributeChecker which can verify * that any user-supplied value to override the initial * value matches the requested type constraints. */ @@ -77,29 +77,29 @@ public: /** * Get the name. - * \returns the name of this GlobalValue. + * \returns The name of this GlobalValue. */ std::string GetName (void) const; /** * Get the help string. - * \returns the help text of this GlobalValue. + * \returns The help text of this GlobalValue. */ std::string GetHelp (void) const; /** * Get the value. * \param [out] value The AttributeValue to set to the value * of this GlobalValue - * \returns the current value of this GlobalValue. + * \returns The current value of this GlobalValue. */ void GetValue (AttributeValue &value) const; /** * Get the AttributeChecker. - * \returns the checker associated to this GlobalValue. + * \returns The checker associated to this GlobalValue. */ Ptr GetChecker (void) const; /** * Set the value of this GlobalValue. - * \param value the new value to set in this GlobalValue. + * \param [in] value the new value to set in this GlobalValue. * \returns \c true if the Global Value was set successfully. */ bool SetValue (const AttributeValue &value); @@ -111,8 +111,8 @@ public: * Iterate over the set of GlobalValues until a matching name is found * and then set its value with GlobalValue::SetValue. * - * \param name the name of the global value - * \param value the value to set in the requested global value. + * \param [in] name the name of the global value + * \param [in] value the value to set in the requested global value. * * This method cannot fail. It will crash if the input is not valid. */ @@ -122,20 +122,21 @@ public: * Iterate over the set of GlobalValues until a matching name is found * and then set its value with GlobalValue::SetValue. * - * \param name the name of the global value - * \param value the value to set in the requested global value. - * \returns true if the value could be set successfully, false otherwise. + * \param [in] name the name of the global value + * \param [in] value the value to set in the requested global value. + * \returns \c true if the value could be set successfully, + * \c false otherwise. */ static bool BindFailSafe (std::string name, const AttributeValue &value); /** * The Begin iterator. - * \returns an iterator which represents a pointer to the first GlobalValue registered. + * \returns An iterator which represents a pointer to the first GlobalValue registered. */ static Iterator Begin (void); /** * The End iterator. - * \returns an iterator which represents a pointer to the last GlobalValue registered. + * \returns An iterator which represents a pointer to the last GlobalValue registered. */ static Iterator End (void); @@ -143,10 +144,10 @@ public: /** * Finds the GlobalValue with the given name and returns its value * - * \param name the name of the GlobalValue to be found - * \param value where to store the value of the found GlobalValue + * \param [in] name the name of the GlobalValue to be found + * \param [out] value where to store the value of the found GlobalValue * - * \return true if the GlobalValue was found, false otherwise + * \return \c true if the GlobalValue was found, \c false otherwise */ static bool GetValueByNameFailSafe (std::string name, AttributeValue &value); @@ -157,8 +158,8 @@ public: * This method cannot fail, i.e., it will trigger a * NS_FATAL_ERROR if the requested GlobalValue is not found. * - * \param name the name of the GlobalValue to be found - * \param value where to store the value of the found GlobalValue + * \param [in] name the name of the GlobalValue to be found + * \param [out] value where to store the value of the found GlobalValue */ static void GetValueByName (std::string name, AttributeValue &value); diff --git a/src/core/model/hash-fnv.cc b/src/core/model/hash-fnv.cc index 697483615..8e21f2695 100644 --- a/src/core/model/hash-fnv.cc +++ b/src/core/model/hash-fnv.cc @@ -368,9 +368,9 @@ enum fnv_type { * fnv_32a_buf - perform a 32 bit Fowler/Noll/Vo FNV-1a hash on a buffer * * input: - * \param buf start of buffer to hash - * \param len length of buffer in octets - * \param hval previous hash value or 0 if first call + * \param [in] buf start of buffer to hash + * \param [in] len length of buffer in octets + * \param [in] hval previous hash value or 0 if first call * * \returns 32 bit hash as a static hash type. * @@ -408,8 +408,8 @@ fnv_32a_buf(void *buf, size_t len, Fnv32_t hval) * fnv_32a_str - perform a 32 bit Fowler/Noll/Vo FNV-1a hash on a string * * input: - * \param str string to hash - * \param hval previous hash value or 0 if first call + * \param [in] str string to hash + * \param [in] hval previous hash value or 0 if first call * * \returns 32 bit hash as a static hash type * @@ -531,9 +531,9 @@ const Fnv64_t fnv1a_64_init = { 0x84222325, 0xcbf29ce4 }; * fnv_64a_buf - perform a 64 bit Fowler/Noll/Vo FNV-1a hash on a buffer * * input: - * \param buf start of buffer to hash - * \param len length of buffer in octets - * \param hval previous hash value or 0 if first call + * \param [in] buf start of buffer to hash + * \param [in] len length of buffer in octets + * \param [in] hval previous hash value or 0 if first call * * \returns 64 bit hash as a static hash type * @@ -637,8 +637,8 @@ fnv_64a_buf(void *buf, size_t len, Fnv64_t hval) * fnv_64a_str - perform a 64 bit Fowler/Noll/Vo FNV-1a hash on a buffer * * input: - * \param str string to hash - * \param hval previous hash value or 0 if first call + * \param [in] str string to hash + * \param [in] hval previous hash value or 0 if first call * * \returns 64 bit hash as a static hash type * diff --git a/src/core/model/hash-murmur3.cc b/src/core/model/hash-murmur3.cc index 90d092b9b..ca5ded2b9 100644 --- a/src/core/model/hash-murmur3.cc +++ b/src/core/model/hash-murmur3.cc @@ -84,8 +84,8 @@ namespace Murmur3Implementation { /** * Barrel shift (rotate) left on 32 bits. * - * \param x The initial value. - * \param r The number of bit positions to rotate. + * \param [in] x The initial value. + * \param [in] r The number of bit positions to rotate. * \return The rotated value. */ inline uint32_t rotl32 ( uint32_t x, int8_t r ) @@ -96,8 +96,8 @@ inline uint32_t rotl32 ( uint32_t x, int8_t r ) /** * Barrel shift (rotate) left on 64 bits. * - * \param x The initial value. - * \param r The number of bit positions to rotate. + * \param [in] x The initial value. + * \param [in] r The number of bit positions to rotate. * \return The rotated value. */ inline uint64_t rotl64 ( uint64_t x, int8_t r ) @@ -115,8 +115,8 @@ inline uint64_t rotl64 ( uint64_t x, int8_t r ) * If your platform needs to do endian-swapping or can only * handle aligned reads, do the conversion here. * - * \param p Block base address. - * \param i Index into the block. + * \param [in] p Block base address. + * \param [in] i Index into the block. * \returns The \c i'th word from the block. */ inline uint32_t getblock ( const uint32_t * p, int i ) @@ -133,7 +133,7 @@ inline uint64_t getblock ( const uint64_t * p, int i ) /** * Finalization mix - force all bits of a hash block to avalanche. * - * \param h Final word of the hash block. + * \param [in] h Final word of the hash block. * \returns Fully mixed final word. */ inline uint32_t fmix ( uint32_t h ) @@ -166,19 +166,19 @@ inline uint64_t fmix ( uint64_t h ) /** * Initial and incremental hash. * - * \param key Data to be hashed. - * \param len Number of words in the \c key. - * \param seed Initial or current hash state. - * \param out Output hash value. + * \param [in] key Data to be hashed. + * \param [in] len Number of words in the \c key. + * \param [in] seed Initial or current hash state. + * \param [out] out Output hash value. */ void MurmurHash3_x86_32_incr ( const void * key, int len, uint32_t seed, void * out ); /** * Finalize a hash. * - * \param len Total number of words that have gone in to the hash. - * \param seed Initial or current hash state. - * \param out Output hash value. + * \param [in] len Total number of words that have gone in to the hash. + * \param [in] seed Initial or current hash state. + * \param [out] out Output hash value. */ void MurmurHash3_x86_32_fin ( int len, uint32_t seed, void * out ); @@ -262,19 +262,19 @@ void MurmurHash3_x86_32_fin ( int len, /** * Initial and incremental hash. * - * \param key Data to be hashed. - * \param len Number of words in the \c key. - * \param seeds Initial or current hash state. - * \param out Output hash value. + * \param [in] key Data to be hashed. + * \param [in] len Number of words in the \c key. + * \param [in] seeds Initial or current hash state. + * \param [out] out Output hash value. */ void MurmurHash3_x86_128_incr ( const void * key, const int len, uint32_t * seeds, void * out ); /** * Finalize a hash. * - * \param len Total number of words that have gone in to the hash. - * \param seeds Initial or current hash state. - * \param out Output hash value. + * \param [in] len Total number of words that have gone in to the hash. + * \param [in] seeds Initial or current hash state. + * \param [out] out Output hash value. */ void MurmurHash3_x86_128_fin ( const int len, uint32_t * seeds, void * out ); @@ -283,10 +283,10 @@ void MurmurHash3_x86_128_fin ( const int len, /** * Initial and incremental hash. * - * \param key Data to be hashed. - * \param len Number of words in the \c key. - * \param seed Initial or current hash state. - * \param out Output hash value. + * \param [in] key Data to be hashed. + * \param [in] len Number of words in the \c key. + * \param [in] seed Initial or current hash state. + * \param [out] out Output hash value. */ void MurmurHash3_x86_128 ( const void * key, const int len, uint32_t seed, void * out ) diff --git a/src/core/model/hash.h b/src/core/model/hash.h index 1f16c40de..3572ddb84 100644 --- a/src/core/model/hash.h +++ b/src/core/model/hash.h @@ -168,7 +168,7 @@ public: * h.clear ().GetHash64 (...); * \endcode * - * \return this + * \return This hasher. */ Hasher & clear (void); diff --git a/src/core/model/int64x64-128.cc b/src/core/model/int64x64-128.cc index 372279a6f..c3b625da0 100644 --- a/src/core/model/int64x64-128.cc +++ b/src/core/model/int64x64-128.cc @@ -44,7 +44,7 @@ NS_LOG_COMPONENT_DEFINE ("int64x64-128"); * \param [in] sb The signed value of the second operand. * \param [out] ua The unsigned magnitude of the first operand. * \param [out] ub The unsigned magnitude of the second operand. - * \returns True if the result will be negative. + * \returns \c true if the result will be negative. */ static inline bool diff --git a/src/core/model/int64x64-cairo.h b/src/core/model/int64x64-cairo.h index 776da8047..b6120ba65 100644 --- a/src/core/model/int64x64-cairo.h +++ b/src/core/model/int64x64-cairo.h @@ -125,7 +125,7 @@ public: /** * Construct from an integral type. * - * \param [in] v integer value to represent + * \param [in] v Integer value to represent */ inline int64x64_t (const int v) { diff --git a/src/core/model/int64x64-double.h b/src/core/model/int64x64-double.h index 412fb7d47..f4261d2a3 100644 --- a/src/core/model/int64x64-double.h +++ b/src/core/model/int64x64-double.h @@ -80,7 +80,7 @@ public: /** * Construct from a floating point value. * - * \param [in] v floating value to represent + * \param [in] v Floating value to represent */ inline int64x64_t (double v) : _v (v) {} @@ -92,7 +92,7 @@ public: /** * Construct from an integral type. * - * \param [in] v integer value to represent + * \param [in] v Integer value to represent */ inline int64x64_t (int v) : _v (v) {} @@ -154,7 +154,7 @@ private: /** * Get the high and low portions of this value. * - * \return a pair of the high and low words + * \return A pair of the high and low words */ std::pair GetHighLow (void) const { diff --git a/src/core/model/int64x64.h b/src/core/model/int64x64.h index 93d3acda5..5c4a22d0a 100644 --- a/src/core/model/int64x64.h +++ b/src/core/model/int64x64.h @@ -160,7 +160,7 @@ inline bool operator >= (const int64x64_t & lhs, const int64x64_t & rhs) * all digits of the fractional part are printed, up to the * representation limit of 20 digits; trailing zeros are omitted. * - * \param [in] os The output stream. + * \param [in,out] os The output stream. * \param [in] value The numerical value to print. * \returns The stream. */ @@ -169,7 +169,7 @@ std::ostream &operator << (std::ostream &os, const int64x64_t &value); * \ingroup highprec * Input streamer for int64x64_t. * - * \param [in] is The input stream. + * \param [in,out] is The input stream. * \param [out] value The numerical value to set. * \returns The stream. */ @@ -178,7 +178,7 @@ std::istream &operator >> (std::istream &is, int64x64_t &value); /** * \ingroup highprec * Absolute value. - * \param value The value to operate on. + * \param [in] value The value to operate on. * \return The absolute value of \p value. */ inline int64x64_t Abs (const int64x64_t &value) diff --git a/src/core/model/integer.cc b/src/core/model/integer.cc index a0a2d12f3..f3b4b8c3f 100644 --- a/src/core/model/integer.cc +++ b/src/core/model/integer.cc @@ -40,9 +40,9 @@ namespace internal { * \ingroup attribute_Integer * Make an Integer attribute checker with embedded numeric type name. * - * \param min The minimum allowed value. - * \param max The maximum allowed value. - * \param name The original type name ("int8_t", "int16_t", _etc_.). + * \param [in] min The minimum allowed value. + * \param [in] max The maximum allowed value. + * \param [in] name The original type name ("int8_t", "int16_t", _etc_.). * \returns The AttributeChecker. */ Ptr diff --git a/src/core/model/log-macros-enabled.h b/src/core/model/log-macros-enabled.h index 82967e84e..f8f9b111f 100644 --- a/src/core/model/log-macros-enabled.h +++ b/src/core/model/log-macros-enabled.h @@ -144,8 +144,8 @@ * NS_LOG (LOG_DEBUG, "a number="< obj. + * \brief Add the association between the string "name" and the + * Ptr obj. * - * The name may begin either with "/Names" to explicitly call out the fact - * that the name provided is installed under the root of the name space, - * or it may begin with the name of the first object in the path. For example, - * Names::Add ("/Names/client", obj) and Names::Add ("client", obj) accomplish - * exactly the same thing. A name at a given level in the name space path must - * be unique. In the case of the example above, it would be illegal to try and - * associate a different object with the same name: "client" at the same level - * ("/Names") in the path. + * The name may begin either with "/Names" to explicitly call out + * the fact that the name provided is installed under the root of + * the name space, or it may begin with the name of the first object + * in the path. For example, Names::Add ("/Names/client", obj) and + * Names::Add ("client", obj) accomplish exactly the same thing. A + * name at a given level in the name space path must be unique. In + * the case of the example above, it would be illegal to try and + * associate a different object with the same name: "client" at the + * same level ("/Names") in the path. * - * As well as specifying a name at the root of the "/Names" namespace, the - * name parameter can contain a path that fully qualifies the name to - * be added. For example, if you previously have named an object "client" - * in the root namespace as above, you could name an object "under" that - * name by making a call like Names::Add ("/Names/client/eth0", obj). This - * will define the name "eth0" and make it reachable using the path specified. - * Note that Names::Add ("client/eth0", obj) would accomplish exactly the same - * thing. + * As well as specifying a name at the root of the "/Names" + * namespace, the name parameter can contain a path that fully + * qualifies the name to be added. For example, if you previously + * have named an object "client" in the root namespace as above, you + * could name an object "under" that name by making a call like + * Names::Add ("/Names/client/eth0", obj). This will define the + * name "eth0" and make it reachable using the path specified. Note + * that Names::Add ("client/eth0", obj) would accomplish exactly the + * same thing. * - * Duplicate names are not allowed at the same level in a path, however you may - * associate similar names with different paths. For example, if you define - * "/Names/Client", you may not define another "/Names/Client" just as you may - * not have two files with the same name in a classical filesystem. However, - * you may have "/Names/Client/eth0" and "/Names/Server/eth0" defined at the - * same time just as you might have different files of the same name under - * different directories. + * Duplicate names are not allowed at the same level in a path, + * however you may associate similar names with different paths. + * For example, if you define "/Names/Client", you may not define + * another "/Names/Client" just as you may not have two files with + * the same name in a classical filesystem. However, you may have + * "/Names/Client/eth0" and "/Names/Server/eth0" defined at the same + * time just as you might have different files of the same name + * under different directories. * - * \param name The name of the object you want to associate; which may be + * \param [in] name The name of the object you want to associate; which may be * prepended with a path to that object. - * \param object A smart pointer to the object itself. + * \param [in] object A smart pointer to the object itself. */ static void Add (std::string name, Ptr object); /** - * \brief An intermediate form of Names::Add allowing you to provide a path to - * the parent object (under which you want this name to be defined) in the form - * of a name path string. + * \brief An intermediate form of Names::Add allowing you to provide + * a path to the parent object (under which you want this name to be + * defined) in the form of a name path string. * - * In some cases, it is desirable to break up the path used to describe an item - * in the names namespace into a path and a name. This is analogous to a - * file system operation in which you provide a directory name and a file name. + * In some cases, it is desirable to break up the path used to + * describe an item in the names namespace into a path and a name. + * This is analogous to a file system operation in which you provide + * a directory name and a file name. * - * For example, consider a situation where you have previously named an object - * "/Names/server". If you further want to create an association for between a - * Ptr object that you want to live "under" the server in the name space - * -- perhaps "eth0" -- you could do this in two ways, depending on which was - * more convenient: Names::Add ("/Names/server/eth0", object) or, using the split - * path and name approach, Names::Add ("/Names/server", "eth0", object). + * For example, consider a situation where you have previously named + * an object "/Names/server". If you further want to create an + * association for between a Ptr object that you want to + * live "under" the server in the name space -- perhaps "eth0" -- + * you could do this in two ways, depending on which was more + * convenient: Names::Add ("/Names/server/eth0", object) or, using + * the split path and name approach, Names::Add ("/Names/server", + * "eth0", object). * - * Duplicate names are not allowed at the same level in a path, however you may - * associate similar names with different paths. For example, if you define - * "/Names/Client", you may not define another "/Names/Client" just as you may - * not have two files with the same name in a classical filesystem. However, - * you may have "/Names/Client/eth0" and "/Names/Server/eth0" defined at the - * same time just as you might have different files of the same name under - * different directories. + * Duplicate names are not allowed at the same level in a path, + * however you may associate similar names with different paths. + * For example, if you define "/Names/Client", you may not define + * another "/Names/Client" just as you may not have two files with + * the same name in a classical filesystem. However, you may have + * "/Names/Client/eth0" and "/Names/Server/eth0" defined at the same + * time just as you might have different files of the same name + * under different directories. * - * \param path A path name describing a previously named object under which - * you want this new name to be defined. - * \param name The name of the object you want to associate. - * \param object A smart pointer to the object itself. + * \param [in] path A path name describing a previously named object + * under which you want this new name to be defined. + * \param [in] name The name of the object you want to associate. + * \param [in] object A smart pointer to the object itself. * - * \see Names::Add (Ptr context, std::string name, Ptr object); + * \see Names::Add (Ptr,std::string,Ptr); */ static void Add (std::string path, std::string name, Ptr object); /** - * \brief A low-level form of Names::Add allowing you to specify the path to - * the parent object (under which you want this name to be defined) in the form - * of a previously named object. + * \brief A low-level form of Names::Add allowing you to specify the + * path to the parent object (under which you want this name to be + * defined) in the form of a previously named object. * - * In some use cases, it is desirable to break up the path in the names name - * space into a path and a name. This is analogous to a file system operation - * in which you provide a directory name and a file name. Recall that the path - * string actually refers to a previously named object, "under" which you want - * to accomplish some naming action. + * In some use cases, it is desirable to break up the path in the + * names name space into a path and a name. This is analogous to a + * file system operation in which you provide a directory name and a + * file name. Recall that the path string actually refers to a + * previously named object, "under" which you want to accomplish + * some naming action. * - * However, the path is sometimes not available, and you only have the object - * that is represented by the path in the names name space. To support this - * use-case in a reasonably high-performance way, the path string is can be - * replaced by the object pointer to which that path would refer. In the spirit - * of the Config code where this use-case is most prominent, we refer to this - * object as the "context" for the names operation. + * However, the path is sometimes not available, and you only have + * the object that is represented by the path in the names name + * space. To support this use-case in a reasonably high-performance + * way, the path string is can be replaced by the object pointer to + * which that path would refer. In the spirit of the Config code + * where this use-case is most prominent, we refer to this object as + * the "context" for the names operation. * - * You can think of the context roughly as the inode number of a directory file - * in Unix. The inode number can be used to look up the directory file which - * contains the list of file names defined at that directory level. Similarly - * the context is used to look up an internal name service entry which contains - * the names defined for that context. + * You can think of the context roughly as the inode number of a + * directory file in Unix. The inode number can be used to look up + * the directory file which contains the list of file names defined + * at that directory level. Similarly the context is used to look + * up an internal name service entry which contains the names + * defined for that context. * - * For example, consider a situation where you have previously named an object - * "/Names/server". If you further want to create an association for between a - * Ptr object that you want to live "under" the server in the name space - * -- perhaps "eth0" -- you could do this by providing a complete path to the - * new name: Names::Add ("/Names/server/eth0", object). If, however, somewhere - * in your code you only had a pointer to the server, say Ptr node, and - * not a handy path string, you could also accomplish this by - * Names::Add (node, "eth0", object). + * For example, consider a situation where you have previously named + * an object "/Names/server". If you further want to create an + * association for between a Ptr object that you want to + * live "under" the server in the name space -- perhaps "eth0" -- + * you could do this by providing a complete path to the new name: + * Names::Add ("/Names/server/eth0", object). If, however, + * somewhere in your code you only had a pointer to the server, say + * Ptr node, and not a handy path string, you could also + * accomplish this by Names::Add (node, "eth0", object). * - * Duplicate names are not allowed at the same level in a path. In the case - * of this method, the context object gives the same information as a path - * string. You may associate similar names with different paths. For example, - * if you define"/Names/Client", you may not define another "/Names/Client" - * just as you may not have two files with the same name in a classical filesystem. - * However, you may have "/Names/Client/eth0" and "/Names/Server/eth0" defined at - * the same time just as you might have different files of the same name under - * different directories. + * Duplicate names are not allowed at the same level in a path. In + * the case of this method, the context object gives the same + * information as a path string. You may associate similar names + * with different paths. For example, if you define"/Names/Client", + * you may not define another "/Names/Client" just as you may not + * have two files with the same name in a classical filesystem. + * However, you may have "/Names/Client/eth0" and + * "/Names/Server/eth0" defined at the same time just as you might + * have different files of the same name under different + * directories. * - * \param context A smart pointer to an object that is used in place of the path - * under which you want this new name to be defined. - * \param name The name of the object you want to associate. - * \param object A smart pointer to the object itself. + * \param [in] context A smart pointer to an object that is used + * in place of the path under which you want this new + * name to be defined. + * \param [in] name The name of the object you want to associate. + * \param [in] object A smart pointer to the object itself. */ static void Add (Ptr context, std::string name, Ptr object); /** * \brief Rename a previously associated name. * - * The name may begin either with "/Names" to explicitly call out the fact - * that the name provided is installed under the root of the name space, - * or it may begin with the name of the first object in the path. For example, - * Names::Rename ("/Names/client", "server") and Names::Rename ("client", "server") - * accomplish exactly the same thing. Names at a given level in the name space - * path must be unique. In the case of the example above, it would be illegal - * to try and rename a different object to the same name: "server" at the same - * level ("/Names") in the path. + * The name may begin either with "/Names" to explicitly call out + * the fact that the name provided is installed under the root of + * the name space, or it may begin with the name of the first object + * in the path. For example, Names::Rename ("/Names/client", + * "server") and Names::Rename ("client", "server") accomplish + * exactly the same thing. Names at a given level in the name space + * path must be unique. In the case of the example above, it would + * be illegal to try and rename a different object to the same name: + * "server" at the same level ("/Names") in the path. * - * As well as specifying a name at the root of the "/Names" namespace, the - * name parameter can contain a path that fully qualifies the name to - * be changed. For example, if you previously have (re)named an object - * "server" in the root namespace as above, you could then rename an object - * "under" that name by making a call like Names::Rename ("/Names/server/csma", "eth0"). - * This will rename the object previously associated with "/Names/server/csma" - * to "eth0" and make leave it reachable using the path "/Names/server/eth0". - * Note that Names::Rename ("server/csma", "eth0") would accomplish exactly the - * same thing. + * As well as specifying a name at the root of the "/Names" + * namespace, the name parameter can contain a path that fully + * qualifies the name to be changed. For example, if you previously + * have (re)named an object "server" in the root namespace as above, + * you could then rename an object "under" that name by making a + * call like Names::Rename ("/Names/server/csma", "eth0"). This + * will rename the object previously associated with + * "/Names/server/csma" to "eth0" and make leave it reachable using + * the path "/Names/server/eth0". Note that Names::Rename + * ("server/csma", "eth0") would accomplish exactly the same thing. * - * \param oldpath The current path name to the object you want to change. - * \param newname The new name of the object you want to change. + * \param [in] oldpath The current path name to the object you want + * to change. + * \param [in] newname The new name of the object you want to change. * * \see Names::Add (std::string name, Ptr obj) */ static void Rename (std::string oldpath, std::string newname); /** - * \brief An intermediate form of Names::Rename allowing you to provide a path to - * the parent object (under which you want this name to be changed) in the form - * of a name path string. + * \brief An intermediate form of Names::Rename allowing you to + * provide a path to the parent object (under which you want this + * name to be changed) in the form of a name path string. * - * In some cases, it is desirable to break up the path used to describe an item - * in the names namespace into a path and a name. This is analogous to a - * file system operation in which you provide a directory name and a file name. + * In some cases, it is desirable to break up the path used to + * describe an item in the names namespace into a path and a name. + * This is analogous to a file system operation in which you provide + * a directory name and a file name. * - * For example, consider a situation where you have previously named an object - * "/Names/server/csma". If you want to change the name "csma" to "eth0", you - * could do this in two ways, depending on which was more convenient: - * Names::Rename ("/Names/server/csma", "eth0") or, using the split - * path and name approach, Names::Rename ("/Names/server", "csma", "eth0"). + * For example, consider a situation where you have previously named + * an object "/Names/server/csma". If you want to change the name + * "csma" to "eth0", you could do this in two ways, depending on + * which was more convenient: Names::Rename ("/Names/server/csma", + * "eth0") or, using the split path and name approach, Names::Rename + * ("/Names/server", "csma", "eth0"). * - * \param path A path name describing a previously named object under which - * you want this name change to occur (cf. directory). - * \param oldname The currently defined name of the object. - * \param newname The new name you want the object to have. + * \param [in] path A path name describing a previously named object + * under which you want this name change to occur + * (cf. directory). + * \param [in] oldname The currently defined name of the object. + * \param [in] newname The new name you want the object to have. */ static void Rename (std::string path, std::string oldname, std::string newname); /** - * \brief A low-level form of Names::Rename allowing you to specify the path to - * the parent object (under which you want this name to be changed) in the form - * of a previously named object. + * \brief A low-level form of Names::Rename allowing you to specify + * the path to the parent object (under which you want this name to + * be changed) in the form of a previously named object. * - * In some use cases, it is desirable to break up the path in the names name - * space into a path and a name. This is analogous to a file system operation - * in which you provide a directory name and a file name. Recall that the path - * string actually refers to a previously named object, "under" which you want - * to accomplish some naming action. + * In some use cases, it is desirable to break up the path in the + * names name space into a path and a name. This is analogous to a + * file system operation in which you provide a directory name and a + * file name. Recall that the path string actually refers to a + * previously named object, "under" which you want to accomplish + * some naming action. * - * However, the path is sometimes not available, and you only have the object - * that is represented by the path in the names name space. To support this - * use-case in a reasonably high-performance way, the path string is can be - * replaced by the object pointer to which that path would refer. In the spirit - * of the Config code where this use-case is most prominent, we refer to this - * object as the "context" for the names operation. + * However, the path is sometimes not available, and you only have + * the object that is represented by the path in the names name + * space. To support this use-case in a reasonably high-performance + * way, the path string is can be replaced by the object pointer to + * which that path would refer. In the spirit of the Config code + * where this use-case is most prominent, we refer to this object as + * the "context" for the names operation. * - * You can think of the context roughly as the inode number of a directory file - * in Unix. The inode number can be used to look up the directory file which - * contains the list of file names defined at that directory level. Similarly - * the context is used to look up an internal name service entry which contains - * the names defined for that context. + * You can think of the context roughly as the inode number of a + * directory file in Unix. The inode number can be used to look up + * the directory file which contains the list of file names defined + * at that directory level. Similarly the context is used to look + * up an internal name service entry which contains the names + * defined for that context. * - * For example, consider a situation where you have previously named an object - * "/Names/server/csma". If you later decide to rename the csma object to say - * "eth0" -- you could do this by providing a complete path as in - * Names::Rename ("/Names/server/csma", "eth0"). If, however, somewhere - * in your code you only had a pointer to the server, and not a handy path - * string, say Ptr node, you could also accomplish this by - * Names::Rename (node, "csma", "eth0"). + * For example, consider a situation where you have previously named + * an object "/Names/server/csma". If you later decide to rename + * the csma object to say "eth0" -- you could do this by providing a + * complete path as in Names::Rename ("/Names/server/csma", "eth0"). + * If, however, somewhere in your code you only had a pointer to the + * server, and not a handy path string, say Ptr node, you + * could also accomplish this by Names::Rename (node, "csma", + * "eth0"). * - * \param context A smart pointer to an object that is used in place of the path - * under which you want this new name to be defined. - * \param oldname The current shortname of the object you want to change. - * \param newname The new shortname of the object you want to change. + * \param [in] context A smart pointer to an object that is used + * in place of the path under which you want this + * new name to be defined. + * \param [in] oldname The current shortname of the object you want + * to change. + * \param [in] newname The new shortname of the object you want + * to change. */ static void Rename (Ptr context, std::string oldname, std::string newname); /** - * \brief Given a pointer to an object, look to see if that object has a name - * associated with it and, if so, return the name of the object otherwise - * return an empty string. + * \brief Given a pointer to an object, look to see if that object + * has a name associated with it and, if so, return the name of the + * object otherwise return an empty string. * - * An object can be referred to in two ways. Either you can talk about it - * using its fully qualified path name, for example, "/Names/client/eth0" - * or you can refer to it by its name, in this case "eth0". + * An object can be referred to in two ways. Either you can talk + * about it using its fully qualified path name, for example, + * "/Names/client/eth0" or you can refer to it by its name, in this + * case "eth0". * * This method returns the name of the object, e.g., "eth0". * - * \param object A smart pointer to an object for which you want to find - * its name. + * \param [in] object A smart pointer to an object for which you want + * to find its name. * - * \returns a string containing the name of the object if found, otherwise - * the empty string. + * \returns A string containing the name of the object if found, + * otherwise the empty string. */ static std::string FindName (Ptr object); /** - * \brief Given a pointer to an object, look to see if that object has a name - * associated with it and return the fully qualified name path of the - * object otherwise return an empty string. + * \brief Given a pointer to an object, look to see if that object + * has a name associated with it and return the fully qualified name + * path of the object otherwise return an empty string. * - * An object can be referred to in two ways. Either you can talk about it - * using its fully qualified path name, for example, "/Names/client/eth0" - * or you can refer to it by its name, in this case "eth0". + * An object can be referred to in two ways. Either you can talk + * about it using its fully qualified path name, for example, + * "/Names/client/eth0" or you can refer to it by its name, in this + * case "eth0". * - * This method returns the name path of the object, e.g., "Names/client/eth0". + * This method returns the name path of the object, e.g., + * "Names/client/eth0". * - * \param object A smart pointer to an object for which you want to find - * its fullname. + * \param [in] object A smart pointer to an object for which you + * want to find its fullname. * - * \returns a string containing the name path of the object, otherwise - * the empty string. + * \returns A string containing the name path of the object, + * otherwise the empty string. */ static std::string FindPath (Ptr object); @@ -291,82 +322,94 @@ public: static void Clear (void); /** - * \brief Given a name path string, look to see if there's an object in the system - * with that associated to it. If there is, do a GetObject on the resulting - * object to convert it to the requested typename and return it. + * \brief Given a name path string, look to see if there's an object + * in the system with that associated to it. If there is, do a + * GetObject on the resulting object to convert it to the requested + * typename and return it. * - * An object can be referred to in two ways. Either you can talk about it - * using its fully qualified path name, for example, "/Names/client/eth0" - * or you can refer to it by its name, in this case "eth0". + * An object can be referred to in two ways. Either you can talk + * about it using its fully qualified path name, for example, + * "/Names/client/eth0" or you can refer to it by its name, in this + * case "eth0". * - * This method requires that the name path of the object be provided, e.g., - * "Names/client/eth0". + * This method requires that the name path of the object be + * provided, e.g., "Names/client/eth0". * - * \param path A string containing a name space path used to locate the object. + * \param [in] path A string containing a name space path used + * to locate the object. * - * \returns a smart pointer to the named object converted to the requested - * type. + * \returns A smart pointer to the named object converted to + * the requested type. */ template static Ptr Find (std::string path); /** - * \brief Given a path to an object and an object name, look through the names defined - * under the path to see if there's an object there with the given name. + * \brief Given a path to an object and an object name, look through + * the names defined under the path to see if there's an object + * there with the given name. * - * In some cases, it is desirable to break up the path used to describe an item - * in the names namespace into a path and a name. This is analogous to a - * file system operation in which you provide a directory name and a file name. + * In some cases, it is desirable to break up the path used to + * describe an item in the names namespace into a path and a name. + * This is analogous to a file system operation in which you provide + * a directory name and a file name. * - * For example, consider a situation where you have previously named an object - * "/Names/server/eth0". If you want to discover the object which you associated - * with this path, you could do this in two ways, depending on which was more - * convenient: Names::Find ("/Names/server/eth0") or, using the split path and - * name approach, Names::Find ("/Names/server", "eth0"). + * For example, consider a situation where you have previously named + * an object "/Names/server/eth0". If you want to discover the + * object which you associated with this path, you could do this in + * two ways, depending on which was more convenient: Names::Find + * ("/Names/server/eth0") or, using the split path and name + * approach, Names::Find ("/Names/server", "eth0"). * - * \param path A path name describing a previously named object under which - * you want to look for the specified name. - * \param name A string containing a name to search for. + * \param [in] path A path name describing a previously named object + * under which you want to look for the specified name. + * \param [in] name A string containing a name to search for. * - * \returns a smart pointer to the named object converted to the requested - * type. + * \returns A smart pointer to the named object converted to + * the requested type. */ template static Ptr Find (std::string path, std::string name); /** - * \brief Given a path to an object and an object name, look through the names defined - * under the path to see if there's an object there with the given name. + * \brief Given a path to an object and an object name, look through + * the names defined under the path to see if there's an object + * there with the given name. * - * In some cases, it is desirable to break up the path used to describe an item - * in the names namespace into a path and a name. This is analogous to a - * file system operation in which you provide a directory name and a file name. + * In some cases, it is desirable to break up the path used to + * describe an item in the names namespace into a path and a name. + * This is analogous to a file system operation in which you provide + * a directory name and a file name. * - * For example, consider a situation where you have previously named an object - * "/Names/server/eth0". If you want to discover the object which you associated - * with this path, you could do this in two ways, depending on which was more - * convenient: Names::Find ("/Names/server/eth0") or, using the split path and - * name approach, Names::Find ("/Names/server", "eth0"). + * For example, consider a situation where you have previously named + * an object "/Names/server/eth0". If you want to discover the + * object which you associated with this path, you could do this in + * two ways, depending on which was more convenient: Names::Find + * ("/Names/server/eth0") or, using the split path and name + * approach, Names::Find ("/Names/server", "eth0"). * - * However, the path is sometimes not available, and you only have the object - * that is represented by the path in the names name space. To support this - * use-case in a reasonably high-performance way, the path string is can be - * replaced by the object pointer to which that path would refer. In the spirit - * of the Config code where this use-case is most prominent, we refer to this - * object as the "context" for the names operation. + * However, the path is sometimes not available, and you only have + * the object that is represented by the path in the names name + * space. To support this use-case in a reasonably high-performance + * way, the path string is can be replaced by the object pointer to + * which that path would refer. In the spirit of the Config code + * where this use-case is most prominent, we refer to this object as + * the "context" for the names operation. * - * You can think of the context roughly as the inode number of a directory file - * in Unix. The inode number can be used to look up the directory file which - * contains the list of file names defined at that directory level. Similarly - * the context is used to look up an internal name service entry which contains - * the names defined for that context. + * You can think of the context roughly as the inode number of a + * directory file in Unix. The inode number can be used to look up + * the directory file which contains the list of file names defined + * at that directory level. Similarly the context is used to look + * up an internal name service entry which contains the names + * defined for that context. * - * \param context A smart pointer to an object that is used in place of the path - * under which you want this new name to be defined. - * \param name A string containing a name to search for. + * \param [in] context A smart pointer to an object that is used + * in place of the path under which you want this + * new name to be defined. + * \param [in] name A string containing a name to search for. * - * \returns a smart pointer to the named object converted to the requested - * type. + * \returns A smart pointer to the named object converted to + * the requested type. */ template static Ptr Find (Ptr context, std::string name); @@ -375,30 +418,33 @@ private: /** * \brief Non-templated internal version of Names::Find * - * \param path A string containing the path of the object to look for. + * \param [in] path A string containing the path of the object + * to look for. * - * \returns a smart pointer to the named object. + * \returns A smart pointer to the named object. */ static Ptr FindInternal (std::string path); /** * \brief Non-templated internal version of Names::Find * - * \param path A string containing the path to search for the object in. - * \param name A string containing the name of the object to look for. + * \param [in] path A string containing the path to search + * for the object in. + * \param [in] name A string containing the name of the object + * to look for. * - * \returns a smart pointer to the named object. + * \returns A smart pointer to the named object. */ static Ptr FindInternal (std::string path, std::string name); /** * \brief Non-templated internal version of Names::Find * - * \param context A smart pointer to an object under which you want to look - * for the provided name. - * \param name A string containing the name to look for. + * \param [in] context A smart pointer to an object under which + * you want to look for the provided name. + * \param [in] name A string containing the name to look for. * - * \returns a smart pointer to the named object. + * \returns A smart pointer to the named object. */ static Ptr FindInternal (Ptr context, std::string name); }; diff --git a/src/core/model/nstime.h b/src/core/model/nstime.h index bc66c8a45..e63c9f756 100644 --- a/src/core/model/nstime.h +++ b/src/core/model/nstime.h @@ -123,7 +123,7 @@ public: /** * Assignment operator * \param [in] o Time to assign. - * \return the Time. + * \return The Time. */ inline Time & operator = (const Time & o) { @@ -246,7 +246,7 @@ public: * There can be no white space between the numerical portion * and the units. Any otherwise malformed string causes a fatal error to * occur. - * \param s The string to parse into a Time + * \param [in] s The string to parse into a Time */ explicit Time (const std::string & s); @@ -270,27 +270,27 @@ public: } } - /** \return true if the time is zero, false otherwise. */ + /** \return \c true if the time is zero, \c false otherwise. */ inline bool IsZero (void) const { return m_data == 0; } - /** \return true if the time is negative or zero, false otherwise. */ + /** \return \c true if the time is negative or zero, \c false otherwise. */ inline bool IsNegative (void) const { return m_data <= 0; } - /** \return true if the time is positive or zero, false otherwise. */ + /** \return \c true if the time is positive or zero, \c false otherwise. */ inline bool IsPositive (void) const { return m_data >= 0; } - /** \return true if the time is strictly negative, false otherwise. */ + /** \return \c true if the time is strictly negative, \c false otherwise. */ inline bool IsStrictlyNegative (void) const { return m_data < 0; } - /** \return true if the time is strictly positive, false otherwise. */ + /** \return \c true if the time is strictly positive, \c false otherwise. */ inline bool IsStrictlyPositive (void) const { return m_data > 0; @@ -372,7 +372,7 @@ public: */ /** * Get the raw time value, in the current resolution unit. - * \returns the raw time value + * \returns The raw time value */ inline int64_t GetTimeStep (void) const { @@ -390,7 +390,7 @@ public: /** - * \param resolution the new resolution to use + * \param [in] resolution The new resolution to use * * Change the global resolution used to convert all * user-provided time values in Time objects and Time objects @@ -398,7 +398,7 @@ public: */ static void SetResolution (enum Unit resolution); /** - * \returns the current global resolution. + * \returns The current global resolution. */ static enum Unit GetResolution (void); @@ -526,7 +526,7 @@ public: * \endcode * will print ``+3140.0ms`` * - * \param unit [in] The unit to use. + * \param [in] unit The unit to use. * \return The Time with embedded unit. */ TimeWithUnit As (const enum Unit unit) const; @@ -534,8 +534,8 @@ public: /** * TracedValue callback signature for Time * - * \param [in] oldValue original value of the traced variable - * \param [in] newValue new value of the traced variable + * \param [in] oldValue Original value of the traced variable + * \param [in] newValue New value of the traced variable */ typedef void (* TracedValueCallback)(const Time oldValue, const Time newValue); @@ -571,7 +571,7 @@ private: * Get the Information record for \p timeUnit for the current Resolution * * \param [in] timeUnit The Unit to get Information for - * \return the Information for \p timeUnit + * \return The Information for \p timeUnit */ static inline struct Information *PeekInformation (enum Unit timeUnit) { @@ -633,7 +633,7 @@ public: /** * Function to force static initialization of Time. * - * \return true on the first call + * \return \c true on the first call */ static bool StaticInit (); private: @@ -694,22 +694,22 @@ private: /** * Absolute value function for Time - * \param time the input value - * \returns the absolute value of the input value. + * \param [in] time The input value + * \returns The absolute value of the input value. */ friend Time Abs (const Time & time); /** * Max function for Time. - * \param ta the first value - * \param tb the seconds value - * \returns the max of the two input values. + * \param [in] ta The first value + * \param [in] tb The seconds value + * \returns The max of the two input values. */ friend Time Max (const Time & ta, const Time & tb); /** * Min function for Time. - * \param ta the first value - * \param tb the seconds value - * \returns the min of the two input values. + * \param [in] ta The first value + * \param [in] tb The seconds value + * \returns The min of the two input values. */ friend Time Min (const Time & ta, const Time & tb); @@ -823,7 +823,7 @@ inline Time Min (const Time & ta, const Time & tb) * The stream `width` and `precision` are ignored; Time output always * includes ".0". * - * \param [in] os The output stream. + * \param [in,out] os The output stream. * \param [in] time The Time to put on the stream. * \return The stream. */ @@ -834,7 +834,7 @@ std::ostream & operator << (std::ostream & os, const Time & time); * * Uses the Time::Time (const std::string &) constructor * - * \param [in] is The input stream. + * \param [in,out] is The input stream. * \param [out] time The Time variable to set from the stream data. * \return The stream. */ @@ -854,7 +854,7 @@ std::istream & operator >> (std::istream & is, Time & time); /** * \ingroup timecivil * Construct a Time in the indicated unit. - * \param value The value + * \param [in] value The value * \return The Time * @{ */ @@ -962,7 +962,7 @@ ATTRIBUTE_ACCESSOR_DEFINE (Time); * * \param [in] min Minimum allowed value. * \param [in] max Maximum allowed value. - * \return the AttributeChecker + * \return The AttributeChecker */ Ptr MakeTimeChecker (const Time min, const Time max); @@ -970,7 +970,7 @@ Ptr MakeTimeChecker (const Time min, const Time max); * \ingroup time * \brief Helper to make an unbounded Time checker. * - * \return the AttributeChecker + * \return The AttributeChecker */ inline Ptr MakeTimeChecker (void) @@ -983,7 +983,7 @@ Ptr MakeTimeChecker (void) * \brief Helper to make a Time checker with a lower bound. * * \param [in] min Minimum allowed value. - * \return the AttributeChecker + * \return The AttributeChecker */ inline Ptr MakeTimeChecker (const Time min) @@ -1015,7 +1015,7 @@ private: /** * Output streamer - * \param [in] os The stream. + * \param [in,out] os The stream. * \param [in] timeU The Time with desired unit * \returns The stream. */ diff --git a/src/core/model/object-base.h b/src/core/model/object-base.h index 69804c193..3d3566d1c 100644 --- a/src/core/model/object-base.h +++ b/src/core/model/object-base.h @@ -149,9 +149,9 @@ public: * * The target trace source should be registered with TypeId::AddTraceSource. * - * \param name The name of the target trace source. - * \param context The trace context associated to the callback. - * \param cb The callback to connect to the trace source. + * \param [in] name The name of the target trace source. + * \param [in] context The trace context associated to the callback. + * \param [in] cb The callback to connect to the trace source. * \returns \c true. */ bool TraceConnect (std::string name, std::string context, const CallbackBase &cb); @@ -160,8 +160,8 @@ public: * * The target trace source should be registered with TypeId::AddTraceSource. * - * \param name The name of the target trace source. - * \param cb The callback to connect to the trace source. + * \param [in] name The name of the target trace source. + * \param [in] cb The callback to connect to the trace source. * \returns \c true. */ bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb); @@ -171,9 +171,9 @@ public: * * The target trace source should be registered with TypeId::AddTraceSource. * - * \param name The name of the target trace source. - * \param context The trace context associated to the callback. - * \param cb The callback to disconnect from the trace source. + * \param [in] name The name of the target trace source. + * \param [in] context The trace context associated to the callback. + * \param [in] cb The callback to disconnect from the trace source. * \returns \c true. */ bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb); @@ -183,8 +183,8 @@ public: * * The target trace source should be registered with TypeId::AddTraceSource. * - * \param name The name of the target trace source. - * \param cb The callback to disconnect from the trace source. + * \param [in] name The name of the target trace source. + * \param [in] cb The callback to disconnect from the trace source. * \returns \c true. */ bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb); @@ -209,7 +209,7 @@ protected: * you should make sure that you invoke this method from * your most-derived constructor. * - * \param attributes The attribute values used to initialize + * \param [in] attributes The attribute values used to initialize * the member variables of this object's instance. */ void ConstructSelf (const AttributeConstructionList &attributes); diff --git a/src/core/model/object-factory.h b/src/core/model/object-factory.h index 040b0b827..01e0d4a0b 100644 --- a/src/core/model/object-factory.h +++ b/src/core/model/object-factory.h @@ -57,7 +57,7 @@ public: /** * Construct a factory for a specific TypeId by name. * - * \param typeId The name of the TypeId this factory should create. + * \param [in] typeId The name of the TypeId this factory should create. */ ObjectFactory (std::string typeId); @@ -65,7 +65,7 @@ public: /** * Set the TypeId of the Objects to be created by this factory. * - * \param tid The TypeId of the object to instantiate. + * \param [in] tid The TypeId of the object to instantiate. */ void SetTypeId (TypeId tid); void SetTypeId (const char *tid); @@ -75,8 +75,8 @@ public: /** * Set an attribute to be set during construction. * - * \param name The name of the attribute to set. - * \param value The value of the attribute to set. + * \param [in] name The name of the attribute to set. + * \param [in] value The value of the attribute to set. */ void Set (std::string name, const AttributeValue &value); @@ -112,7 +112,7 @@ private: * The configuration will be printed as a string with the form * "[=|...]" * - * \param [in] os The stream. + * \param [in,out] os The stream. * \param [in] factory The ObjectFactory. * \returns The stream. */ @@ -123,7 +123,7 @@ private: * The configuration should be in the form * "[=|...]" * - * \param [in] is The input stream. + * \param [in,out] is The input stream. * \param [out] factory The factory to configure as described by the stream. * \return The stream. */ @@ -147,37 +147,39 @@ std::istream & operator >> (std::istream &is, ObjectFactory &factory); * Allocate an Object on the heap and initialize with a set of attributes. * * \tparam T \explicit The requested Object type. - * \param n1 Name of attribute - * \param v1 Value of attribute - * \param n2 Name of attribute - * \param v2 Value of attribute - * \param n3 Name of attribute - * \param v3 Value of attribute - * \param n4 Name of attribute - * \param v4 Value of attribute - * \param n5 Name of attribute - * \param v5 Value of attribute - * \param n6 Name of attribute - * \param v6 Value of attribute - * \param n7 Name of attribute - * \param v7 Value of attribute - * \param n8 Name of attribute - * \param v8 Value of attribute - * \param n9 Name of attribute - * \param v9 Value of attribute + * \param [in] n1 Name of attribute + * \param [in] v1 Value of attribute + * \param [in] n2 Name of attribute + * \param [in] v2 Value of attribute + * \param [in] n3 Name of attribute + * \param [in] v3 Value of attribute + * \param [in] n4 Name of attribute + * \param [in] v4 Value of attribute + * \param [in] n5 Name of attribute + * \param [in] v5 Value of attribute + * \param [in] n6 Name of attribute + * \param [in] v6 Value of attribute + * \param [in] n7 Name of attribute + * \param [in] v7 Value of attribute + * \param [in] n8 Name of attribute + * \param [in] v8 Value of attribute + * \param [in] n9 Name of attribute + * \param [in] v9 Value of attribute * \returns A pointer to a newly allocated object. */ template Ptr -CreateObjectWithAttributes (std::string n1 = "", const AttributeValue & v1 = EmptyAttributeValue (), - std::string n2 = "", const AttributeValue & v2 = EmptyAttributeValue (), - std::string n3 = "", const AttributeValue & v3 = EmptyAttributeValue (), - std::string n4 = "", const AttributeValue & v4 = EmptyAttributeValue (), - std::string n5 = "", const AttributeValue & v5 = EmptyAttributeValue (), - std::string n6 = "", const AttributeValue & v6 = EmptyAttributeValue (), - std::string n7 = "", const AttributeValue & v7 = EmptyAttributeValue (), - std::string n8 = "", const AttributeValue & v8 = EmptyAttributeValue (), - std::string n9 = "", const AttributeValue & v9 = EmptyAttributeValue ()); +CreateObjectWithAttributes + (std::string n1 = "", const AttributeValue & v1 = EmptyAttributeValue (), + std::string n2 = "", const AttributeValue & v2 = EmptyAttributeValue (), + std::string n3 = "", const AttributeValue & v3 = EmptyAttributeValue (), + std::string n4 = "", const AttributeValue & v4 = EmptyAttributeValue (), + std::string n5 = "", const AttributeValue & v5 = EmptyAttributeValue (), + std::string n6 = "", const AttributeValue & v6 = EmptyAttributeValue (), + std::string n7 = "", const AttributeValue & v7 = EmptyAttributeValue (), + std::string n8 = "", const AttributeValue & v8 = EmptyAttributeValue (), + std::string n9 = "", const AttributeValue & v9 = EmptyAttributeValue () + ); ATTRIBUTE_HELPER_HEADER (ObjectFactory); diff --git a/src/core/model/object-ptr-container.h b/src/core/model/object-ptr-container.h index 8d4493308..0c4ed5536 100644 --- a/src/core/model/object-ptr-container.h +++ b/src/core/model/object-ptr-container.h @@ -72,7 +72,7 @@ public: /** * Get a specific Object. * - * \param i The index of the requested object. + * \param [in] i The index of the requested object. * \returns The requested object */ Ptr Get (uint32_t i) const; @@ -88,15 +88,15 @@ public: * * Note this serializes the Ptr values, not the Objects themselves. * - * \param checker The checker to use (currently not used.) + * \param [in] checker The checker to use (currently not used.) * \returns The string form of the Objects. */ virtual std::string SerializeToString (Ptr checker) const; /** * Deserialize from a string. (Not implemented; raises a fatal error.) * - * \param value The serialized string form. - * \param checker The checker to use. + * \param [in] value The serialized string form. + * \param [in] checker The checker to use. * \returns \c true. */ virtual bool DeserializeFromString (std::string value, Ptr checker); diff --git a/src/core/model/object.h b/src/core/model/object.h index 72f435fff..ba24a7be5 100644 --- a/src/core/model/object.h +++ b/src/core/model/object.h @@ -155,9 +155,9 @@ private: template inline Ptr GetObject (void) const; /** - * Get a pointer to the requested aggregated Object. + * Get a pointer to the requested aggregated Object by TypeId. * - * \param tid The TypeId of the requested Object. + * \param [in] tid The TypeId of the requested Object. * \returns A pointer to the requested Object, or zero * if it could not be found. */ @@ -181,7 +181,7 @@ private: /** * Aggregate two Objects together. * - * \param other The other Object pointer + * \param [in] other The other Object pointer * * This method aggregates the two Objects together: after this * method returns, it becomes possible to call GetObject() @@ -265,7 +265,7 @@ protected: /** * Copy an Object. * - * \param o the Object to copy. + * \param [in] o the Object to copy. * * Allow subclasses to implement a copy constructor. * @@ -289,7 +289,7 @@ private: /** * Copy an Object. * - * \param object A pointer to the object to copy. + * \param [in] object A pointer to the object to copy. * \returns A copy of the input object. * * This method invoke the copy constructor of the input object @@ -338,7 +338,7 @@ private: /** * Find an Object of TypeId tid in the aggregates of this Object. * - * \param tid The TypeId we're looking for + * \param [in] tid The TypeId we're looking for * \return The matching Object, if it is found */ Ptr DoGetObject (TypeId tid) const; @@ -363,7 +363,7 @@ private: /** * Set the TypeId of this Object. - * \param tid The TypeId value to set. + * \param [in] tid The TypeId value to set. * * Invoked from ns3::CreateObject only. * Initialize the \c m_tid member variable to @@ -373,7 +373,7 @@ private: /** * Initialize all member variables registered as Attributes of this TypeId. * - * \param attributes The attribute values used to initialize + * \param [in] attributes The attribute values used to initialize * the member variables of this Object's instance. * * Invoked from ns3::ObjectFactory::Create and ns3::CreateObject only. @@ -385,8 +385,8 @@ private: /** * Keep the list of aggregates in most-recently-used order * - * \param aggregates The list of aggregated Objects. - * \param i The most recently used entry in the list. + * \param [in,out] aggregates The list of aggregated Objects. + * \param [in] i The most recently used entry in the list. */ void UpdateSortedArray (struct Aggregates *aggregates, uint32_t i) const; /** @@ -529,7 +529,7 @@ Ptr CreateObject (void) * \copybrief CreateObject() * \tparam T \explicit The type of the derived object to construct. * \tparam T1 \deduced The type of the constructor argument. - * \param a1 The constructor argument + * \param [in] a1 The constructor argument * \return The derived object. */ template @@ -543,8 +543,8 @@ Ptr CreateObject (T1 a1) * \tparam T \explicit The type of the derived object to construct. * \tparam T1 \deduced The type of the first constructor argument. * \tparam T2 \deduced The type of the second constructor argument. - * \param a1 The constructor first argument - * \param a2 The constructor second argument + * \param [in] a1 The constructor first argument + * \param [in] a2 The constructor second argument * \return The derived object. */ template @@ -559,9 +559,9 @@ Ptr CreateObject (T1 a1, T2 a2) * \tparam T1 \deduced The type of the first constructor argument. * \tparam T2 \deduced The type of the second constructor argument. * \tparam T3 \deduced The type of the third constructor argument. - * \param a1 The constructor first argument - * \param a2 The constructor second argument - * \param a3 The constructor third argument + * \param [in] a1 The constructor first argument + * \param [in] a2 The constructor second argument + * \param [in] a3 The constructor third argument * \return The derived object. */ template @@ -577,10 +577,10 @@ Ptr CreateObject (T1 a1, T2 a2, T3 a3) * \tparam T2 \deduced The type of the second constructor argument. * \tparam T3 \deduced The type of the third constructor argument. * \tparam T4 \deduced The type of the fourth constructor argument. - * \param a1 The constructor first argument - * \param a2 The constructor second argument - * \param a3 The constructor third argument - * \param a4 The constructor fourth argument + * \param [in] a1 The constructor first argument + * \param [in] a2 The constructor second argument + * \param [in] a3 The constructor third argument + * \param [in] a4 The constructor fourth argument * \return The derived object. */ template @@ -597,11 +597,11 @@ Ptr CreateObject (T1 a1, T2 a2, T3 a3, T4 a4) * \tparam T3 \deduced The type of the third constructor argument. * \tparam T4 \deduced The type of the fourth constructor argument. * \tparam T5 \deduced The type of the fifth constructor argument. - * \param a1 The constructor first argument - * \param a2 The constructor second argument - * \param a3 The constructor third argument - * \param a4 The constructor fourth argument - * \param a5 The constructor fifth argument + * \param [in] a1 The constructor first argument + * \param [in] a2 The constructor second argument + * \param [in] a3 The constructor third argument + * \param [in] a4 The constructor fourth argument + * \param [in] a5 The constructor fifth argument * \return The derived object. */ template @@ -619,12 +619,12 @@ Ptr CreateObject (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) * \tparam T4 \deduced The type of the fourth constructor argument. * \tparam T5 \deduced The type of the fifth constructor argument. * \tparam T6 \deduced The type of the sixth constructor argument. - * \param a1 The constructor first argument - * \param a2 The constructor second argument - * \param a3 The constructor third argument - * \param a4 The constructor fourth argument - * \param a5 The constructor fifth argument - * \param a6 The constructor sixth argument + * \param [in] a1 The constructor first argument + * \param [in] a2 The constructor second argument + * \param [in] a3 The constructor third argument + * \param [in] a4 The constructor fourth argument + * \param [in] a5 The constructor fifth argument + * \param [in] a6 The constructor sixth argument * \return The derived object. */ template @@ -643,13 +643,13 @@ Ptr CreateObject (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) * \tparam T5 \deduced The type of the fifth constructor argument. * \tparam T6 \deduced The type of the sixth constructor argument. * \tparam T7 \deduced The type of the seventh constructor argument. - * \param a1 The constructor first argument - * \param a2 The constructor second argument - * \param a3 The constructor third argument - * \param a4 The constructor fourth argument - * \param a5 The constructor fifth argument - * \param a6 The constructor sixth argument - * \param a7 The constructor seventh argument + * \param [in] a1 The constructor first argument + * \param [in] a2 The constructor second argument + * \param [in] a3 The constructor third argument + * \param [in] a4 The constructor fourth argument + * \param [in] a5 The constructor fifth argument + * \param [in] a6 The constructor sixth argument + * \param [in] a7 The constructor seventh argument * \return The derived object. */ template diff --git a/src/core/model/ptr.h b/src/core/model/ptr.h index bbb4f9ce4..c205facb5 100644 --- a/src/core/model/ptr.h +++ b/src/core/model/ptr.h @@ -94,8 +94,8 @@ private: * to returning to the caller so the caller is * responsible for calling Unref himself. * - * \param p smart pointer - * \return the pointer managed by this smart pointer. + * \param [in] p Smart pointer + * \return The pointer managed by this smart pointer. */ template friend U *GetPointer (const Ptr &p); @@ -106,8 +106,8 @@ private: * to returning to the caller so the caller is not * responsible for calling Unref himself. * - * \param p smart pointer - * \return the pointer managed by this smart pointer. + * \param [in] p Smart pointer + * \return The pointer managed by this smart pointer. */ template friend U *PeekPointer (const Ptr &p); @@ -126,15 +126,15 @@ public: * same, so that object is deleted if no more references to it * remain. * - * \param ptr raw pointer to manage + * \param [in] ptr Raw pointer to manage */ Ptr (T *ptr); /** * Create a smart pointer which points to the object pointed to by * the input raw pointer ptr. * - * \param ptr raw pointer to manage - * \param ref if set to true, this method calls Ref, otherwise, + * \param [in] ptr Raw pointer to manage + * \param [in] ref if set to true, this method calls Ref, otherwise, * it does not call Ref. */ Ptr (T *ptr, bool ref); @@ -189,7 +189,7 @@ public: * Ptr<..> p = ...; * if (!p) ... * \endcode - * \returns true if the underlying pointer is NULL. + * \returns \c true if the underlying pointer is NULL. */ bool operator! (); /** @@ -225,7 +225,7 @@ Ptr Create (void); /** * \tparam T \explicit The type of class object to create. * \tparam T1 \deduced The type of the first constructor argument. - * \param a1 The first constructor argument. + * \param [in] a1 The first constructor argument. * \return A Ptr to the newly created \c T. */ template Create (T1 a1); * \tparam T \explicit The type of class object to create. * \tparam T1 \deduced The type of the first constructor argument. * \tparam T2 \deduced The type of the second constructor argument. - * \param a1 The first constructor argument. - * \param a2 The second constructor argument. + * \param [in] a1 The first constructor argument. + * \param [in] a2 The second constructor argument. * \return A Ptr to the newly created \c T. */ template Create (T1 a1, T2 a2); * \tparam T1 \deduced The type of the first constructor argument. * \tparam T2 \deduced The type of the second constructor argument. * \tparam T3 \deduced The type of the third constructor argument. - * \param a1 The first constructor argument. - * \param a2 The second constructor argument. - * \param a3 The third constructor argument. + * \param [in] a1 The first constructor argument. + * \param [in] a2 The second constructor argument. + * \param [in] a3 The third constructor argument. * \return A Ptr to the newly created \c T. */ template Create (T1 a1, T2 a2, T3 a3); * \tparam T2 \deduced The type of the second constructor argument. * \tparam T3 \deduced The type of the third constructor argument. * \tparam T4 \deduced The type of the fourth constructor argument. - * \param a1 The first constructor argument. - * \param a2 The second constructor argument. - * \param a3 The third constructor argument. - * \param a4 The fourth constructor argument. + * \param [in] a1 The first constructor argument. + * \param [in] a2 The second constructor argument. + * \param [in] a3 The third constructor argument. + * \param [in] a4 The fourth constructor argument. * \return A Ptr to the newly created \c T. */ template Create (T1 a1, T2 a2, T3 a3, T4 a4); * \tparam T3 \deduced The type of the third constructor argument. * \tparam T4 \deduced The type of the fourth constructor argument. * \tparam T5 \deduced The type of the fifth constructor argument. - * \param a1 The first constructor argument. - * \param a2 The second constructor argument. - * \param a3 The third constructor argument. - * \param a4 The fourth constructor argument. - * \param a5 The fifth constructor argument. + * \param [in] a1 The first constructor argument. + * \param [in] a2 The second constructor argument. + * \param [in] a3 The third constructor argument. + * \param [in] a4 The fourth constructor argument. + * \param [in] a5 The fifth constructor argument. * \return A Ptr to the newly created \c T. */ template Create (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); * \tparam T4 \deduced The type of the fourth constructor argument. * \tparam T5 \deduced The type of the fifth constructor argument. * \tparam T6 \deduced The type of the sixth constructor argument. - * \param a1 The first constructor argument. - * \param a2 The second constructor argument. - * \param a3 The third constructor argument. - * \param a4 The fourth constructor argument. - * \param a5 The fifth constructor argument. - * \param a6 The sixth constructor argument. + * \param [in] a1 The first constructor argument. + * \param [in] a2 The second constructor argument. + * \param [in] a3 The third constructor argument. + * \param [in] a4 The fourth constructor argument. + * \param [in] a5 The fifth constructor argument. + * \param [in] a6 The sixth constructor argument. * \return A Ptr to the newly created \c T. */ template Create (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6); * \tparam T5 \deduced The type of the fifth constructor argument. * \tparam T6 \deduced The type of the sixth constructor argument. * \tparam T7 \deduced The type of the seventh constructor argument. - * \param a1 The first constructor argument. - * \param a2 The second constructor argument. - * \param a3 The third constructor argument. - * \param a4 The fourth constructor argument. - * \param a5 The fifth constructor argument. - * \param a6 The sixth constructor argument. - * \param a7 The seventh constructor argument. + * \param [in] a1 The first constructor argument. + * \param [in] a2 The second constructor argument. + * \param [in] a3 The third constructor argument. + * \param [in] a4 The fourth constructor argument. + * \param [in] a5 The fifth constructor argument. + * \param [in] a6 The sixth constructor argument. + * \param [in] a7 The seventh constructor argument. * \return A Ptr to the newly created \c T. */ template Create (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7); /** * \ingroup ptr * Output streamer. - * \param [in] os The output stream. + * \param [in,out] os The output stream. * \param [in] p The Ptr. * \returns The stream. */ @@ -372,7 +372,7 @@ std::ostream &operator << (std::ostream &os, const Ptr &p); * \tparam T2 \deduced Type of the object on the rhs. * \param [in] lhs The left operand. * \param [in] rhs The right operand. - * \return true if the operands point to the same underlying object. + * \return \c true if the operands point to the same underlying object. */ /** @{ */ template @@ -403,7 +403,7 @@ bool operator == (Ptr const &lhs, Ptr const &rhs); * \tparam T2 \deduced Type of the object on the rhs. * \param [in] lhs The left operand. * \param [in] rhs The right operand. - * \return true if the operands point to the same underlying object. + * \return \c true if the operands point to the same underlying object. */ /** @{ */ template @@ -442,7 +442,7 @@ bool operator >= (const Ptr &lhs, const Ptr &rhs); * * \tparam T1 \deduced The type to return in a Ptr. * \tparam T2 \deduced The type of the underlying object. - * \param p The original \c const Ptr. + * \param [in] p The original \c const Ptr. * \return A non-const Ptr. */ template @@ -466,8 +466,8 @@ template struct CallbackTraits > { /** - * \param p object pointer - * \return a reference to the object pointed to by p + * \param [in] p Object pointer + * \return A reference to the object pointed to by p */ static T & GetReference (Ptr const p) { @@ -491,8 +491,8 @@ template struct EventMemberImplObjTraits > { /** - * \param p object pointer - * \return a reference to the object pointed to by p + * \param [in] p Object pointer + * \return A reference to the object pointed to by p */ static T &GetReference (Ptr p) { return *PeekPointer (p); @@ -649,7 +649,7 @@ bool operator >= (const Ptr &lhs, const Ptr &rhs) * * \tparam T1 \deduced The desired type to cast to. * \tparam T2 \deduced The type of the original Ptr. - * \param p The original Ptr. + * \param [in] p The original Ptr. * \return The result of the cast. */ /** @{ */ @@ -678,7 +678,7 @@ StaticCast (Ptr const&p) /** * Return a deep copy of a Ptr. * - * \param object The object Ptr to copy. + * \param [in] object The object Ptr to copy. * \returns The copy. */ /** @{ */ diff --git a/src/core/model/random-variable-stream.h b/src/core/model/random-variable-stream.h index 258a08f0f..da8104908 100644 --- a/src/core/model/random-variable-stream.h +++ b/src/core/model/random-variable-stream.h @@ -113,7 +113,7 @@ public: /** * \brief Specifies the stream number for this RNG stream. - * \param stream The stream number for this RNG stream. + * \param [in] stream The stream number for this RNG stream. * -1 means "allocate a stream number automatically". */ void SetStream (int64_t stream); @@ -127,7 +127,7 @@ public: /** * \brief Specify whether antithetic values should be generated. - * \param isAntithetic If \c true antithetic value will be generated. + * \param [in] isAntithetic If \c true antithetic value will be generated. */ void SetAntithetic(bool isAntithetic); @@ -159,7 +159,7 @@ private: /** * Copy constructor. These objects are not copyable. * - * \param o The RandomVariableStream to copy in construction. + * \param [in] o The RandomVariableStream to copy in construction. * \internal * Theoretically, it is possible to give them good copy semantics * but not enough time to iron out the details. @@ -168,7 +168,7 @@ private: /** * Assignment operator. These objects can't be copied by assignement. * - * \param o The RandomVariableStream to copy. + * \param [in] o The RandomVariableStream to copy. * \return lvalue RandomVariableStream. * * \internal @@ -262,8 +262,8 @@ public: * * \note The upper limit is excluded from the output range. * - * \param min Low end of the range (included). - * \param max High end of the range (excluded). + * \param [in] min Low end of the range (included). + * \param [in] max High end of the range (excluded). * \return A floating point random value. */ double GetValue (double min, double max); @@ -274,8 +274,8 @@ public: * * \note The upper limit is included in the output range. * - * \param min Low end of the range. - * \param max High end of the range. + * \param [in] min Low end of the range. + * \param [in] max High end of the range. * \return A random unsigned integer value. */ uint32_t GetInteger (uint32_t min, uint32_t max); @@ -336,13 +336,13 @@ public: /** * \brief Get the next random value, as a double equal to the argument. - * \param constant The value to return. + * \param [in] constant The value to return. * \return The floating point argument. */ double GetValue (double constant); /** * \brief Get the next random value, as an integer equal to the argument. - * \param constant The value to return. + * \param [in] constant The value to return. * \return The integer argument. */ uint32_t GetInteger (uint32_t constant); @@ -567,8 +567,8 @@ public: /** * \brief Get the next random value, as a double from * the exponential distribution with the specified mean and upper bound. - * \param mean Mean value of the unbounded exponential distribution. - * \param bound Upper bound on values returned. + * \param [in] mean Mean value of the unbounded exponential distribution. + * \param [in] bound Upper bound on values returned. * \return A floating point random value. */ double GetValue (double mean, double bound); @@ -576,8 +576,8 @@ public: /** * \brief Get the next random value, as an unsigned integer from * the exponential distribution with the specified mean and upper bound. - * \param mean Mean value of the unbounded exponential distributuion. - * \param bound Upper bound on values returned. + * \param [in] mean Mean value of the unbounded exponential distributuion. + * \param [in] bound Upper bound on values returned. * \return A random unsigned integer value. */ uint32_t GetInteger (uint32_t mean, uint32_t bound); @@ -675,9 +675,9 @@ public: /** * \brief Returns a random double from a Pareto distribution with the specified mean, shape, and upper bound. - * \param mean Mean parameter for the Pareto distribution. - * \param shape Shape parameter for the Pareto distribution. - * \param bound Upper bound on values returned. + * \param [in] mean Mean parameter for the Pareto distribution. + * \param [in] shape Shape parameter for the Pareto distribution. + * \param [in] bound Upper bound on values returned. * \return A floating point random value. * * Note that antithetic values are being generated if @@ -708,9 +708,9 @@ public: /** * \brief Returns a random unsigned integer from a Pareto distribution with the specified mean, shape, and upper bound. - * \param mean Mean parameter for the Pareto distribution. - * \param shape Shape parameter for the Pareto distribution. - * \param bound Upper bound on values returned. + * \param [in] mean Mean parameter for the Pareto distribution. + * \param [in] shape Shape parameter for the Pareto distribution. + * \param [in] bound Upper bound on values returned. * \return A random unsigned integer value. * * Note that antithetic values are being generated if @@ -905,9 +905,9 @@ public: /** * \brief Returns a random double from a Weibull distribution with the specified scale, shape, and upper bound. - * \param scale Scale parameter for the Weibull distribution. - * \param shape Shape parameter for the Weibull distribution. - * \param bound Upper bound on values returned. + * \param [in] scale Scale parameter for the Weibull distribution. + * \param [in] shape Shape parameter for the Weibull distribution. + * \param [in] bound Upper bound on values returned. * \return A floating point random value. * * Note that antithetic values are being generated if @@ -932,9 +932,9 @@ public: /** * \brief Returns a random unsigned integer from a Weibull distribution with the specified scale, shape, and upper bound. - * \param scale Scale parameter for the Weibull distribution. - * \param shape Shape parameter for the Weibull distribution. - * \param bound Upper bound on values returned. + * \param [in] scale Scale parameter for the Weibull distribution. + * \param [in] shape Shape parameter for the Weibull distribution. + * \param [in] bound Upper bound on values returned. * \return A random unsigned integer value. * * Note that antithetic values are being generated if @@ -1094,9 +1094,9 @@ public: /** * \brief Returns a random double from a normal distribution with the specified mean, variance, and bound. - * \param mean Mean value for the normal distribution. - * \param variance Variance value for the normal distribution. - * \param bound Bound on values returned. + * \param [in] mean Mean value for the normal distribution. + * \param [in] variance Variance value for the normal distribution. + * \param [in] bound Bound on values returned. * \return A floating point random value. * * Note that antithetic values are being generated if m_isAntithetic @@ -1132,9 +1132,9 @@ public: /** * \brief Returns a random unsigned integer from a normal distribution with the specified mean, variance, and bound. - * \param mean Mean value for the normal distribution. - * \param variance Variance value for the normal distribution. - * \param bound Bound on values returned. + * \param [in] mean Mean value for the normal distribution. + * \param [in] variance Variance value for the normal distribution. + * \param [in] bound Bound on values returned. * \return A random unsigned integer value. * * Note that antithetic values are being generated if m_isAntithetic @@ -1334,8 +1334,8 @@ public: /** * \brief Returns a random double from a log-normal distribution with the specified mu and sigma. - * \param mu Mu value for the log-normal distribution. - * \param sigma Sigma value for the log-normal distribution. + * \param [in] mu Mu value for the log-normal distribution. + * \param [in] sigma Sigma value for the log-normal distribution. * \return A floating point random value. * * Note that antithetic values are being generated if m_isAntithetic @@ -1369,8 +1369,8 @@ public: /** * \brief Returns a random unsigned integer from a log-normal distribution with the specified mu and sigma. - * \param mu Mu value for the log-normal distribution. - * \param sigma Sigma value for the log-normal distribution. + * \param [in] mu Mu value for the log-normal distribution. + * \param [in] sigma Sigma value for the log-normal distribution. * \return A random unsigned integer value. * * Note that antithetic values are being generated if m_isAntithetic @@ -1543,8 +1543,8 @@ public: /** * \brief Returns a random double from a gamma distribution with the specified alpha and beta. - * \param alpha Alpha value for the gamma distribution. - * \param beta Beta value for the gamma distribution. + * \param [in] alpha Alpha value for the gamma distribution. + * \param [in] beta Beta value for the gamma distribution. * \return A floating point random value. * * Note that antithetic values are being generated if m_isAntithetic @@ -1558,8 +1558,8 @@ public: /** * \brief Returns a random unsigned integer from a gamma distribution with the specified alpha and beta. - * \param alpha Alpha value for the gamma distribution. - * \param beta Beta value for the gamma distribution. + * \param [in] alpha Alpha value for the gamma distribution. + * \param [in] beta Beta value for the gamma distribution. * \return A random unsigned integer value. * * Note that antithetic values are being generated if m_isAntithetic @@ -1605,9 +1605,9 @@ public: private: /** * \brief Returns a random double from a normal distribution with the specified mean, variance, and bound. - * \param mean Mean value for the normal distribution. - * \param variance Variance value for the normal distribution. - * \param bound Bound on values returned. + * \param [in] mean Mean value for the normal distribution. + * \param [in] variance Variance value for the normal distribution. + * \param [in] bound Bound on values returned. * \return A floating point random value. * * Note that antithetic values are being generated if m_isAntithetic @@ -1720,8 +1720,8 @@ public: /** * \brief Returns a random double from an Erlang distribution with the specified k and lambda. - * \param k K value for the Erlang distribution. - * \param lambda Lambda value for the Erlang distribution. + * \param [in] k K value for the Erlang distribution. + * \param [in] lambda Lambda value for the Erlang distribution. * \return A floating point random value. * * Note that antithetic values are being generated if m_isAntithetic @@ -1735,8 +1735,8 @@ public: /** * \brief Returns a random unsigned integer from an Erlang distribution with the specified k and lambda. - * \param k K value for the Erlang distribution. - * \param lambda Lambda value for the Erlang distribution. + * \param [in] k K value for the Erlang distribution. + * \param [in] lambda Lambda value for the Erlang distribution. * \return A random unsigned integer value. * * Note that antithetic values are being generated if m_isAntithetic @@ -1782,8 +1782,8 @@ public: private: /** * \brief Returns a random double from an exponential distribution with the specified mean and upper bound. - * \param mean Mean value of the random variables. - * \param bound Upper bound on values returned. + * \param [in] mean Mean value of the random variables. + * \param [in] bound Upper bound on values returned. * \return A floating point random value. * * Note that antithetic values are being generated if @@ -1878,9 +1878,9 @@ public: /** * \brief Returns a random double from a triangular distribution with the specified mean, min, and max. - * \param mean Mean value for the triangular distribution. - * \param min Low end of the range. - * \param max High end of the range. + * \param [in] mean Mean value for the triangular distribution. + * \param [in] min Low end of the range. + * \param [in] max High end of the range. * \return A floating point random value. * * Note that antithetic values are being generated if @@ -1918,9 +1918,9 @@ public: /** * \brief Returns a random unsigned integer from a triangular distribution with the specified mean, min, and max. - * \param mean Mean value for the triangular distribution. - * \param min Low end of the range. - * \param max High end of the range. + * \param [in] mean Mean value for the triangular distribution. + * \param [in] min Low end of the range. + * \param [in] max High end of the range. * \return A random unsigned integer value. * * Note that antithetic values are being generated if @@ -2135,8 +2135,8 @@ public: /** * \brief Returns a random double from a Zipf distribution with the specified n and alpha. - * \param n N value for the Zipf distribution. - * \param alpha Alpha value for the Zipf distribution. + * \param [in] n N value for the Zipf distribution. + * \param [in] alpha Alpha value for the Zipf distribution. * \return A floating point random value. * * Note that antithetic values are being generated if m_isAntithetic @@ -2150,8 +2150,8 @@ public: /** * \brief Returns a random unsigned integer from a Zipf distribution with the specified n and alpha. - * \param n N value for the Zipf distribution. - * \param alpha Alpha value for the Zipf distribution. + * \param [in] n N value for the Zipf distribution. + * \param [in] alpha Alpha value for the Zipf distribution. * \return A random unsigned integer value. * * Note that antithetic values are being generated if m_isAntithetic @@ -2269,7 +2269,7 @@ public: /** * \brief Returns a random double from a zeta distribution with the specified alpha. - * \param alpha Alpha value for the zeta distribution. + * \param [in] alpha Alpha value for the zeta distribution. * \return A floating point random value. * * Note that antithetic values are being generated if m_isAntithetic @@ -2283,7 +2283,7 @@ public: /** * \brief Returns a random unsigned integer from a zeta distribution with the specified alpha. - * \param alpha Alpha value for the zeta distribution. + * \param [in] alpha Alpha value for the zeta distribution. * \return A random unsigned integer value. * * Note that antithetic values are being generated if m_isAntithetic @@ -2384,8 +2384,8 @@ public: /** * \brief Sets the array of values that holds the predetermined sequence. - * \param values Array of random values to return in sequence. - * \param length Number of values in the array. + * \param [in] values Array of random values to return in sequence. + * \param [in] length Number of values in the array. * * Note that the values in the array are copied and stored * (deep-copy). @@ -2465,8 +2465,8 @@ public: /** * \brief Specifies a point in the empirical distribution - * \param v The function value for this point - * \param c Probability that the function is less than or equal to v + * \param [in] v The function value for this point + * \param [in] c Probability that the function is less than or equal to v */ void CDF (double v, double c); // Value, prob <= Value diff --git a/src/core/model/realtime-simulator-impl.h b/src/core/model/realtime-simulator-impl.h index 4283c77a8..f7c731ffe 100644 --- a/src/core/model/realtime-simulator-impl.h +++ b/src/core/model/realtime-simulator-impl.h @@ -115,8 +115,8 @@ public: /** * \copybrief ScheduleNow(EventImpl*) * - * \param context Event context. - * \param event The event to schedule. + * \param [in] context Event context. + * \param [in] event The event to schedule. */ void ScheduleRealtimeNowWithContext (uint32_t context, EventImpl *event); /** \copydoc ScheduleNow(EventImpl*) */ @@ -130,7 +130,7 @@ public: /** * Set the SynchronizationMode. * - * \param mode The new SynchronizationMode. + * \param [in] mode The new SynchronizationMode. */ void SetSynchronizationMode (RealtimeSimulatorImpl::SynchronizationMode mode); /** @@ -142,7 +142,7 @@ public: /** * Set the fatal error threshold for SynchronizationMode SYNC_HARD_LIMIT. * - * \param limit The maximum amount of real time we are allowed to fall + * \param [in] limit The maximum amount of real time we are allowed to fall * behind before we trigger a fatal error. */ void SetHardLimit (Time limit); diff --git a/src/core/model/rng-seed-manager.h b/src/core/model/rng-seed-manager.h index 776eb497d..c0848f967 100644 --- a/src/core/model/rng-seed-manager.h +++ b/src/core/model/rng-seed-manager.h @@ -50,7 +50,7 @@ public: * UniformVariable x(2,3); // These will give the same output everytime * ExponentialVariable y(120); // as long as the seed stays the same. * \endcode - * \param seed The seed value to use. + * \param [in] seed The seed value to use. * * \note While the underlying RNG takes six integer values as a seed; * it is sufficient to set these all to the same integer, so we provide diff --git a/src/core/model/rng-stream.cc b/src/core/model/rng-stream.cc index a6c107e94..0b3fe8691 100644 --- a/src/core/model/rng-stream.cc +++ b/src/core/model/rng-stream.cc @@ -109,10 +109,10 @@ const Matrix A2p0 = { /// This computes the result exactly, without exceeding the 53 bit /// precision of doubles. /// -/// \param a First multiplicative argument. -/// \param s Second multiplicative argument. -/// \param c Additive argument. -/// \param m Modulus. +/// \param [in] a First multiplicative argument. +/// \param [in] s Second multiplicative argument. +/// \param [in] c Additive argument. +/// \param [in] m Modulus. /// \returns (a*s +c) MOD m // double MultModM (double a, double s, double c, double m) @@ -150,10 +150,10 @@ double MultModM (double a, double s, double c, double m) /// Compute the vector v = A*s MOD m. Assume that -m < s[i] < m. /// Works also when v = s. /// -/// \param A Matrix argument, 3x3. -/// \param s Three component input vector. -/// \param v Three component output vector. -/// \param m Modulus. +/// \param [in] A Matrix argument, 3x3. +/// \param [in] s Three component input vector. +/// \param [out] v Three component output vector. +/// \param [in] m Modulus. // void MatVecModM (const Matrix A, const double s[3], double v[3], double m) @@ -179,10 +179,10 @@ void MatVecModM (const Matrix A, const double s[3], double v[3], /// Compute the matrix C = A*B MOD m. Assume that -m < s[i] < m. /// Note: works also if A = C or B = C or A = B = C. /// -/// \param A First matrix argument. -/// \param B Second matrix argument. -/// \param C Result matrix. -/// \param m Modulus. +/// \param [in] A First matrix argument. +/// \param [in] B Second matrix argument. +/// \param [out] C Result matrix. +/// \param [in] m Modulus. // void MatMatModM (const Matrix A, const Matrix B, Matrix C, double m) @@ -217,10 +217,10 @@ void MatMatModM (const Matrix A, const Matrix B, /// \ingroup rngimpl /// Compute the matrix B = (A^(2^e) Mod m); works also if A = B. /// -/// \param src Matrix input argument \c A. -/// \param dst Matrix output \c B. -/// \param m Modulus. -/// \param e The exponent. +/// \param [in] src Matrix input argument \c A. +/// \param [out] dst Matrix output \c B. +/// \param [in] m Modulus. +/// \param [in] e The exponent. // void MatTwoPowModM (const Matrix src, Matrix dst, double m, int32_t e) { @@ -247,10 +247,10 @@ void MatTwoPowModM (const Matrix src, Matrix dst, double m, int32_t e) /// \ingroup rngimpl /// Compute the matrix B = (A^n Mod m); works even if A = B. /// -/// \param A Matrix input argument. -/// \param B Matrix output. -/// \param m Modulus. -/// \param n Exponent. +/// \param [in] A Matrix input argument. +/// \param [out] B Matrix output. +/// \param [in] m Modulus. +/// \param [in] n Exponent. // void MatPowModM (const double A[3][3], double B[3][3], double m, int32_t n) { @@ -311,9 +311,9 @@ struct Precalculated PowerOfTwoConstants (void) } /// Get the transition matrices raised to a power of 2. /// -/// \param n The power of 2. -/// \param a1p The first transition matrix power. -/// \param a2p The second transition matrix power. +/// \param [in] n The power of 2. +/// \param [out] a1p The first transition matrix power. +/// \param [out] a2p The second transition matrix power. // void PowerOfTwoMatrix (int n, Matrix a1p, Matrix a2p) { diff --git a/src/core/model/rng-stream.h b/src/core/model/rng-stream.h index c1c889382..0a7dc21a2 100644 --- a/src/core/model/rng-stream.h +++ b/src/core/model/rng-stream.h @@ -52,15 +52,15 @@ public: /** * Construct from explicit seed, stream and substream values. * - * \param seed The starting seed. - * \param stream The stream number. - * \param substream The sub-stream number. + * \param [in] seed The starting seed. + * \param [in] stream The stream number. + * \param [in] substream The sub-stream number. */ RngStream (uint32_t seed, uint64_t stream, uint64_t substream); /** * Copy constructor. * - * \param r The RngStream to copy. + * \param [in] r The RngStream to copy. */ RngStream (const RngStream & r); /** @@ -75,9 +75,9 @@ private: /** * Advance \p state of the RNG by leaps and bounds. * - * \param nth The stream or substream index. - * \param by The log2 base of \p nth. - * \param state The state vector to advance. + * \param [in] nth The stream or substream index. + * \param [in] by The log2 base of \p nth. + * \param [in] state The state vector to advance. */ void AdvanceNthBy (uint64_t nth, int by, double state[6]); diff --git a/src/core/model/scheduler.h b/src/core/model/scheduler.h index b3579847e..fcf65c7ee 100644 --- a/src/core/model/scheduler.h +++ b/src/core/model/scheduler.h @@ -101,13 +101,13 @@ public: /** * Insert a new Event in the schedule. * - * \param ev Event to store in the event list + * \param [in] ev Event to store in the event list */ virtual void Insert (const Event &ev) = 0; /** * Test if the schedule is empty. * - * \returns true if the event list is empty and false otherwise. + * \returns \c true if the event list is empty and \c false otherwise. */ virtual bool IsEmpty (void) const = 0; /** @@ -115,7 +115,7 @@ public: * * This method cannot be invoked if the list is empty. * - * \returns a pointer to the next earliest event. The caller + * \returns A pointer to the next earliest event. The caller * takes ownership of the returned pointer. */ virtual Event PeekNext (void) const = 0; @@ -132,7 +132,7 @@ public: * * This method cannot be invoked if the list is empty. * - * \param ev the event to remove + * \param [in] ev The event to remove */ virtual void Remove (const Event &ev) = 0; }; diff --git a/src/core/model/simulator-impl.h b/src/core/model/simulator-impl.h index 24f533148..076666b00 100644 --- a/src/core/model/simulator-impl.h +++ b/src/core/model/simulator-impl.h @@ -88,7 +88,7 @@ public: /** * Set the Scheduler to be used to manage the event list. * - * \param schedulerFactory A new event scheduler factory. + * \param [in] schedulerFactory A new event scheduler factory. * * The event scheduler can be set at any time: the events scheduled * in the previous scheduler will be transfered to the new scheduler diff --git a/src/core/model/simulator.cc b/src/core/model/simulator.cc index c45a490e3..a5dfbb3ba 100644 --- a/src/core/model/simulator.cc +++ b/src/core/model/simulator.cc @@ -79,7 +79,7 @@ static GlobalValue g_schedTypeImpl = GlobalValue ("SchedulerType", * \ingroup logging * Default TimePrinter implementation. * - * \param [in] os The output stream to print the time on. + * \param [in,out] os The output stream to print the time on. */ static void TimePrinter (std::ostream &os) @@ -91,7 +91,7 @@ TimePrinter (std::ostream &os) * \ingroup logging * Default node id printer implementation. * - * \param [in] os The output stream to print the node id on. + * \param [in,out] os The output stream to print the node id on. */ static void NodePrinter (std::ostream &os) diff --git a/src/core/model/simulator.h b/src/core/model/simulator.h index b1a08566c..d4e2b0f7a 100644 --- a/src/core/model/simulator.h +++ b/src/core/model/simulator.h @@ -71,7 +71,7 @@ class Simulator { public: /** - * @param impl A new simulator implementation. + * @param [in] impl A new simulator implementation. * * The simulator provides a mechanism to swap out different implementations. * For example, the default implementation is a single-threaded simulator @@ -105,7 +105,7 @@ public: /** * @brief Set the scheduler type with an ObjectFactory. - * @param schedulerFactory The configured ObjectFactory. + * @param [in] schedulerFactory The configured ObjectFactory. * * The event scheduler can be set at any time: the events scheduled * in the previous scheduler will be transfered to the new scheduler @@ -164,7 +164,7 @@ public: * expiration time of the next event to be processed is greater than * or equal to the stop time. The stop time is relative to the * current simulation time. - * @param delay The stop time, relative to the current time. + * @param [in] delay The stop time, relative to the current time. */ static void Stop (Time const &delay); @@ -183,9 +183,9 @@ public: * * @tparam MEM @inferred Class method function signature type. * @tparam OBJ @inferred Class type of the object. - * @param delay The relative expiration time of the event. - * @param mem_ptr Member method pointer to invoke - * @param obj The object on which to invoke the member method + * @param [in] delay The relative expiration time of the event. + * @param [in] mem_ptr Member method pointer to invoke + * @param [in] obj The object on which to invoke the member method * @returns The id for the scheduled event. */ template @@ -196,10 +196,10 @@ public: * @tparam MEM @inferred Class method function signature type. * @tparam OBJ @inferred Class type of the object. * @tparam T1 @inferred Type of first argument. - * @param delay The relative expiration time of the event. - * @param mem_ptr Member method pointer to invoke - * @param obj The object on which to invoke the member method - * @param a1 The first argument to pass to the invoked method + * @param [in] delay The relative expiration time of the event. + * @param [in] mem_ptr Member method pointer to invoke + * @param [in] obj The object on which to invoke the member method + * @param [in] a1 The first argument to pass to the invoked method * @returns The id for the scheduled event. */ template @@ -211,11 +211,11 @@ public: * @tparam OBJ @inferred Class type of the object. * @tparam T1 @inferred Type of first argument. * @tparam T2 @inferred Type of second argument. - * @param delay The relative expiration time of the event. - * @param mem_ptr Member method pointer to invoke - * @param obj The object on which to invoke the member method - * @param a1 The first argument to pass to the invoked method - * @param a2 The second argument to pass to the invoked method + * @param [in] delay The relative expiration time of the event. + * @param [in] mem_ptr Member method pointer to invoke + * @param [in] obj The object on which to invoke the member method + * @param [in] a1 The first argument to pass to the invoked method + * @param [in] a2 The second argument to pass to the invoked method * @returns The id for the scheduled event. */ template @@ -228,12 +228,12 @@ public: * @tparam T1 @inferred Type of first argument. * @tparam T2 @inferred Type of second argument. * @tparam T3 @inferred Type of third argument. - * @param delay The relative expiration time of the event. - * @param mem_ptr Member method pointer to invoke - * @param obj The object on which to invoke the member method - * @param a1 The first argument to pass to the invoked method - * @param a2 The second argument to pass to the invoked method - * @param a3 The third argument to pass to the invoked method + * @param [in] delay The relative expiration time of the event. + * @param [in] mem_ptr Member method pointer to invoke + * @param [in] obj The object on which to invoke the member method + * @param [in] a1 The first argument to pass to the invoked method + * @param [in] a2 The second argument to pass to the invoked method + * @param [in] a3 The third argument to pass to the invoked method * @returns The id for the scheduled event. */ template @@ -313,10 +313,10 @@ public: * @tparam U2 @inferred Formal type of the second argument to the function. * @tparam T1 @inferred Actual type of the first argument. * @tparam T2 @inferred Actual type of the second argument. - * @param delay The relative expiration time of the event. - * @param f The function to invoke - * @param a1 The first argument to pass to the function to invoke - * @param a2 The second argument to pass to the function to invoke + * @param [in] delay The relative expiration time of the event. + * @param [in] f The function to invoke + * @param [in] a1 The first argument to pass to the function to invoke + * @param [in] a2 The second argument to pass to the function to invoke * @returns The id for the scheduled event. */ template static void ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj); @@ -418,11 +418,11 @@ public: * @tparam MEM @inferred Class method function signature type. * @tparam OBJ @inferred Class type of the object. * @tparam T1 @inferred Type of first argument. - * @param context User-specified context parameter - * @param delay The relative expiration time of the event. - * @param mem_ptr Member method pointer to invoke - * @param obj The object on which to invoke the member method - * @param a1 The first argument to pass to the invoked method + * @param [in] context User-specified context parameter + * @param [in] delay The relative expiration time of the event. + * @param [in] mem_ptr Member method pointer to invoke + * @param [in] obj The object on which to invoke the member method + * @param [in] a1 The first argument to pass to the invoked method */ template static void ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj, T1 a1); @@ -433,12 +433,12 @@ public: * @tparam OBJ @inferred Class type of the object. * @tparam T1 @inferred Type of first argument. * @tparam T2 @inferred Type of second argument. - * @param context User-specified context parameter - * @param delay The relative expiration time of the event. - * @param mem_ptr Member method pointer to invoke - * @param obj The object on which to invoke the member method - * @param a1 The first argument to pass to the invoked method - * @param a2 The second argument to pass to the invoked method + * @param [in] context User-specified context parameter + * @param [in] delay The relative expiration time of the event. + * @param [in] mem_ptr Member method pointer to invoke + * @param [in] obj The object on which to invoke the member method + * @param [in] a1 The first argument to pass to the invoked method + * @param [in] a2 The second argument to pass to the invoked method */ template static void ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj, T1 a1, T2 a2); @@ -450,13 +450,13 @@ public: * @tparam T1 @inferred Type of first argument. * @tparam T2 @inferred Type of second argument. * @tparam T3 @inferred Type of third argument. - * @param context User-specified context parameter - * @param delay The relative expiration time of the event. - * @param mem_ptr Member method pointer to invoke - * @param obj The object on which to invoke the member method - * @param a1 The first argument to pass to the invoked method - * @param a2 The second argument to pass to the invoked method - * @param a3 The third argument to pass to the invoked method + * @param [in] context User-specified context parameter + * @param [in] delay The relative expiration time of the event. + * @param [in] mem_ptr Member method pointer to invoke + * @param [in] obj The object on which to invoke the member method + * @param [in] a1 The first argument to pass to the invoked method + * @param [in] a2 The second argument to pass to the invoked method + * @param [in] a3 The third argument to pass to the invoked method */ template @@ -470,14 +470,14 @@ public: * @tparam T2 @inferred Type of second argument. * @tparam T3 @inferred Type of third argument. * @tparam T4 @inferred Type of fourth argument. - * @param context User-specified context parameter - * @param delay The relative expiration time of the event. - * @param mem_ptr Member method pointer to invoke - * @param obj The object on which to invoke the member method - * @param a1 The first argument to pass to the invoked method - * @param a2 The second argument to pass to the invoked method - * @param a3 The third argument to pass to the invoked method - * @param a4 The fourth argument to pass to the invoked method + * @param [in] context User-specified context parameter + * @param [in] delay The relative expiration time of the event. + * @param [in] mem_ptr Member method pointer to invoke + * @param [in] obj The object on which to invoke the member method + * @param [in] a1 The first argument to pass to the invoked method + * @param [in] a2 The second argument to pass to the invoked method + * @param [in] a3 The third argument to pass to the invoked method + * @param [in] a4 The fourth argument to pass to the invoked method */ template @@ -492,15 +492,15 @@ public: * @tparam T3 @inferred Type of third argument. * @tparam T4 @inferred Type of fourth argument. * @tparam T5 @inferred Type of fifth argument. - * @param context User-specified context parameter - * @param delay The relative expiration time of the event. - * @param mem_ptr Member method pointer to invoke - * @param obj The object on which to invoke the member method - * @param a1 The first argument to pass to the invoked method - * @param a2 The second argument to pass to the invoked method - * @param a3 The third argument to pass to the invoked method - * @param a4 The fourth argument to pass to the invoked method - * @param a5 The fifth argument to pass to the invoked method + * @param [in] context User-specified context parameter + * @param [in] delay The relative expiration time of the event. + * @param [in] mem_ptr Member method pointer to invoke + * @param [in] obj The object on which to invoke the member method + * @param [in] a1 The first argument to pass to the invoked method + * @param [in] a2 The second argument to pass to the invoked method + * @param [in] a3 The third argument to pass to the invoked method + * @param [in] a4 The fourth argument to pass to the invoked method + * @param [in] a5 The fifth argument to pass to the invoked method */ template @@ -513,9 +513,9 @@ public: * function will be invoked with any supplied arguments. * * This method is thread-safe: it can be called from any thread. - * @param context User-specified context parameter - * @param delay The relative expiration time of the event. - * @param f The function to invoke + * @param [in] context User-specified context parameter + * @param [in] delay The relative expiration time of the event. + * @param [in] f The function to invoke */ static void ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(void)); @@ -523,10 +523,10 @@ public: * @see ScheduleWithContext(uint32_t,const Time&,(*)()) * @tparam U1 @inferred Formal type of the first argument to the function. * @tparam T1 @inferred Actual type of the first argument. - * @param context User-specified context parameter - * @param delay The relative expiration time of the event. - * @param f The function to invoke - * @param a1 The first argument to pass to the function to invoke + * @param [in] context User-specified context parameter + * @param [in] delay The relative expiration time of the event. + * @param [in] f The function to invoke + * @param [in] a1 The first argument to pass to the function to invoke */ template @@ -538,11 +538,11 @@ public: * @tparam U2 @inferred Formal type of the second argument to the function. * @tparam T1 @inferred Actual type of the first argument. * @tparam T2 @inferred Actual type of the second argument. - * @param context User-specified context parameter - * @param delay The relative expiration time of the event. - * @param f The function to invoke - * @param a1 The first argument to pass to the function to invoke - * @param a2 The second argument to pass to the function to invoke + * @param [in] context User-specified context parameter + * @param [in] delay The relative expiration time of the event. + * @param [in] f The function to invoke + * @param [in] a1 The first argument to pass to the function to invoke + * @param [in] a2 The second argument to pass to the function to invoke */ template @@ -556,12 +556,12 @@ public: * @tparam T1 @inferred Actual type of the first argument. * @tparam T2 @inferred Actual type of the second argument. * @tparam T3 @inferred Actual type of the third argument. - * @param context User-specified context parameter - * @param delay The relative expiration time of the event. - * @param f The function to invoke - * @param a1 The first argument to pass to the function to invoke - * @param a2 The second argument to pass to the function to invoke - * @param a3 The third argument to pass to the function to invoke + * @param [in] context User-specified context parameter + * @param [in] delay The relative expiration time of the event. + * @param [in] f The function to invoke + * @param [in] a1 The first argument to pass to the function to invoke + * @param [in] a2 The second argument to pass to the function to invoke + * @param [in] a3 The third argument to pass to the function to invoke */ template @@ -577,13 +577,13 @@ public: * @tparam T2 @inferred Actual type of the second argument. * @tparam T3 @inferred Actual type of the third argument. * @tparam T4 @inferred Actual type of the fourth argument. - * @param context User-specified context parameter - * @param delay The relative expiration time of the event. - * @param f The function to invoke - * @param a1 The first argument to pass to the function to invoke - * @param a2 The second argument to pass to the function to invoke - * @param a3 The third argument to pass to the function to invoke - * @param a4 The fourth argument to pass to the function to invoke + * @param [in] context User-specified context parameter + * @param [in] delay The relative expiration time of the event. + * @param [in] f The function to invoke + * @param [in] a1 The first argument to pass to the function to invoke + * @param [in] a2 The second argument to pass to the function to invoke + * @param [in] a3 The third argument to pass to the function to invoke + * @param [in] a4 The fourth argument to pass to the function to invoke */ template @@ -601,14 +601,14 @@ public: * @tparam T3 @inferred Actual type of the third argument. * @tparam T4 @inferred Actual type of the fourth argument. * @tparam T5 @inferred Actual type of the fifth argument. - * @param context User-specified context parameter - * @param delay The relative expiration time of the event. - * @param f The function to invoke - * @param a1 The first argument to pass to the function to invoke - * @param a2 The second argument to pass to the function to invoke - * @param a3 The third argument to pass to the function to invoke - * @param a4 The fourth argument to pass to the function to invoke - * @param a5 The fifth argument to pass to the function to invoke + * @param [in] context User-specified context parameter + * @param [in] delay The relative expiration time of the event. + * @param [in] f The function to invoke + * @param [in] a1 The first argument to pass to the function to invoke + * @param [in] a2 The second argument to pass to the function to invoke + * @param [in] a3 The third argument to pass to the function to invoke + * @param [in] a4 The fourth argument to pass to the function to invoke + * @param [in] a5 The fifth argument to pass to the function to invoke */ template @@ -627,8 +627,8 @@ public: * * @tparam MEM @inferred Class method function signature type. * @tparam OBJ @inferred Class type of the object. - * @param mem_ptr Member method pointer to invoke - * @param obj The object on which to invoke the member method + * @param [in] mem_ptr Member method pointer to invoke + * @param [in] obj The object on which to invoke the member method * @return The EventId of the scheduled event. */ template @@ -639,9 +639,9 @@ public: * @tparam MEM @inferred Class method function signature type. * @tparam OBJ @inferred Class type of the object. * @tparam T1 @inferred Type of first argument. - * @param mem_ptr Member method pointer to invoke - * @param obj The object on which to invoke the member method - * @param a1 The first argument to pass to the invoked method + * @param [in] mem_ptr Member method pointer to invoke + * @param [in] obj The object on which to invoke the member method + * @param [in] a1 The first argument to pass to the invoked method * @return The EventId of the scheduled event. */ template @@ -850,9 +850,9 @@ public: * @tparam MEM @inferred Class method function signature type. * @tparam OBJ @inferred Class type of the object. * @tparam T1 @inferred Type of first argument. - * @param mem_ptr Member method pointer to invoke - * @param obj The object on which to invoke the member method - * @param a1 The first argument to pass to the invoked method + * @param [in] mem_ptr Member method pointer to invoke + * @param [in] obj The object on which to invoke the member method + * @param [in] a1 The first argument to pass to the invoked method * @return The EventId of the scheduled event. */ template &event); @@ -1128,9 +1128,9 @@ public: * Schedule a future event execution (in a different context). * This method is thread-safe: it can be called from any thread. * - * @param delay Delay until the event expires. - * @param context Event context. - * @param event The event to schedule. + * @param [in] delay Delay until the event expires. + * @param [in] context Event context. + * @param [in] event The event to schedule. * @returns A unique identifier for the newly-scheduled event. */ static void ScheduleWithContext (uint32_t context, const Time &delay, EventImpl *event); @@ -1139,7 +1139,7 @@ public: * Schedule an event to run at the end of the simulation, after * the Stop() time or condition has been reached. * - * @param event The event to schedule. + * @param [in] event The event to schedule. * @returns A unique identifier for the newly-scheduled event. */ static EventId ScheduleDestroy (const Ptr &event); @@ -1147,7 +1147,7 @@ public: /** * Schedule an event to run at the current virtual time. * - * @param event The event to schedule. + * @param [in] event The event to schedule. * @returns A unique identifier for the newly-scheduled event. */ static EventId ScheduleNow (const Ptr &event); diff --git a/src/core/model/synchronizer.h b/src/core/model/synchronizer.h index 6492cc158..4b6bfaa90 100644 --- a/src/core/model/synchronizer.h +++ b/src/core/model/synchronizer.h @@ -95,7 +95,7 @@ public: * virtual method to do the actual real-time-clock-specific work * of making the correspondence mentioned above. * - * @param ts The simulation time we should use as the origin (in + * @param [in] ts The simulation time we should use as the origin (in * Time resolution units). * @see DoSetOrigin */ @@ -115,7 +115,7 @@ public: * synchronize the simulation and the simulation time (in * Time resolution units). * - * @param ts Simulation time in Time resolution units. + * @param [in] ts Simulation time in Time resolution units. * @returns Simulation Time (in Time resolution units) * minus the origin time (stored internally in nanosecond units). * @see SetOrigin @@ -138,8 +138,8 @@ public: * (either busy-waiting or sleeping, or some combination thereof) until the * requested simulation time. * - * @param tsCurrent The current simulation time (in Time resolution units). - * @param tsDelay The simulation time we need to wait for (in Time + * @param [in] tsCurrent The current simulation time (in Time resolution units). + * @param [in] tsDelay The simulation time we need to wait for (in Time * resolution units). * @returns @c true if the function ran to completion, * @c false if it was interrupted by a Signal. @@ -212,7 +212,7 @@ protected: * for example, this is where the differences between Time parameters and * parameters to clock_nanosleep would be dealt with. * - * @param ns The simulation time we need to use as the origin (normalized to + * @param [in] ns The simulation time we need to use as the origin (normalized to * nanosecond units). * @see SetOrigin */ @@ -258,8 +258,8 @@ protected: * real-time-clock-specific work of waiting (either busy-waiting or sleeping, * or some combination) until the requested simulation time. * - * @param nsCurrent The current simulation time (in nanosecond units). - * @param nsDelay The simulation time we need to wait for (normalized to + * @param [in] nsCurrent The current simulation time (in nanosecond units). + * @param [in] nsDelay The simulation time we need to wait for (normalized to * nanosecond units). * @returns @c true if the function ran to completion, * @c false if it was interrupted by a Signal. @@ -290,7 +290,7 @@ protected: * @brief Get the drift between the real time clock used to synchronize * the simulation and the current simulation time. * - * @param ns Simulation time in ns. + * @param [in] ns Simulation time in ns. * @returns Drift in ns units. * @see SetOrigin * @see GetDrift @@ -320,7 +320,7 @@ private: * @brief Convert a simulator time step (in Time resolution units) * to a normalized time step in nanosecond units. * - * @param ts The simulation time step to be normalized. + * @param [in] ts The simulation time step to be normalized. * @returns The simulation time step normalized to nanosecond units. */ uint64_t TimeStepToNanosecond (uint64_t ts); @@ -329,7 +329,7 @@ private: * @brief Convert a normalized nanosecond time step into a * simulator time step (in Time resolution units). * - * @param ns The nanosecond count step to be converted + * @param [in] ns The nanosecond count step to be converted * @returns The simulation time step to be interpreted in appropriate units. */ uint64_t NanosecondToTimeStep (uint64_t ns); diff --git a/src/core/model/system-condition.h b/src/core/model/system-condition.h index a0a1126da..543dd6d1d 100644 --- a/src/core/model/system-condition.h +++ b/src/core/model/system-condition.h @@ -75,7 +75,7 @@ public: /** * Set the value of the underlying condition. - * @param condition value + * @param [in] condition value */ void SetCondition (bool condition); @@ -106,8 +106,8 @@ public: /** * Wait a maximum of ns nanoseconds for the condition to be true. If the * wait times out, return true else return false. - * @param ns maximum of nanoseconds to wait - * @returns true if the timer expired, otherwise return false. + * @param [in] ns maximum of nanoseconds to wait + * @returns \c true if the timer expired, otherwise return \c false. */ bool TimedWait (uint64_t ns); diff --git a/src/core/model/system-path.cc b/src/core/model/system-path.cc index 507cad366..5c398cb8f 100644 --- a/src/core/model/system-path.cc +++ b/src/core/model/system-path.cc @@ -82,7 +82,7 @@ namespace SystemPath { * This is an internal function (by virtue of not being * declared in a \c .h file); the public API is FindSelfDirectory(). * - * \param path The full path to a file. + * \param [in] path The full path to a file. * \returns The full path to the containing directory. */ std::string Dirname (std::string path) diff --git a/src/core/model/system-path.h b/src/core/model/system-path.h index b05f5bcbd..7420cf3bd 100644 --- a/src/core/model/system-path.h +++ b/src/core/model/system-path.h @@ -51,7 +51,7 @@ namespace SystemPath { * \ingroup systempath * Get the file system path to the current executable. * - * \return the directory in which the currently-executing binary is located + * \return The directory in which the currently-executing binary is located */ std::string FindSelfDirectory (void); @@ -59,9 +59,9 @@ namespace SystemPath { * \ingroup systempath * Join two file system path elements. * - * \param left a path element - * \param right a path element - * \return a concatenation of the two input paths + * \param [in] left A path element + * \param [in] right A path element + * \return A concatenation of the two input paths */ std::string Append (std::string left, std::string right); @@ -72,8 +72,8 @@ namespace SystemPath { * * This is the inverse of Join. * - * \param path a path - * \return a list of path elements that can be joined together again with + * \param [in] path A path + * \return A list of path elements that can be joined together again with * the Join function. * \sa ns3::SystemPath::Join */ @@ -86,9 +86,9 @@ namespace SystemPath { * This is the inverse of Split. * * \ingroup systempath - * \param begin iterator to first element to join - * \param end iterator to last element to join - * \return a path that is a concatenation of all the input elements. + * \param [in] begin Iterator to first element to join + * \param [in] end Iterator to last element to join + * \return A path that is a concatenation of all the input elements. */ std::string Join (std::list::const_iterator begin, std::list::const_iterator end); @@ -97,8 +97,8 @@ namespace SystemPath { * \ingroup systempath * Get the list of files located in a file system directory. * - * \param path a path which identifies a directory - * \return a list of the filenames which are located in the input directory + * \param [in] path A path which identifies a directory + * \return A list of the filenames which are located in the input directory */ std::list ReadFiles (std::string path); @@ -110,7 +110,7 @@ namespace SystemPath { * Call ns3::SystemPath::MakeDirectories to create it. Yes, there is a * well-known security race in this API but we don't care in ns-3. * - * \return a path which identifies a temporary directory. + * \return A path which identifies a temporary directory. */ std::string MakeTemporaryDirectoryName (void); @@ -118,7 +118,7 @@ namespace SystemPath { * \ingroup systempath * Create all the directories leading to path. * - * \param path a path to a directory + * \param [in] path A path to a directory */ void MakeDirectories (std::string path); diff --git a/src/core/model/system-thread.h b/src/core/model/system-thread.h index 3f2b5d6ee..2e3f315e4 100644 --- a/src/core/model/system-thread.h +++ b/src/core/model/system-thread.h @@ -112,7 +112,7 @@ public: * method provided to do this is Join(). If you call Join() you will block * until the SystemThread run method returns. * - * @param callback entry point of the thread + * @param [in] callback entry point of the thread * * @warning I've made the system thread class look like a normal ns3 object * with smart pointers, and living in the heap. This makes it very easy to @@ -144,7 +144,7 @@ public: /** * @brief Returns the current thread Id. * - * @returns current thread Id. + * @returns Current thread Id. */ static ThreadId Self(void); @@ -152,7 +152,7 @@ public: * @brief Compares an ThreadId with the current ThreadId . * * @param [in] id The ThreadId to compare to. - * @returns true if @c id matches the current ThreadId. + * @returns @c true if @c id matches the current ThreadId. */ static bool Equals(ThreadId id); diff --git a/src/core/model/test.cc b/src/core/model/test.cc index cbf438557..9d47237ea 100644 --- a/src/core/model/test.cc +++ b/src/core/model/test.cc @@ -96,8 +96,8 @@ struct TestCaseFailure /** * Output streamer for TestCaseFailure. * - * \param os The output stream. - * \param failure The TestCaseFailure to print. + * \param [in,out] os The output stream. + * \param [in] failure The TestCaseFailure to print. * \returns The stream. */ std::ostream & operator << (std::ostream & os, const TestCaseFailure & failure) @@ -201,18 +201,18 @@ private: /** * Print the test report. * - * \param test The TestCase to print. - * \param os The output stream. - * \param xml Generate XML output if \c true. - * \param level Indentation level. + * \param [in] test The TestCase to print. + * \param [in,out] os The output stream. + * \param [in] xml Generate XML output if \c true. + * \param [in] level Indentation level. */ void PrintReport (TestCase *test, std::ostream *os, bool xml, int level); /** * Print the list of all requested test suites. * - * \param begin Iterator to the first TestCase to print. - * \param end Iterator to the end of the list. - * \param printTestType Preprend the test type label if \c true. + * \param [in] begin Iterator to the first TestCase to print. + * \param [in] end Iterator to the end of the list. + * \param [in] printTestType Preprend the test type label if \c true. */ void PrintTestNameList (std::list::const_iterator begin, std::list::const_iterator end, @@ -622,7 +622,7 @@ struct Indent { /** * Constructor. - * \param level The number of steps. A step is " ". + * \param [in] level The number of steps. A step is " ". */ Indent (int level); /** The number of steps. */ @@ -635,8 +635,8 @@ Indent::Indent (int _level) } /** * Output streamer for Indent. - * \param os The output stream. - * \param val The Indent object. + * \param [in,out] os The output stream. + * \param [in] val The Indent object. * \returns The stream. */ std::ostream &operator << (std::ostream &os, const Indent &val) diff --git a/src/core/model/test.h b/src/core/model/test.h index e53b28cc2..87f444f6e 100644 --- a/src/core/model/test.h +++ b/src/core/model/test.h @@ -34,7 +34,8 @@ /** * \file * \ingroup testing - * \brief Definition of the testing macros and declaration of the testing classes. + * \brief Definition of the testing macros and declaration of + * the testing classes. */ /** @@ -55,11 +56,11 @@ // // Note on below macros: // -// When multiple statements are used in a macro, they should be bound together -// in a loop syntactically, so the macro can appear safely inside if clauses -// or other places that expect a single statement or a statement block. The -// "strange" do while construct is a generally expected best practice for -// defining a robust macro. +// When multiple statements are used in a macro, they should be bound +// together in a loop syntactically, so the macro can appear safely +// inside if clauses or other places that expect a single statement or +// a statement block. The "strange" do while construct is a generally +// expected best practice for defining a robust macro. // /** @@ -131,13 +132,14 @@ /** * \ingroup testing * - * \brief Test that an actual and expected (limit) value are equal and report - * and abort if not. + * \brief Test that an actual and expected (limit) value are equal and + * report and abort if not. * - * Check to see if the expected (limit) value is equal to the actual value found - * in a test case. If the two values are equal nothing happens, but if the - * comparison fails, an error is reported in a consistent way and the execution - * of the current test case is aborted. + * Check to see if the expected (limit) value is equal to the actual + * value found in a test case. If the two values are equal nothing + * happens, but if the comparison fails, an error is reported in a + * consistent way and the execution of the current test case is + * aborted. * * The message is interpreted as a stream, for example: * @@ -148,13 +150,13 @@ * * is legal. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the expected value of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the expected value of the test. + * \param [in] msg Message that is output if the test does not pass. * - * \warning Do not use this macro if you are comparing floating point numbers - * (float or double) as it is unlikely to do what you expect. Use - * NS_TEST_ASSERT_MSG_EQ_TOL instead. + * \warning Do not use this macro if you are comparing floating point + * numbers (float or double) as it is unlikely to do what you expect. + * Use NS_TEST_ASSERT_MSG_EQ_TOL instead. */ #define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg) \ NS_TEST_ASSERT_MSG_EQ_INTERNAL (actual, limit, msg, __FILE__, __LINE__) @@ -175,7 +177,7 @@ actualStream << actual; \ std::ostringstream limitStream; \ limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) == " + \ + ReportTestFailure (std::string (#actual) + " (actual) == " + \ std::string (#limit) + " (limit)", \ actualStream.str (), limitStream.str (), \ msgStream.str (), file, line); \ @@ -186,13 +188,14 @@ /** * \ingroup testing * - * \brief Test that an actual and expected (limit) value are equal and report - * and abort if not. + * \brief Test that an actual and expected (limit) value are equal and + * report and abort if not. * - * Check to see if the expected (limit) value is equal to the actual value found - * in a test case. If the two values are equal nothing happens, but if the - * comparison fails, an error is reported in a consistent way and the execution - * of the current test case is aborted. + * Check to see if the expected (limit) value is equal to the actual + * value found in a test case. If the two values are equal nothing + * happens, but if the comparison fails, an error is reported in a + * consistent way and the execution of the current test case is + * aborted. * * The message is interpreted as a stream, for example: * @@ -203,13 +206,13 @@ * * is legal. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the expected value of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the expected value of the test. + * \param [in] msg Message that is output if the test does not pass. * - * \warning Do not use this macro if you are comparing floating point numbers - * (float or double) as it is unlikely to do what you expect. Use - * NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL_TOL instead. + * \warning Do not use this macro if you are comparing floating point + * numbers (float or double) as it is unlikely to do what you expect. + * Use NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL_TOL instead. * * This function returns a boolean value. * @@ -219,11 +222,11 @@ /** * \ingroup testingimpl - * \brief Test that an actual and expected (limit) value are equal and report - * if not. + * \brief Test that an actual and expected (limit) value are equal and + * report if not. * - * Required to avoid use of return statement which allows use in methods - * (esp. callbacks) returning void. + * Required to avoid use of return statement which allows use in + * methods (esp. callbacks) returning void. */ #define NS_TEST_EXPECT_MSG_EQ_INTERNAL(actual, limit, msg, file, line) \ do { \ @@ -236,7 +239,7 @@ actualStream << actual; \ std::ostringstream limitStream; \ limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) == " + \ + ReportTestFailure (std::string (#actual) + " (actual) == " + \ std::string (#limit) + " (limit)", \ actualStream.str (), limitStream.str (), \ msgStream.str (), file, line); \ @@ -246,13 +249,14 @@ /** * \ingroup testing * - * \brief Test that an actual and expected (limit) value are equal and report - * if not. + * \brief Test that an actual and expected (limit) value are equal and + * report if not. * - * Check to see if the expected (lmit) value is equal to the actual value found - * in a test case. If the two values are equal nothing happens, but if the - * comparison fails, an error is reported in a consistent way. EXPECT* macros - * do not return if an error is detected. + * Check to see if the expected (lmit) value is equal to the actual + * value found in a test case. If the two values are equal nothing + * happens, but if the comparison fails, an error is reported in a + * consistent way. EXPECT* macros do not return if an error is + * detected. * * The message is interpreted as a stream, for example: * @@ -263,13 +267,13 @@ * * is legal. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the expected value of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the expected value of the test. + * \param [in] msg Message that is output if the test does not pass. * - * \warning Do not use this macro if you are comparing floating point numbers - * (float or double) as it is unlikely to do what you expect. Use - * NS_TEST_EXPECT_MSG_EQ_TOL instead. + * \warning Do not use this macro if you are comparing floating point + * numbers (float or double) as it is unlikely to do what you expect. + * Use NS_TEST_EXPECT_MSG_EQ_TOL instead. */ #define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg) \ NS_TEST_EXPECT_MSG_EQ_INTERNAL (actual, limit, msg, __FILE__, __LINE__) @@ -281,8 +285,8 @@ /** * \ingroup testingimpl - * \brief Test that actual and expected (limit) values are equal to plus - * or minus some tolerance and report and abort if not. + * \brief Test that actual and expected (limit) values are equal to + * plus or minus some tolerance and report and abort if not. */ #define NS_TEST_ASSERT_MSG_EQ_TOL_INTERNAL(actual, limit, tol, msg, file, line) \ do { \ @@ -300,7 +304,7 @@ << " (limit) + " << #tol << " (tol) && " \ << #actual << " (actual) > " << #limit \ << " (limit) - " << #tol << " (tol)"; \ - ReportTestFailure (condStream.str (), actualStream.str (), \ + ReportTestFailure (condStream.str (), actualStream.str (), \ limitStream.str (), msgStream.str (), \ file, line); \ CONTINUE_ON_FAILURE; \ @@ -310,63 +314,69 @@ /** * \ingroup testing * - * \brief Test that actual and expected (limit) values are equal to plus - * or minus some tolerance and report and abort if not. + * \brief Test that actual and expected (limit) values are equal to + * plus or minus some tolerance and report and abort if not. * - * Check to see if the expected (limit) value is equal to the actual value found - * in a test case to some tolerance. This is not the same thing as asking if - * two floating point are equal to within some epsilon, but is useful for that - * case. This assertion is geared toward more of a measurement problem. - * Consider measuring a physical rod of some kind that you have ordered. - * You need to determine if it is "good." You want to measure the rod - * to an arbitrary precision of sixteen significant figures, you will + * Check to see if the expected (limit) value is equal to the actual + * value found in a test case to some tolerance. This is not the same + * thing as asking if two floating point are equal to within some + * epsilon, but is useful for that case. This assertion is geared + * toward more of a measurement problem. Consider measuring a + * physical rod of some kind that you have ordered. You need to + * determine if it is "good." You want to measure the rod to an + * arbitrary precision of sixteen significant figures, you will * measure the rod to determine if its length is within the tolerances * you provided. For example, 12.00 inches plus or minus .005 inch * may be just fine. * - * In ns-3, you might want to measure a signal to noise ratio and check to see - * if the answer is what you expect. If you naively measure (double)1128.93 and - * compare this number with a constant 1128.93 you are almost certainly going to - * have your test fail because of floating point rounding errors. We provide a - * floating point comparison function ns3::TestDoubleIsEqual() but you will - * probably quickly find that is not what you want either. It may turn out to - * be the case that when you measured an snr that printed as 1128.93, what was - * actually measured was something more like 1128.9287653857625442 for example. - * Given that the double epsilon is on the order of 0.0000000000000009, - * you would need to provide sixteen significant figures of expected value - * for this kind of test to pass even with a typical test for floating point - * "approximate equality." That is clearly not required or desired. - * You really want to be able to provide 1128.93 along with a tolerance - * just like you provided 12 inches +- 0.005 inch above. + * In ns-3, you might want to measure a signal to noise ratio and + * check to see if the answer is what you expect. If you naively + * measure (double)1128.93 and compare this number with a constant + * 1128.93 you are almost certainly going to have your test fail + * because of floating point rounding errors. We provide a floating + * point comparison function ns3::TestDoubleIsEqual() but you will + * probably quickly find that is not what you want either. It may + * turn out to be the case that when you measured an snr that printed + * as 1128.93, what was actually measured was something more like + * 1128.9287653857625442 for example. Given that the double epsilon + * is on the order of 0.0000000000000009, you would need to provide + * sixteen significant figures of expected value for this kind of test + * to pass even with a typical test for floating point "approximate + * equality." That is clearly not required or desired. You really + * want to be able to provide 1128.93 along with a tolerance just like + * you provided 12 inches +- 0.005 inch above. * - * This assertion is designed for real measurements by taking into account - * measurement tolerances. By doing so it also automatically compensates for - * floating point rounding errors. If you really want to check floating point - * equality down to the numeric_limits::epsilon () range, consider - * using ns3::TestDoubleIsEqual(). + * This assertion is designed for real measurements by taking into + * account measurement tolerances. By doing so it also automatically + * compensates for floating point rounding errors. If you really want + * to check floating point equality down to the + * numeric_limits::epsilon () range, consider using + * ns3::TestDoubleIsEqual(). * - * \note Mixing signed and unsigned types can lead to misleading results. + * \note Mixing signed and unsigned types can lead to misleading + * results. * * The message is interpreted as a stream, for example: * * \code - * NS_TEST_ASSERT_MSG_EQ_TOL (snr, 1128.93, 0.005, "wrong snr (" << snr << ") in test"); + * NS_TEST_ASSERT_MSG_EQ_TOL (snr, 1128.93, 0.005, + * "wrong snr (" << snr << ") in test"); * \endcode * * is legal. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the expected value of the test. - * \param tol Tolerance of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the expected value of the test. + * \param [in] tol Tolerance of the test. + * \param [in] msg Message that is output if the test does not pass. */ #define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg) \ NS_TEST_ASSERT_MSG_EQ_TOL_INTERNAL (actual, limit, tol, msg, __FILE__, __LINE__) /** * \ingroup testingimpl - * \brief Test that actual and expected (limit) values are equal to plus - * or minus some tolerance and report and abort if not. + * \brief Test that actual and expected (limit) values are equal to + * plus or minus some tolerance and report and abort if not. */ #define NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL_INTERNAL(actual, limit, tol, msg, file, line) \ do { \ @@ -384,7 +394,7 @@ << " (limit) + " << #tol << " (tol) && " \ << #actual << " (actual) > " << #limit \ << " (limit) - " << #tol << " (tol)"; \ - ReportTestFailure (condStream.str (), actualStream.str (), \ + ReportTestFailure (condStream.str (), actualStream.str (), \ limitStream.str (), msgStream.str (), \ file, line); \ CONTINUE_ON_FAILURE_RETURNS_BOOL; \ @@ -394,69 +404,75 @@ /** * \ingroup testing * - * \brief Test that actual and expected (limit) values are equal to plus - * or minus some tolerance and report and abort if not. + * \brief Test that actual and expected (limit) values are equal to + * plus or minus some tolerance and report and abort if not. * - * Check to see if the expected (limit) value is equal to the actual value found - * in a test case to some tolerance. This is not the same thing as asking if - * two floating point are equal to within some epsilon, but is useful for that - * case. This assertion is geared toward more of a measurement problem. - * Consider measuring a physical rod of some kind that you have ordered. - * You need to determine if it is "good." You want to measure the rod - * to an arbitrary precision of sixteen significant figures, you will + * Check to see if the expected (limit) value is equal to the actual + * value found in a test case to some tolerance. This is not the same + * thing as asking if two floating point are equal to within some + * epsilon, but is useful for that case. This assertion is geared + * toward more of a measurement problem. Consider measuring a + * physical rod of some kind that you have ordered. You need to + * determine if it is "good." You want to measure the rod to an + * arbitrary precision of sixteen significant figures, you will * measure the rod to determine if its length is within the tolerances * you provided. For example, 12.00 inches plus or minus .005 inch * may be just fine. * - * In ns-3, you might want to measure a signal to noise ratio and check to see - * if the answer is what you expect. If you naively measure (double)1128.93 and - * compare this number with a constant 1128.93 you are almost certainly going to - * have your test fail because of floating point rounding errors. We provide a - * floating point comparison function ns3::TestDoubleIsEqual() but you will - * probably quickly find that is not what you want either. It may turn out to - * be the case that when you measured an snr that printed as 1128.93, what was - * actually measured was something more like 1128.9287653857625442 for example. - * Given that the double epsilon is on the order of 0.0000000000000009, - * you would need to provide sixteen significant figures of expected value - * for this kind of test to pass even with a typical test for floating point - * "approximate equality." That is clearly not required or desired. - * You really want to be able to provide 1128.93 along with a tolerance - * just like you provided 12 inches +- 0.005 inch above. + * In ns-3, you might want to measure a signal to noise ratio and + * check to see if the answer is what you expect. If you naively + * measure (double)1128.93 and compare this number with a constant + * 1128.93 you are almost certainly going to have your test fail + * because of floating point rounding errors. We provide a floating + * point comparison function ns3::TestDoubleIsEqual() but you will + * probably quickly find that is not what you want either. It may + * turn out to be the case that when you measured an snr that printed + * as 1128.93, what was actually measured was something more like + * 1128.9287653857625442 for example. Given that the double epsilon + * is on the order of 0.0000000000000009, you would need to provide + * sixteen significant figures of expected value for this kind of test + * to pass even with a typical test for floating point "approximate + * equality." That is clearly not required or desired. You really + * want to be able to provide 1128.93 along with a tolerance just like + * you provided 12 inches +- 0.005 inch above. * - * This assertion is designed for real measurements by taking into account - * measurement tolerances. By doing so it also automatically compensates for - * floating point rounding errors. If you really want to check floating point - * equality down to the numeric_limits::epsilon () range, - * consider using ns3::TestDoubleIsEqual(). + * This assertion is designed for real measurements by taking into + * account measurement tolerances. By doing so it also automatically + * compensates for floating point rounding errors. If you really want + * to check floating point equality down to the + * numeric_limits::epsilon () range, consider using + * ns3::TestDoubleIsEqual(). * - * \note Mixing signed and unsigned types can lead to misleading results. + * \note Mixing signed and unsigned types can lead to misleading + * results. * * The message is interpreted as a stream, for example: * * \code - * NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL (snr, 1128.93, 0.005, "wrong snr (" << snr << ") in test"); + * NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL (snr, 1128.93, 0.005, + * "wrong snr (" << snr << ") in test"); * \endcode * * is legal. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the expected value of the test. - * \param tol Tolerance of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the expected value of the test. + * \param [in] tol Tolerance of the test. + * \param [in] msg Message that is output if the test does not pass. * * This function returns a boolean value. * */ -#define NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL(actual, limit, tol, msg) \ +#define NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL(actual, limit, tol, msg) \ NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL_INTERNAL (actual, limit, tol, msg, __FILE__, __LINE__) /** * \ingroup testingimpl - * \brief Test that actual and expected (limit) values are equal to plus or minus - * some tolerance and report if not. + * \brief Test that actual and expected (limit) values are equal to + * plus or minus some tolerance and report if not. * - * Required to avoid use of return statement which allows use in methods - * (esp. callbacks) returning void. + * Required to avoid use of return statement which allows use in + * methods (esp. callbacks) returning void. */ #define NS_TEST_EXPECT_MSG_EQ_TOL_INTERNAL(actual, limit, tol, msg, file, line) \ do { \ @@ -474,7 +490,7 @@ << " (limit) + " << #tol << " (tol) && " \ << #actual << " (actual) > " << #limit \ << " (limit) - " << #tol << " (tol)"; \ - ReportTestFailure (condStream.str (), actualStream.str (), \ + ReportTestFailure (condStream.str (), actualStream.str (), \ limitStream.str (), msgStream.str (), \ file, line); \ } \ @@ -483,55 +499,61 @@ /** * \ingroup testing * - * \brief Test that actual and expected (limit) values are equal to plus - * or minus some tolerance and report if not. + * \brief Test that actual and expected (limit) values are equal to + * plus or minus some tolerance and report if not. * - * Check to see if the expected (limit) value is equal to the actual value found - * in a test case to some tolerance. This is not the same thing as asking if - * two floating point are equal to within some epsilon, but is useful for that - * case. This assertion is geared toward more of a measurement problem. - * Consider measuring a physical rod of some kind that you have ordered. - * You need to determine if it is "good." You want to measure the rod - * to an arbitrary precision of sixteen significant figures, - * you will measure the rod to determine if its length is within - * the tolerances you provided. For example, 12.00 inches plus - * or minus .005 inch may be just fine. + * Check to see if the expected (limit) value is equal to the actual + * value found in a test case to some tolerance. This is not the same + * thing as asking if two floating point are equal to within some + * epsilon, but is useful for that case. This assertion is geared + * toward more of a measurement problem. Consider measuring a + * physical rod of some kind that you have ordered. You need to + * determine if it is "good." You want to measure the rod to an + * arbitrary precision of sixteen significant figures, you will + * measure the rod to determine if its length is within the tolerances + * you provided. For example, 12.00 inches plus or minus .005 inch + * may be just fine. * - * In ns-3, you might want to measure a signal to noise ratio and check to see - * if the answer is what you expect. If you naively measure (double)1128.93 and - * compare this number with a constant 1128.93 you are almost certainly going to - * have your test fail because of floating point rounding errors. We provide a - * floating point comparison function ns3::TestDoubleIsEqual() but you will - * probably quickly find that is not what you want either. It may turn out to - * be the case that when you measured an snr that printed as 1128.93, what was - * actually measured was something more like 1128.9287653857625442 for example. - * Given that the double epsilon is on the order of 0.0000000000000009, - * you would need to provide sixteen significant figures of expected value - * for this kind of test to pass even with a typical test for floating point - * "approximate equality." That is clearly not required or desired. - * You really want to be able to provide 1128.93 along with a tolerance - * just like you provided 12 inches +- 0.005 inch above. + * In ns-3, you might want to measure a signal to noise ratio and + * check to see if the answer is what you expect. If you naively + * measure (double)1128.93 and compare this number with a constant + * 1128.93 you are almost certainly going to have your test fail + * because of floating point rounding errors. We provide a floating + * point comparison function ns3::TestDoubleIsEqual() but you will + * probably quickly find that is not what you want either. It may + * turn out to be the case that when you measured an snr that printed + * as 1128.93, what was actually measured was something more like + * 1128.9287653857625442 for example. Given that the double epsilon + * is on the order of 0.0000000000000009, you would need to provide + * sixteen significant figures of expected value for this kind of test + * to pass even with a typical test for floating point "approximate + * equality." That is clearly not required or desired. You really + * want to be able to provide 1128.93 along with a tolerance just like + * you provided 12 inches +- 0.005 inch above. * - * This assertion is designed for real measurements by taking into account - * measurement tolerances. By doing so it also automatically compensates for - * floating point rounding errors. If you really want to check floating point - * equality down to the numeric_limits::epsilon () range, - * consider using ns3::TestDoubleIsEqual(). + * This assertion is designed for real measurements by taking into + * account measurement tolerances. By doing so it also automatically + * compensates for floating point rounding errors. If you really want + * to check floating point equality down to the + * numeric_limits::epsilon () range, consider using + * ns3::TestDoubleIsEqual(). * - * \note Mixing signed and unsigned types can lead to misleading results. + * \note Mixing signed and unsigned types can lead to misleading + * results. * * The message is interpreted as a stream, for example: * * \code - * NS_TEST_EXPECT_MSG_EQ_TOL (snr, 1128.93, 0.005, "wrong snr (" << snr << ") in test"); + * NS_TEST_EXPECT_MSG_EQ_TOL (snr, 1128.93, 0.005, + * "wrong snr (" << snr << ") in test"); * \endcode * * is legal. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the expected value of the test. - * \param tol Tolerance of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the expected value of the test. + * \param [in] tol Tolerance of the test. + * \param [in] msg Message that is output if the test does not pass. */ #define NS_TEST_EXPECT_MSG_EQ_TOL(actual, limit, tol, msg) \ NS_TEST_EXPECT_MSG_EQ_TOL_INTERNAL (actual, limit, tol, msg, __FILE__, __LINE__) @@ -556,7 +578,7 @@ actualStream << actual; \ std::ostringstream limitStream; \ limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) != " + \ + ReportTestFailure (std::string (#actual) + " (actual) != " + \ std::string (#limit) + " (limit)", \ actualStream.str (), limitStream.str (), \ msgStream.str (), file, line); \ @@ -567,13 +589,14 @@ /** * \ingroup testing * - * \brief Test that an actual and expected (limit) value are not equal and - * report and abort if not. + * \brief Test that an actual and expected (limit) value are not equal + * and report and abort if not. * - * Check to see if the expected (limit) value is not equal to the actual value - * found in a test case. If the two values are not equal nothing happens, but - * if the comparison fails, an error is reported in a consistent way and the - * execution of the current test case is aborted. + * Check to see if the expected (limit) value is not equal to the + * actual value found in a test case. If the two values are not equal + * nothing happens, but if the comparison fails, an error is reported + * in a consistent way and the execution of the current test case is + * aborted. * * The message is interpreted as a stream, for example: * @@ -584,12 +607,12 @@ * * is legal. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the value that actual is tested against. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the value that actual is tested against. + * \param [in] msg Message that is output if the test does not pass. * - * \warning Do not use this macro if you are comparing floating point numbers - * (float or double). Use NS_TEST_ASSERT_MSG_FLNE instead. + * \warning Do not use this macro if you are comparing floating point + * numbers (float or double). Use NS_TEST_ASSERT_MSG_FLNE instead. */ #define NS_TEST_ASSERT_MSG_NE(actual, limit, msg) \ NS_TEST_ASSERT_MSG_NE_INTERNAL (actual, limit, msg, __FILE__, __LINE__) @@ -610,7 +633,7 @@ actualStream << actual; \ std::ostringstream limitStream; \ limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) != " + \ + ReportTestFailure (std::string (#actual) + " (actual) != " + \ std::string (#limit) + " (limit)", \ actualStream.str (), limitStream.str (), \ msgStream.str (), file, line); \ @@ -621,13 +644,14 @@ /** * \ingroup testing * - * \brief Test that an actual and expected (limit) value are not equal and - * report and abort if not. + * \brief Test that an actual and expected (limit) value are not equal + * and report and abort if not. * - * Check to see if the expected (limit) value is not equal to the actual value - * found in a test case. If the two values are equal nothing happens, but if - * the comparison fails, an error is reported in a consistent way and the - * execution of the current test case is aborted. + * Check to see if the expected (limit) value is not equal to the + * actual value found in a test case. If the two values are equal + * nothing happens, but if the comparison fails, an error is reported + * in a consistent way and the execution of the current test case is + * aborted. * * The message is interpreted as a stream, for example: * @@ -638,12 +662,12 @@ * * is legal. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the expected value of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the expected value of the test. + * \param [in] msg Message that is output if the test does not pass. * - * \warning Do not use this macro if you are comparing floating point numbers - * (float or double). Use NS_TEST_ASSERT_MSG_FLNE instead. + * \warning Do not use this macro if you are comparing floating point + * numbers (float or double). Use NS_TEST_ASSERT_MSG_FLNE instead. * * This function returns a boolean value. * @@ -670,7 +694,7 @@ actualStream << actual; \ std::ostringstream limitStream; \ limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) != " + \ + ReportTestFailure (std::string (#actual) + " (actual) != " + \ std::string (#limit) + " (limit)", \ actualStream.str (), limitStream.str (), \ msgStream.str (), file, line); \ @@ -680,13 +704,14 @@ /** * \ingroup testing * - * \brief Test that an actual and expected (limit) value are not equal and - * report if not. + * \brief Test that an actual and expected (limit) value are not equal + * and report if not. * - * Check to see if the expected (limit) value is not equal to the actual value - * found in a test case. If the two values are not equal nothing happens, but - * if the comparison fails, an error is reported in a consistent way. EXPECT* - * macros do not return if an error is detected. + * Check to see if the expected (limit) value is not equal to the + * actual value found in a test case. If the two values are not equal + * nothing happens, but if the comparison fails, an error is reported + * in a consistent way. EXPECT* macros do not return if an error is + * detected. * * The message is interpreted as a stream, for example: * @@ -697,12 +722,12 @@ * * is legal. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the value that actual is tested against. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the value that actual is tested against. + * \param [in] msg Message that is output if the test does not pass. * - * \warning Do not use this macro if you are comparing floating point numbers - * (float or double). Use NS_TEST_EXPECT_MSG_FLNE instead. + * \warning Do not use this macro if you are comparing floating point + * numbers (float or double). Use NS_TEST_EXPECT_MSG_FLNE instead. */ #define NS_TEST_EXPECT_MSG_NE(actual, limit, msg) \ NS_TEST_EXPECT_MSG_NE_INTERNAL (actual, limit, msg, __FILE__, __LINE__) @@ -727,7 +752,7 @@ actualStream << actual; \ std::ostringstream limitStream; \ limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) < " + \ + ReportTestFailure (std::string (#actual) + " (actual) < " + \ std::string (#limit) + " (limit)", \ actualStream.str (), limitStream.str (), \ msgStream.str (), file, line); \ @@ -742,7 +767,7 @@ */ #define NS_TEST_ASSERT_MSG_LT_OR_EQ_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) <= (limit))) \ + if (!((actual) <= (limit))) \ { \ ASSERT_ON_FAILURE; \ std::ostringstream msgStream; \ @@ -751,7 +776,7 @@ actualStream << actual; \ std::ostringstream limitStream; \ limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) < " + \ + ReportTestFailure (std::string (#actual) + " (actual) < " + \ std::string (#limit) + " (limit)", \ actualStream.str (), limitStream.str (), \ msgStream.str (), file, line); \ @@ -762,19 +787,19 @@ /** * \ingroup testing * - * \brief Test that an actual value is less than a limit and report and abort - * if not. + * \brief Test that an actual value is less than a limit and report + * and abort if not. * - * Check to see if the actual value found in a test case is less than the - * limit value. If the actual value is lesser nothing happens, but if the - * check fails, an error is reported in a consistent way and the execution - * of the current test case is aborted. + * Check to see if the actual value found in a test case is less than + * the limit value. If the actual value is lesser nothing happens, + * but if the check fails, an error is reported in a consistent way + * and the execution of the current test case is aborted. * * The message is interpreted as a stream. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the limit value of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the limit value of the test. + * \param [in] msg Message that is output if the test does not pass. */ #define NS_TEST_ASSERT_MSG_LT(actual, limit, msg) \ NS_TEST_ASSERT_MSG_LT_INTERNAL (actual, limit, msg, __FILE__, __LINE__) @@ -782,19 +807,20 @@ /** * \ingroup testing * - * \brief Test that an actual value is less than or equal to a limit and - * report and abort if not. + * \brief Test that an actual value is less than or equal to a limit + * and report and abort if not. * - * Check to see if the actual value found in a test case is less than or equal - * to the limit value. If the actual value is lesser or equal nothing happens, - * but if the check fails, an error is reported in a consistent way and the - * execution of the current test case is aborted. + * Check to see if the actual value found in a test case is less than + * or equal to the limit value. If the actual value is lesser or + * equal nothing happens, but if the check fails, an error is reported + * in a consistent way and the execution of the current test case is + * aborted. * * The message is interpreted as a stream. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the limit value of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the limit value of the test. + * \param [in] msg Message that is output if the test does not pass. */ #define NS_TEST_ASSERT_MSG_LT_OR_EQ(actual, limit, msg) \ NS_TEST_ASSERT_MSG_LT_OR_EQ_INTERNAL (actual, limit, msg, __FILE__, __LINE__) @@ -817,7 +843,7 @@ actualStream << actual; \ std::ostringstream limitStream; \ limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) < " + \ + ReportTestFailure (std::string (#actual) + " (actual) < " + \ std::string (#limit) + " (limit)", \ actualStream.str (), limitStream.str (), \ msgStream.str (), file, line); \ @@ -826,15 +852,15 @@ /** * \ingroup testingimpl - * \brief Test that an actual value is less than or equal to a limit and report - * if not. + * \brief Test that an actual value is less than or equal to a limit + * and report if not. * - * Required to avoid use of return statement which allows use in methods - * (callbacks) returning void. + * Required to avoid use of return statement which allows use in + * methods (callbacks) returning void. */ #define NS_TEST_EXPECT_MSG_LT_OR_EQ_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) <= (limit))) \ + if (!((actual) <= (limit))) \ { \ ASSERT_ON_FAILURE; \ std::ostringstream msgStream; \ @@ -843,7 +869,7 @@ actualStream << actual; \ std::ostringstream limitStream; \ limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) < " + \ + ReportTestFailure (std::string (#actual) + " (actual) < " + \ std::string (#limit) + " (limit)", \ actualStream.str (), limitStream.str (), \ msgStream.str (), file, line); \ @@ -853,18 +879,19 @@ /** * \ingroup testing * - * \brief Test that an actual value is less than a limit and report if not. + * \brief Test that an actual value is less than a limit and report if + * not. * - * Check to see if the actual value found in a test case is less than the - * limit value. If the actual value is lesser nothing happens, but if the - * check fails, an error is reported in a consistent way. EXPECT* macros do - * not return if an error is detected. + * Check to see if the actual value found in a test case is less than + * the limit value. If the actual value is lesser nothing happens, + * but if the check fails, an error is reported in a consistent way. + * EXPECT* macros do not return if an error is detected. * * The message is interpreted as a stream. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the limit value of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the limit value of the test. + * \param [in] msg Message that is output if the test does not pass. */ #define NS_TEST_EXPECT_MSG_LT(actual, limit, msg) \ NS_TEST_EXPECT_MSG_LT_INTERNAL (actual, limit, msg, __FILE__, __LINE__) @@ -872,19 +899,20 @@ /** * \ingroup testing * - * \brief Test that an actual value is less than or equal to a limit and report - * if not. + * \brief Test that an actual value is less than or equal to a limit + * and report if not. * - * Check to see if the actual value found in a test case is less than or equal to - * the limit value. If the actual value is lesser or equal nothing happens, but - * if the check fails, an error is reported in a consistent way. EXPECT* macros - * do not return if an error is detected. + * Check to see if the actual value found in a test case is less than + * or equal to the limit value. If the actual value is lesser or + * equal nothing happens, but if the check fails, an error is reported + * in a consistent way. EXPECT* macros do not return if an error is + * detected. * * The message is interpreted as a stream. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the limit value of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the limit value of the test. + * \param [in] msg Message that is output if the test does not pass. */ #define NS_TEST_EXPECT_MSG_LT_OR_EQ(actual, limit, msg) \ NS_TEST_EXPECT_MSG_LT_OR_EQ_INTERNAL (actual, limit, msg, __FILE__, __LINE__) @@ -909,7 +937,7 @@ actualStream << actual; \ std::ostringstream limitStream; \ limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) > " + \ + ReportTestFailure (std::string (#actual) + " (actual) > " + \ std::string (#limit) + " (limit)", \ actualStream.str (), limitStream.str (), \ msgStream.str (), file, line); \ @@ -919,12 +947,12 @@ /** * \ingroup testingimpl - * \brief Test that an actual value is greater than or equal to a limit and - * report and abort if not. + * \brief Test that an actual value is greater than or equal to a + * limit and report and abort if not. */ #define NS_TEST_ASSERT_MSG_GT_OR_EQ_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) >= (limit))) \ + if (!((actual) >= (limit))) \ { \ ASSERT_ON_FAILURE; \ std::ostringstream msgStream; \ @@ -933,7 +961,7 @@ actualStream << actual; \ std::ostringstream limitStream; \ limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) > " + \ + ReportTestFailure (std::string (#actual) + " (actual) > " + \ std::string (#limit) + " (limit)", \ actualStream.str (), limitStream.str (), \ msgStream.str (), file, line); \ @@ -944,19 +972,20 @@ /** * \ingroup testing * - * \brief Test that an actual value is greater than a limit and report and abort - * if not. + * \brief Test that an actual value is greater than a limit and report + * and abort if not. * - * Check to see if the actual value found in a test case is greater than the - * limit value. If the actual value is greater nothing happens, but if the - * check fails, an error is reported in a consistent way and the execution - * of the current test case is aborted. + * Check to see if the actual value found in a test case is greater + * than the limit value. If the actual value is greater nothing + * happens, but if the check fails, an error is reported in a + * consistent way and the execution of the current test case is + * aborted. * * The message is interpreted as a stream. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the limit value of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the limit value of the test. + * \param [in] msg Message that is output if the test does not pass. */ #define NS_TEST_ASSERT_MSG_GT(actual, limit, msg) \ NS_TEST_ASSERT_MSG_GT_INTERNAL (actual, limit, msg, __FILE__, __LINE__) @@ -964,19 +993,20 @@ /** * \ingroup testing * - * \brief Test that an actual value is greater than or equal to a limit and - * report and abort if not. + * \brief Test that an actual value is greater than or equal to a + * limit and report and abort if not. * - * Check to see if the actual value found in a test case is greater than or - * equal to the limit value. If the actual value is greater nothing happens, but - * if the check fails, an error is reported in a consistent way and the execution - * of the current test case is aborted. + * Check to see if the actual value found in a test case is greater + * than or equal to the limit value. If the actual value is greater + * nothing happens, but if the check fails, an error is reported in a + * consistent way and the execution of the current test case is + * aborted. * * The message is interpreted as a stream. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the limit value of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the limit value of the test. + * \param [in] msg Message that is output if the test does not pass. */ #define NS_TEST_ASSERT_MSG_GT_OR_EQ(actual, limit, msg) \ NS_TEST_ASSERT_MSG_GT_OR_EQ_INTERNAL (actual, limit, msg, __FILE__, __LINE__) @@ -992,14 +1022,14 @@ do { \ if (!((actual) > (limit))) \ { \ - ASSERT_ON_FAILURE; \ + ASSERT_ON_FAILURE; \ std::ostringstream msgStream; \ msgStream << msg; \ std::ostringstream actualStream; \ actualStream << actual; \ std::ostringstream limitStream; \ limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) > " + \ + ReportTestFailure (std::string (#actual) + " (actual) > " + \ std::string (#limit) + " (limit)", \ actualStream.str (), limitStream.str (), \ msgStream.str (), file, line); \ @@ -1008,24 +1038,24 @@ /** * \ingroup testingimpl - * \brief Test that an actual value is greater than or equal to limit and - * report if not. + * \brief Test that an actual value is greater than or equal to limit + * and report if not. * - * Required to avoid use of return statement which allows use in methods - * (callbacks) returning void. + * Required to avoid use of return statement which allows use in + * methods (callbacks) returning void. */ #define NS_TEST_EXPECT_MSG_GT_OR_EQ_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) >= (limit))) \ + if (!((actual) >= (limit))) \ { \ - ASSERT_ON_FAILURE; \ + ASSERT_ON_FAILURE; \ std::ostringstream msgStream; \ msgStream << msg; \ std::ostringstream actualStream; \ actualStream << actual; \ std::ostringstream limitStream; \ limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) > " + \ + ReportTestFailure (std::string (#actual) + " (actual) > " + \ std::string (#limit) + " (limit)", \ actualStream.str (), limitStream.str (), \ msgStream.str (), file, line); \ @@ -1035,18 +1065,20 @@ /** * \ingroup testing * - * \brief Test that an actual value is greater than a limit and report if not. + * \brief Test that an actual value is greater than a limit and report + * if not. * - * Check to see if the actual value found in a test case is greater than the - * limit value. If the actual value is greater nothing happens, but if the - * check fails, an error is reported in a consistent way. EXPECT* macros do - * not return if an error is detected. + * Check to see if the actual value found in a test case is greater + * than the limit value. If the actual value is greater nothing + * happens, but if the check fails, an error is reported in a + * consistent way. EXPECT* macros do not return if an error is + * detected. * * The message is interpreted as a stream. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the limit value of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the limit value of the test. + * \param [in] msg Message that is output if the test does not pass. */ #define NS_TEST_EXPECT_MSG_GT(actual, limit, msg) \ NS_TEST_EXPECT_MSG_GT_INTERNAL (actual, limit, msg, __FILE__, __LINE__) @@ -1054,19 +1086,20 @@ /** * \ingroup testing * - * \brief Test that an actual value is greater than or equal to limit and report - * if not. + * \brief Test that an actual value is greater than or equal to limit + * and report if not. * - * Check to see if the actual value found in a test case is greater than or - * equal to the limit value. If the actual value is greater nothing happens, - * but if the check fails, an error is reported in a consistent way. EXPECT* macros do - * not return if an error is detected. + * Check to see if the actual value found in a test case is greater + * than or equal to the limit value. If the actual value is greater + * nothing happens, but if the check fails, an error is reported in a + * consistent way. EXPECT* macros do not return if an error is + * detected. * * The message is interpreted as a stream. * - * \param actual Expression for the actual value found during the test. - * \param limit Expression for the limit value of the test. - * \param msg Message that is output if the test does not pass. + * \param [in] actual Expression for the actual value found during the test. + * \param [in] limit Expression for the limit value of the test. + * \param [in] msg Message that is output if the test does not pass. */ #define NS_TEST_EXPECT_MSG_GT_OR_EQ(actual, limit, msg) \ NS_TEST_EXPECT_MSG_GT_OR_EQ_INTERNAL (actual, limit, msg, __FILE__, __LINE__) @@ -1075,22 +1108,27 @@ namespace ns3 { /** * \ingroup testing - * \brief Compare two double precision floating point numbers and declare them - * equal if they are within some epsilon of each other. + * \brief Compare two double precision floating point numbers and + * declare them equal if they are within some epsilon of each other. * - * Approximate comparison of floating point numbers near equality is trickier - * than one may expect and is well-discussed in the literature. Basic - * strategies revolve around a suggestion by Knuth to compare the floating - * point numbers as binary integers, supplying a maximum difference between - * them . This max difference is specified in Units in the Last Place (ulps) - * or a floating point epsilon. + * Approximate comparison of floating point numbers near equality is + * trickier than one may expect and is well-discussed in the + * literature. Basic strategies revolve around a suggestion by Knuth + * to compare the floating point numbers as binary integers, supplying + * a maximum difference between them . This max difference is + * specified in Units in the Last Place (ulps) or a floating point + * epsilon. * - * This routine is based on the GNU Scientific Library function gsl_fcmp. + * This routine is based on the GNU Scientific Library function + * gsl_fcmp. * - * \param a The first of double precision floating point numbers to compare - * \param b The second of double precision floating point numbers to compare - * \param epsilon The tolerance to use in the comparison. - * \returns Returns \c true if the doubles are equal to a precision defined by epsilon + * \param [in] a The first of double precision floating point + * numbers to compare + * \param [in] b The second of double precision floating point + * numbers to compare + * \param [in] epsilon The tolerance to use in the comparison. + * \returns Returns \c true if the doubles are equal to a precision + * defined by epsilon */ bool TestDoubleIsEqual (const double a, const double b, const double epsilon = std::numeric_limits::epsilon ()); @@ -1103,8 +1141,8 @@ class TestRunnerImpl; * \brief encapsulates test code * * To allow a new test to be run within the ns-3 test framework, users - * need to create subclasses of this base class, override the DoRun method, - * and use the NS_TEST_* macros within DoRun. + * need to create subclasses of this base class, override the DoRun + * method, and use the NS_TEST_* macros within DoRun. */ class TestCase : private NonCopyable { @@ -1130,29 +1168,31 @@ protected: /** * \brief Constructor. * - * \param name The name of the new TestCase created + * \param [in] name The name of the new TestCase created */ TestCase (std::string name); /** * \brief Add an individual child TestCase to this test suite. * - * \param testCase Pointer to the TestCase object to be added. - * \param duration Amount of time this test takes to execute. + * \param [in] testCase Pointer to the TestCase object to be added. + * \param [in] duration Amount of time this test takes to execute. */ void AddTestCase (TestCase *testCase, enum TestDuration duration); /** - * \brief Set the data directory where reference trace files can be found. + * \brief Set the data directory where reference trace files can be + * found. * - * \param directory The directory where the test data is located + * \param [in] directory The directory where the test data is + * located * - * In general, this method is invoked as SetDataDir (NS_TEST_SOURCEDIR); - * However, if a module contains a test directory with subdirectories - * (e.g. src/mesh/test), and the test data (e.g. pcap traces) is located - * in one of these subdirectories, then the variable NS_TEST_SOURCEDIR - * may not work and the user may want to explicitly pass in a - * directory string. + * In general, this method is invoked as SetDataDir + * (NS_TEST_SOURCEDIR); However, if a module contains a test + * directory with subdirectories (e.g. src/mesh/test), and the test + * data (e.g. pcap traces) is located in one of these + * subdirectories, then the variable NS_TEST_SOURCEDIR may not work + * and the user may want to explicitly pass in a directory string. * * Note that NS_TEST_SOURCEDIR is set in src/wscript for each module */ @@ -1187,12 +1227,12 @@ protected: /** * \brief Log the failure of this TestCase. * - * \param cond The test condition. - * \param actual Actual value of the test. - * \param limit Expected value of the test. - * \param message Message indicating the type of failure. - * \param file The file where the test failed. - * \param line The line number in \p file where the test failed. + * \param [in] cond The test condition. + * \param [in] actual Actual value of the test. + * \param [in] limit Expected value of the test. + * \param [in] message Message indicating the type of failure. + * \param [in] file The file where the test failed. + * \param [in] line The line number in \p file where the test failed. */ void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, @@ -1214,7 +1254,7 @@ protected: * * The data directory is configured by SetDataDirectory(). * - * \param filename The bare (no path) file name + * \param [in] filename The bare (no path) file name * \return The full path to \p filename in the data directory */ std::string CreateDataDirFilename (std::string filename); @@ -1224,7 +1264,7 @@ protected: * If the TestRunner is invoked with "--update-data", this will be * the data directory instead. * - * \param filename The bare (no path) file name + * \param [in] filename The bare (no path) file name * \return The full path to \p filename in the temporary directory. */ std::string CreateTempDirFilename (std::string filename); @@ -1234,10 +1274,11 @@ private: friend class TestRunnerImpl; /** - * \brief Implementation to do any local setup required for this TestCase. + * \brief Implementation to do any local setup required for this + * TestCase. * - * Subclasses should override this method to perform any costly per-test setup - * before DoRun is invoked. + * Subclasses should override this method to perform any costly + * per-test setup before DoRun is invoked. */ virtual void DoSetup (void); @@ -1249,9 +1290,11 @@ private: virtual void DoRun (void) = 0; /** - * \brief Implementation to do any local setup required for this TestCase. + * \brief Implementation to do any local setup required for this + * TestCase. * - * Subclasses should override this method to perform any costly per-test teardown + * Subclasses should override this method to perform any costly + * per-test teardown */ virtual void DoTeardown (void); @@ -1259,7 +1302,7 @@ private: /** * \brief Actually run this TestCase * - * \param runner The test runner implementation. + * \param [in] runner The test runner implementation. */ void Run (TestRunnerImpl *runner); /** @@ -1306,8 +1349,8 @@ public: /** * \brief Constuct a new test suite. * - * \param name The name of the test suite. - * \param type The TestType of the test suite (defaults to UNIT test). + * \param [in] name The name of the test suite. + * \param [in] type The TestType of the test suite (defaults to UNIT test). */ TestSuite (std::string name, Type type = UNIT); @@ -1337,8 +1380,8 @@ public: * Run the requested suite of tests, * according to the given command line arguments. * - * \param argc The number of elements in \pname{argv} - * \param argv The vector of command line arguments + * \param [in] argc The number of elements in \pname{argv} + * \param [in] argv The vector of command line arguments * \returns Success status */ static int Run (int argc, char *argv[]); @@ -1365,12 +1408,12 @@ public: /** * \brief Set the expected length of this vector. * - * \param reserve The number of entries to reserve + * \param [in] reserve The number of entries to reserve */ void Reserve (uint32_t reserve); /** - * \param vector The test vector to add + * \param [in] vector The test vector to add * * \returns The new test vector index */ @@ -1383,7 +1426,7 @@ public: uint32_t GetN (void) const; /** * \brief Get the i'th test vector - * \param i The requested vector index + * \param [in] i The requested vector index * \return The requested vector */ T Get (uint32_t i) const; diff --git a/src/core/model/timer-impl.h b/src/core/model/timer-impl.h index a747aa2cf..31b86f7ef 100644 --- a/src/core/model/timer-impl.h +++ b/src/core/model/timer-impl.h @@ -53,15 +53,15 @@ public: /**@{*/ /** * \tparam T1 \deduced Type of the first argument. - * \param a1 The first argument + * \param [in] a1 The first argument */ template void SetArgs (T1 a1); /** * \tparam T1 \deduced Type of the first argument. * \tparam T2 \deduced Type of the second argument. - * \param a1 the first argument - * \param a2 the second argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument */ template void SetArgs (T1 a1, T2 a2); @@ -69,9 +69,9 @@ public: * \tparam T1 \deduced Type of the first argument. * \tparam T2 \deduced Type of the second argument. * \tparam T3 \deduced Type of the third argument. - * \param a1 the first argument - * \param a2 the second argument - * \param a3 the third argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument + * \param [in] a3 the third argument */ template void SetArgs (T1 a1, T2 a2, T3 a3); @@ -80,10 +80,10 @@ public: * \tparam T2 \deduced Type of the second argument. * \tparam T3 \deduced Type of the third argument. * \tparam T4 \deduced Type of the fourth argument. - * \param a1 the first argument - * \param a2 the second argument - * \param a3 the third argument - * \param a4 the fourth argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument + * \param [in] a3 the third argument + * \param [in] a4 the fourth argument */ template @@ -94,11 +94,11 @@ public: * \tparam T3 \deduced Type of the third argument. * \tparam T4 \deduced Type of the fourth argument. * \tparam T5 \deduced Type of the fifth argument. - * \param a1 the first argument - * \param a2 the second argument - * \param a3 the third argument - * \param a4 the fourth argument - * \param a5 the fifth argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument + * \param [in] a3 the third argument + * \param [in] a4 the fourth argument + * \param [in] a5 the fifth argument */ template @@ -110,12 +110,12 @@ public: * \tparam T4 \deduced Type of the fourth argument. * \tparam T5 \deduced Type of the fifth argument. * \tparam T6 \deduced Type of the sixth argument. - * \param a1 the first argument - * \param a2 the second argument - * \param a3 the third argument - * \param a4 the fourth argument - * \param a5 the fifth argument - * \param a6 the sixth argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument + * \param [in] a3 the third argument + * \param [in] a4 the fourth argument + * \param [in] a5 the fifth argument + * \param [in] a6 the sixth argument */ template @@ -125,7 +125,7 @@ public: /** * Schedule the callback for a future time. * - * \param delay The amount of time until the timer expires. + * \param [in] delay The amount of time until the timer expires. * \returns The scheduled EventId. */ virtual EventId Schedule (const Time &delay) = 0; @@ -155,7 +155,7 @@ struct TimerImplOne : public TimerImpl /** * Bind the arguments to be used when the callback function is invoked. * - * \param a1 The first argument. + * \param [in] a1 The first argument. */ virtual void SetArguments (T1 a1) = 0; }; @@ -166,8 +166,8 @@ struct TimerImplTwo : public TimerImpl /** * Bind the arguments to be used when the callback function is invoked. * - * \param a1 The first argument. - * \param a2 The second argument. + * \param [in] a1 The first argument. + * \param [in] a2 The second argument. */ virtual void SetArguments (T1 a1,T2 a2) = 0; }; @@ -178,9 +178,9 @@ struct TimerImplThree : public TimerImpl /** * Bind the arguments to be used when the callback function is invoked. * - * \param a1 The first argument. - * \param a2 The second argument. - * \param a3 The third argument. + * \param [in] a1 The first argument. + * \param [in] a2 The second argument. + * \param [in] a3 The third argument. */ virtual void SetArguments (T1 a1,T2 a2,T3 a3) = 0; }; @@ -191,10 +191,10 @@ struct TimerImplFour : public TimerImpl /** * Bind the arguments to be used when the callback function is invoked. * - * \param a1 The first argument. - * \param a2 The second argument. - * \param a3 The third argument. - * \param a4 The fourth argument. + * \param [in] a1 The first argument. + * \param [in] a2 The second argument. + * \param [in] a3 The third argument. + * \param [in] a4 The fourth argument. */ virtual void SetArguments (T1 a1,T2 a2,T3 a3, T4 a4) = 0; }; @@ -205,11 +205,11 @@ struct TimerImplFive : public TimerImpl /** * Bind the arguments to be used when the callback function is invoked. * - * \param a1 The first argument. - * \param a2 The second argument. - * \param a3 The third argument. - * \param a4 The fourth argument. - * \param a5 The fifth argument. + * \param [in] a1 The first argument. + * \param [in] a2 The second argument. + * \param [in] a3 The third argument. + * \param [in] a4 The fourth argument. + * \param [in] a5 The fifth argument. */ virtual void SetArguments (T1 a1,T2 a2,T3 a3, T4 a4, T5 a5) = 0; }; @@ -220,12 +220,12 @@ struct TimerImplSix : public TimerImpl /** * Bind the arguments to be used when the callback function is invoked. * - * \param a1 The first argument. - * \param a2 The second argument. - * \param a3 The third argument. - * \param a4 The fourth argument. - * \param a5 The fifth argument. - * \param a6 The sixth argument. + * \param [in] a1 The first argument. + * \param [in] a2 The second argument. + * \param [in] a3 The third argument. + * \param [in] a4 The fourth argument. + * \param [in] a5 The fifth argument. + * \param [in] a6 The sixth argument. */ virtual void SetArguments (T1 a1,T2 a2,T3 a3, T4 a4, T5 a5, T6 a6) = 0; }; @@ -245,7 +245,7 @@ struct TimerTraits * Make a TimerImpl from a function pointer taking varying numbers of arguments. * * \tparam FN \deduced Function signature type of the callback function. - * \param fn The function pointer to invoke when the timer expires. + * \param [in] fn The function pointer to invoke when the timer expires. * \returns The TimerImpl. */ template @@ -603,7 +603,7 @@ struct TimerImplMemberTraits /** * Convert a pointer type to a reference. * - * \param p The pointer. + * \param [in] p The pointer. * \returns A reference to the object pointed to by \c p. */ static T &GetReference (T *p) @@ -618,8 +618,8 @@ struct TimerImplMemberTraits * * \tparam MEM_PTR \deduced Class method function signature type. * \tparam OBJ_PTR \deduced Class type. - * \param memPtr Class method to invoke when the timer expires. - * \param objPtr Object instance pointer. + * \param [in] memPtr Class method to invoke when the timer expires. + * \param [in] objPtr Object instance pointer. * \returns The TimerImpl. */ template diff --git a/src/core/model/timer.h b/src/core/model/timer.h index a491a4fcc..9d68af315 100644 --- a/src/core/model/timer.h +++ b/src/core/model/timer.h @@ -108,13 +108,14 @@ public: */ Timer (); /** - * \param destroyPolicy the event lifetime management policies to use for destroy events + * \param [in] destroyPolicy the event lifetime management policies + * to use for destroy events */ Timer (enum DestroyPolicy destroyPolicy); ~Timer (); /** - * \param fn the function + * \param [in] fn the function * * Store this function in this Timer for later use by Timer::Schedule. */ @@ -122,67 +123,68 @@ public: void SetFunction (FN fn); /** - * \param memPtr the member function pointer - * \param objPtr the pointer to object + * \param [in] memPtr the member function pointer + * \param [in] objPtr the pointer to object * - * Store this function and object in this Timer for later use by Timer::Schedule. + * Store this function and object in this Timer for later use by + * Timer::Schedule. */ template void SetFunction (MEM_PTR memPtr, OBJ_PTR objPtr); /** - * \param a1 the first argument + * \param [in] a1 the first argument * * Store this argument in this Timer for later use by Timer::Schedule. */ template void SetArguments (T1 a1); /** - * \param a1 the first argument - * \param a2 the second argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument * * Store these arguments in this Timer for later use by Timer::Schedule. */ template void SetArguments (T1 a1, T2 a2); /** - * \param a1 the first argument - * \param a2 the second argument - * \param a3 the third argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument + * \param [in] a3 the third argument * * Store these arguments in this Timer for later use by Timer::Schedule. */ template void SetArguments (T1 a1, T2 a2, T3 a3); /** - * \param a1 the first argument - * \param a2 the second argument - * \param a3 the third argument - * \param a4 the fourth argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument + * \param [in] a3 the third argument + * \param [in] a4 the fourth argument * * Store these arguments in this Timer for later use by Timer::Schedule. */ template void SetArguments (T1 a1, T2 a2, T3 a3, T4 a4); /** - * \param a1 the first argument - * \param a2 the second argument - * \param a3 the third argument - * \param a4 the fourth argument - * \param a5 the fifth argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument + * \param [in] a3 the third argument + * \param [in] a4 the fourth argument + * \param [in] a5 the fifth argument * * Store these arguments in this Timer for later use by Timer::Schedule. */ template void SetArguments (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); /** - * \param a1 the first argument - * \param a2 the second argument - * \param a3 the third argument - * \param a4 the fourth argument - * \param a5 the fifth argument - * \param a6 the sixth argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument + * \param [in] a3 the third argument + * \param [in] a4 the fourth argument + * \param [in] a5 the fifth argument + * \param [in] a6 the sixth argument * * Store these arguments in this Timer for later use by Timer::Schedule. */ @@ -190,17 +192,17 @@ public: void SetArguments (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6); /** - * \param delay the delay + * \param [in] delay The delay * * The next call to Schedule will schedule the timer with this delay. */ void SetDelay (const Time &delay); /** - * \returns the currently-configured delay for the next Schedule. + * \returns The currently-configured delay for the next Schedule. */ Time GetDelay (void) const; /** - * \returns the amount of time left until this timer expires. + * \returns The amount of time left until this timer expires. * * This method returns zero if the timer is in EXPIRED state. */ @@ -216,20 +218,22 @@ public: */ void Remove (void); /** - * \return true if there is no currently-running event, false otherwise. + * \return \c true if there is no currently-running event, + * \c false otherwise. */ bool IsExpired (void) const; /** - * \return true if there is a currently-running event, false otherwise. + * \return \c true if there is a currently-running event, + * \c false otherwise. */ bool IsRunning (void) const; /** - * \returns true if this timer was suspended and not yet resumed, false - * otherwise. + * \returns \c true if this timer was suspended and not yet resumed, + * \c false otherwise. */ bool IsSuspended (void) const; /** - * \returns the current state of the timer. + * \returns The current state of the timer. */ enum Timer::State GetState (void) const; /** @@ -238,7 +242,7 @@ public: */ void Schedule (void); /** - * \param delay the delay to use + * \param [in] delay the delay to use * * Schedule a new event using the specified delay (ignore the delay set by * Timer::SetDelay), function, and arguments. diff --git a/src/core/model/trace-source-accessor.h b/src/core/model/trace-source-accessor.h index a0621bbb1..4080e752c 100644 --- a/src/core/model/trace-source-accessor.h +++ b/src/core/model/trace-source-accessor.h @@ -54,8 +54,8 @@ public: /** * Connect a Callback to a TraceSource (without context.) * - * \param obj The object instance which contains the target trace source. - * \param cb The callback to connect to the target trace source. + * \param [in] obj The object instance which contains the target trace source. + * \param [in] cb The callback to connect to the target trace source. * \return \c true unless the connection could not be made, typically because * the \c obj couldn't be cast to the correct type. */ @@ -66,9 +66,9 @@ public: * The context string will be provided as the first argument to the * Callback function. * - * \param obj The object instance which contains the target trace source. - * \param context The context to bind to the user callback. - * \param cb The callback to connect to the target trace source. + * \param [in] obj The object instance which contains the target trace source. + * \param [in] context The context to bind to the user callback. + * \param [in] cb The callback to connect to the target trace source. * \return \c true unless the connection could not be made, typically because * the \c obj couldn't be cast to the correct type. */ @@ -76,8 +76,8 @@ public: /** * Disconnect a Callback from a TraceSource (without context). * - * \param obj The object instance which contains the target trace source. - * \param cb The callback to disconnect from the target trace source. + * \param [in] obj The object instance which contains the target trace source. + * \param [in] cb The callback to disconnect from the target trace source. * \return \c true unless the connection could not be made, typically because * the \c obj couldn't be cast to the correct type. */ @@ -88,9 +88,9 @@ public: * The context string will be provided as the first argument to the * Callback function. * - * \param obj the object instance which contains the target trace source. - * \param context the context which was bound to the user callback. - * \param cb the callback to disconnect from the target trace source. + * \param [in] obj the object instance which contains the target trace source. + * \param [in] context the context which was bound to the user callback. + * \param [in] cb the callback to disconnect from the target trace source. * \return \c true unless the connection could not be made, typically because * the \c obj couldn't be cast to the correct type. */ @@ -109,7 +109,7 @@ public: * static-polymorphic class. This functionality is typically provided * by wrapping an object data member in a TracedCallback. * - * \param a the trace source + * \param [in] a The trace source * \returns The TraceSourceAccessor */ template @@ -130,7 +130,7 @@ namespace ns3 { * * \tparam T \deduced Class type of the TracedCallback * \tparam SOURCE \deduced Type of the underlying value. - * \param a The underlying data value. + * \param [in] a The underlying data value. * \returns The TraceSourceAccessor */ template diff --git a/src/core/model/traced-callback.h b/src/core/model/traced-callback.h index 0421471b2..51ecbd777 100644 --- a/src/core/model/traced-callback.h +++ b/src/core/model/traced-callback.h @@ -67,7 +67,7 @@ public: /** * Append a Callback to the chain (without a context). * - * \param callback Callback to add to chain. + * \param [in] callback Callback to add to chain. */ void ConnectWithoutContext (const CallbackBase & callback); /** @@ -76,21 +76,21 @@ public: * The context string will be provided as the first argument * to the Callback. * - * \param callback Callback to add to chain. - * \param path Context string to provide when invoking the Callback. + * \param [in] callback Callback to add to chain. + * \param [in] path Context string to provide when invoking the Callback. */ void Connect (const CallbackBase & callback, std::string path); /** * Remove from the chain a Callback which was connected without a context. * - * \param callback Callback to remove from the chain. + * \param [in] callback Callback to remove from the chain. */ void DisconnectWithoutContext (const CallbackBase & callback); /** * Remove from the chain a Callback which was connected with a context. * - * \param callback Callback to remove from the chain. - * \param path Context path which was used to connect the Callback. + * \param [in] callback Callback to remove from the chain. + * \param [in] path Context path which was used to connect the Callback. */ void Disconnect (const CallbackBase & callback, std::string path); /** @@ -106,15 +106,15 @@ public: /** * \copybrief operator()() * \tparam T1 \deduced Type of the first argument to the functor. - * \param a1 The first argument to the functor. + * \param [in] a1 The first argument to the functor. */ void operator() (T1 a1) const; /** * \copybrief operator()() * \tparam T1 \deduced Type of the first argument to the functor. * \tparam T2 \deduced Type of the second argument to the functor. - * \param a1 The first argument to the functor. - * \param a2 The second argument to the functor. + * \param [in] a1 The first argument to the functor. + * \param [in] a2 The second argument to the functor. */ void operator() (T1 a1, T2 a2) const; /** @@ -122,9 +122,9 @@ public: * \tparam T1 \deduced Type of the first argument to the functor. * \tparam T2 \deduced Type of the second argument to the functor. * \tparam T3 \deduced Type of the third argument to the functor. - * \param a1 The first argument to the functor. - * \param a2 The second argument to the functor. - * \param a3 The third argument to the functor. + * \param [in] a1 The first argument to the functor. + * \param [in] a2 The second argument to the functor. + * \param [in] a3 The third argument to the functor. */ void operator() (T1 a1, T2 a2, T3 a3) const; /** @@ -133,10 +133,10 @@ public: * \tparam T2 \deduced Type of the second argument to the functor. * \tparam T3 \deduced Type of the third argument to the functor. * \tparam T4 \deduced Type of the fourth argument to the functor. - * \param a1 The first argument to the functor. - * \param a2 The second argument to the functor. - * \param a3 The third argument to the functor. - * \param a4 The fourth argument to the functor. + * \param [in] a1 The first argument to the functor. + * \param [in] a2 The second argument to the functor. + * \param [in] a3 The third argument to the functor. + * \param [in] a4 The fourth argument to the functor. */ void operator() (T1 a1, T2 a2, T3 a3, T4 a4) const; /** @@ -146,11 +146,11 @@ public: * \tparam T3 \deduced Type of the third argument to the functor. * \tparam T4 \deduced Type of the fourth argument to the functor. * \tparam T5 \deduced Type of the fifth argument to the functor. - * \param a1 The first argument to the functor. - * \param a2 The second argument to the functor. - * \param a3 The third argument to the functor. - * \param a4 The fourth argument to the functor. - * \param a5 The fifth argument to the functor. + * \param [in] a1 The first argument to the functor. + * \param [in] a2 The second argument to the functor. + * \param [in] a3 The third argument to the functor. + * \param [in] a4 The fourth argument to the functor. + * \param [in] a5 The fifth argument to the functor. */ void operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) const; /** @@ -161,12 +161,12 @@ public: * \tparam T4 \deduced Type of the fourth argument to the functor. * \tparam T5 \deduced Type of the fifth argument to the functor. * \tparam T6 \deduced Type of the sixth argument to the functor. - * \param a1 The first argument to the functor. - * \param a2 The second argument to the functor. - * \param a3 The third argument to the functor. - * \param a4 The fourth argument to the functor. - * \param a5 The fifth argument to the functor. - * \param a6 The sixth argument to the functor. + * \param [in] a1 The first argument to the functor. + * \param [in] a2 The second argument to the functor. + * \param [in] a3 The third argument to the functor. + * \param [in] a4 The fourth argument to the functor. + * \param [in] a5 The fifth argument to the functor. + * \param [in] a6 The sixth argument to the functor. */ void operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) const; /** @@ -178,13 +178,13 @@ public: * \tparam T5 \deduced Type of the fifth argument to the functor. * \tparam T6 \deduced Type of the sixth argument to the functor. * \tparam T7 \deduced Type of the seventh argument to the functor. - * \param a1 The first argument to the functor. - * \param a2 The second argument to the functor. - * \param a3 The third argument to the functor. - * \param a4 The fourth argument to the functor. - * \param a5 The fifth argument to the functor. - * \param a6 The sixth argument to the functor. - * \param a7 The seventh argument to the functor. + * \param [in] a1 The first argument to the functor. + * \param [in] a2 The second argument to the functor. + * \param [in] a3 The third argument to the functor. + * \param [in] a4 The fourth argument to the functor. + * \param [in] a5 The fifth argument to the functor. + * \param [in] a6 The sixth argument to the functor. + * \param [in] a7 The seventh argument to the functor. */ void operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7) const; /** @@ -197,14 +197,14 @@ public: * \tparam T6 \deduced Type of the sixth argument to the functor. * \tparam T7 \deduced Type of the seventh argument to the functor. * \tparam T8 \deduced Type of the eighth argument to the functor. - * \param a1 The first argument to the functor. - * \param a2 The second argument to the functor. - * \param a3 The third argument to the functor. - * \param a4 The fourth argument to the functor. - * \param a5 The fifth argument to the functor. - * \param a6 The sixth argument to the functor. - * \param a7 The seventh argument to the functor. - * \param a8 The eighth argument to the functor. + * \param [in] a1 The first argument to the functor. + * \param [in] a2 The second argument to the functor. + * \param [in] a3 The third argument to the functor. + * \param [in] a4 The fourth argument to the functor. + * \param [in] a5 The fifth argument to the functor. + * \param [in] a6 The sixth argument to the functor. + * \param [in] a7 The seventh argument to the functor. + * \param [in] a8 The eighth argument to the functor. */ void operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8) const; /**@}*/ diff --git a/src/core/model/traced-value.h b/src/core/model/traced-value.h index c99572cf9..f003ec325 100644 --- a/src/core/model/traced-value.h +++ b/src/core/model/traced-value.h @@ -84,13 +84,13 @@ public: : m_v () {} /** * Copy constructor. - * \param o The value to copy. + * \param [in] o The value to copy. */ TracedValue (const TracedValue &o) : m_v (o.m_v) {} /** * Construct from an explicit variable. - * \param v The variable to trace. + * \param [in] v The variable to trace. */ TracedValue (const T &v) : m_v (v) {} @@ -103,7 +103,7 @@ public: } /** * Assignment. - * \param o The value to assign to this instance. + * \param [in] o The value to assign to this instance. * \return This TracedValue. */ TracedValue &operator = (const TracedValue &o) { @@ -114,7 +114,7 @@ public: /** * Copy from a TracedValue of a compatable type. * \tparam U \deduced The underlying type of the other TracedValue. - * \param other The other TracedValuet to copy. + * \param [in] other The other TracedValuet to copy. */ template TracedValue (const TracedValue &other) @@ -123,7 +123,7 @@ public: /** * Copy from a variable type compatible with this underlying type. * \tparam U \deduced Type of the other variable. - * \param other The other variable to copy. + * \param [in] other The other variable to copy. */ template TracedValue (const U &other) @@ -132,7 +132,7 @@ public: /** * Connect a Callback (without context.) * - * \param cb The callback to connect. + * \param [in] cb The callback to connect. */ void ConnectWithoutContext (const CallbackBase &cb) { m_cb.ConnectWithoutContext (cb); @@ -143,8 +143,8 @@ public: * The context string will be provided as the first argument to the * Callback function. * - * \param cb The Callback to connect to the target trace source. - * \param path The context to bind to the user callback. + * \param [in] cb The Callback to connect to the target trace source. + * \param [in] path The context to bind to the user callback. */ void Connect (const CallbackBase &cb, std::string path) { m_cb.Connect (cb, path); @@ -152,7 +152,7 @@ public: /** * Disconnect a Callback which was connected without context. * - * \param cb The Callback to disconnect. + * \param [in] cb The Callback to disconnect. */ void DisconnectWithoutContext (const CallbackBase &cb) { m_cb.DisconnectWithoutContext (cb); @@ -160,8 +160,8 @@ public: /** * Disconnect a Callback which was connected with context. * - * \param cb The Callback to disconnect. - * \param path The context to bind to the user callback. + * \param [in] cb The Callback to disconnect. + * \param [in] path The context to bind to the user callback. */ void Disconnect (const CallbackBase &cb, std::string path) { m_cb.Disconnect (cb, path); @@ -170,7 +170,7 @@ public: * Set the value of the underlying variable. * * If the new value differs from the old, the Callback will be invoked. - * \param v The new value. + * \param [in] v The new value. */ void Set (const T &v) { if (m_v != v) @@ -264,8 +264,8 @@ private: * The underlying value will be written to the stream. * * \tparam T \deduced The underlying type of the TracedValue. - * \param os The output stream. - * \param rhs The TracedValue to stream. + * \param [in,out] os The output stream. + * \param [in] rhs The TracedValue to stream. * \returns The stream. */ template @@ -278,8 +278,8 @@ std::ostream& operator << (std::ostream& os, const TracedValue& rhs) * Boolean operator for TracedValue. * \tparam T \deduced The underlying type held by the left-hand argument. * \tparam U \deduced The underlying type held by the right-hand argument. - * \param lhs The left-hand argument. - * \param rhs The right-hand argument. + * \param [in] lhs The left-hand argument. + * \param [in] rhs The right-hand argument. * \returns The boolean result of comparing the underlying values. */ template @@ -420,8 +420,8 @@ bool operator > (const U &lhs, const TracedValue &rhs) * * \tparam T \deduced The underlying type held by the left-hand argument. * \tparam U \deduced The underlying type held by the right-hand argument. - * \param lhs The left-hand argument. - * \param rhs The right-hand argument. + * \param [in] lhs The left-hand argument. + * \param [in] rhs The right-hand argument. * \returns The result of doing the operator on * the underlying values. */ @@ -623,8 +623,8 @@ TracedValue operator >> (const U &lhs, const TracedValue &rhs) { * * \tparam T \deduced The underlying type held by the left-hand argument. * \tparam U \deduced The underlying type held by the right-hand argument. - * \param lhs The left-hand argument. - * \param rhs The right-hand argument. + * \param [in] lhs The left-hand argument. + * \param [in] rhs The right-hand argument. * \returns The result of doing the operator on * the underlying values. */ @@ -723,7 +723,7 @@ TracedValue &operator ^= (TracedValue &lhs, const U &rhs) { * Unary arithmetic operator for TracedValue. * * \tparam T \deduced The underlying type held by the TracedValue. - * \param lhs The TracedValue. + * \param [in] lhs The TracedValue. * \returns The result of doing the operator on * the underlying values. */ diff --git a/src/core/model/type-id.cc b/src/core/model/type-id.cc index 8f8a6bb06..baa0c0f13 100644 --- a/src/core/model/type-id.cc +++ b/src/core/model/type-id.cc @@ -185,13 +185,16 @@ public: /** * Record a new attribute in a type id. * \param [in] uid The id. - * \param name The name of the new attribute - * \param help Some help text which describes the purpose of this - * attribute. - * \param flags Flags which describe how this attribute can be read and/or written. - * \param initialValue The initial value for this attribute. - * \param accessor An instance of the associated AttributeAccessor subclass. - * \param checker An instance of the associated AttributeChecker subclass. + * \param [in] name The name of the new attribute + * \param [in] help Some help text which describes the purpose of this + * attribute. + * \param [in] flags Flags which describe how this attribute can be + * read and/or written. + * \param [in] initialValue The initial value for this attribute. + * \param [in] accessor An instance of the associated AttributeAccessor + * subclass. + * \param [in] checker An instance of the associated AttributeChecker + * subclass. */ void AddAttribute (uint16_t uid, std::string name, @@ -203,8 +206,8 @@ public: /** * Set the initial value of an Attribute. * \param [in] uid The id. - * \param i The attribute to manipulate - * \param initialValue The new initial value to use for this attribute. + * \param [in] i The attribute to manipulate + * \param [in] initialValue The new initial value to use for this attribute. */ void SetAttributeInitialValue(uint16_t uid, uint32_t i, @@ -218,20 +221,21 @@ public: /** * Get Attribute information by index. * \param [in] uid The id. - * \param i Index into attribute array + * \param [in] i Index into attribute array * \returns The information associated to attribute whose index is \p i. */ struct TypeId::AttributeInformation GetAttribute(uint16_t uid, uint32_t i) const; /** * Record a new TraceSource. * \param [in] uid The id. - * \param name The name of the new trace source - * \param help Some help text which describes the purpose of this - * trace source. - * \param accessor A pointer to a TraceSourceAccessor which can be - * used to connect/disconnect sinks to this trace source. - * \param callback Fully qualified typedef name for the callback signature. - * Generally this should begin with the "ns3::" namespace qualifier. + * \param [in] name The name of the new trace source + * \param [in] help Some help text which describes the purpose of this + * trace source. + * \param [in] accessor A pointer to a TraceSourceAccessor which can be + * used to connect/disconnect sinks to this trace source. + * \param [in] callback Fully qualified typedef name for the callback + * signature. Generally this should begin with the + * "ns3::" namespace qualifier. * \returns This TypeId instance. */ void AddTraceSource (uint16_t uid, @@ -248,7 +252,7 @@ public: /** * Get the trace source by index. * \param [in] uid The id. - * \param i Index into trace source array. + * \param [in] i Index into trace source array. * \returns Detailed information about the requested trace source. */ struct TypeId::TraceSourceInformation GetTraceSource(uint16_t uid, uint32_t i) const; diff --git a/src/core/model/type-id.h b/src/core/model/type-id.h index ef17aef0f..816099ae6 100644 --- a/src/core/model/type-id.h +++ b/src/core/model/type-id.h @@ -100,7 +100,7 @@ public: /** * Get a TypeId by name. * - * \param name The name of the requested TypeId + * \param [in] name The name of the requested TypeId * \returns The unique id associated with the requested name. * * This method cannot fail: it will crash if the input @@ -110,16 +110,16 @@ public: /** * Get a TypeId by name. * - * \param name The name of the requested TypeId - * \param tid A pointer to the TypeId instance where the - * result of this function should be stored. + * \param [in] name The name of the requested TypeId + * \param [out] tid A pointer to the TypeId instance where the + * result of this function should be stored. * \returns \c true if the requested name was found. */ static bool LookupByNameFailSafe (std::string name, TypeId *tid); /** * Get a TypeId by hash. * - * \param hash The hash to lookup + * \param [in] hash The hash to lookup * \returns The unique id associated with the requested hash. * * This method cannot fail: it will crash if the input @@ -129,9 +129,9 @@ public: /** * Get a TypeId by hash. * - * \param hash The hash of the requested TypeId - * \param tid A pointer to the TypeId instance where the - * result of this function should be stored. + * \param [in] hash The hash of the requested TypeId + * \param [out] tid A pointer to the TypeId instance where the + * result of this function should be stored. * \returns \c true if the requested hash was found. */ static bool LookupByHashFailSafe (hash_t hash, TypeId *tid); @@ -145,15 +145,15 @@ public: /** * Get a TypeId by index. * - * \param i Index of the TypeId. - * \returns he TypeId instance whose index is \c i. + * \param [in] i Index of the TypeId. + * \returns The TypeId instance whose index is \c i. */ static TypeId GetRegistered (uint32_t i); /** * Constructor. * - * \param name The name of the interface to construct. + * \param [in] name The name of the interface to construct. * * No two instances can share the same name. The name is expected to be * the full c++ typename of associated c++ object. @@ -183,7 +183,7 @@ public: /** * Check if this TypeId is a child of another. * - * \param other A parent TypeId + * \param [in] other A parent TypeId * \returns \c true if the input TypeId is really a parent of this TypeId. * * Calling this method is roughly similar to calling dynamic_cast @@ -236,14 +236,14 @@ public: /** * Get Attribute information by index. * - * \param i Index into attribute array + * \param [in] i Index into attribute array * \returns The information associated to attribute whose index is \p i. */ struct TypeId::AttributeInformation GetAttribute(uint32_t i) const; /** * Get the Attribute name by index. * - * \param i Index into attribute array + * \param [in] i Index into attribute array * \returns The full name associated to the attribute whose index is \p i. */ std::string GetAttributeFullName (uint32_t i) const; @@ -273,7 +273,7 @@ public: /** * Get the trace source by index. * - * \param i Index into trace source array. + * \param [in] i Index into trace source array. * \returns Detailed information about the requested trace source. */ struct TypeId::TraceSourceInformation GetTraceSource(uint32_t i) const; @@ -281,7 +281,7 @@ public: /** * Set the parent TypeId. * - * \param tid The TypeId of the base class. + * \param [in] tid The TypeId of the base class. * \return This TypeId instance. * * Record in this TypeId which TypeId is the TypeId @@ -303,7 +303,7 @@ public: /** * Set the group name. * - * \param groupName The name of the group this TypeId belongs to. + * \param [in] groupName The name of the group this TypeId belongs to. * \returns This TypeId instance. * * The group name is purely an advisory information used to @@ -323,7 +323,7 @@ public: * A ridiculously large reported size is a symptom that the * type hasn't been registered. * - * \param size The size of the object, in bytes. + * \param [in] size The size of the object, in bytes. * \returns This TypeId instance. */ TypeId SetSize (std::size_t size); @@ -341,12 +341,14 @@ public: /** * Record in this TypeId the fact that a new attribute exists. * - * \param name The name of the new attribute - * \param help Some help text which describes the purpose of this - * attribute. - * \param initialValue The initial value for this attribute. - * \param accessor An instance of the associated AttributeAccessor subclass. - * \param checker An instance of the associated AttributeChecker subclass. + * \param [in] name The name of the new attribute + * \param [in] help Some help text which describes the purpose of this + * attribute. + * \param [in] initialValue The initial value for this attribute. + * \param [in] accessor An instance of the associated AttributeAccessor + * subclass. + * \param [in] checker An instance of the associated AttributeChecker + * subclass. * \returns This TypeId instance */ TypeId AddAttribute (std::string name, @@ -358,8 +360,8 @@ public: /** * Set the initial value of an Attribute. * - * \param i The attribute to manipulate - * \param initialValue The new initial value to use for this attribute. + * \param [in] i The attribute to manipulate + * \param [in] initialValue The new initial value to use for this attribute. * \returns \c true if the call was successfuly. */ bool SetAttributeInitialValue(uint32_t i, @@ -368,13 +370,15 @@ public: /** * Record in this TypeId the fact that a new attribute exists. * - * \param name The name of the new attribute - * \param help Some help text which describes the purpose of this + * \param [in] name The name of the new attribute + * \param [in] help Some help text which describes the purpose of this * attribute - * \param flags Flags which describe how this attribute can be read and/or written. - * \param initialValue The initial value for this attribute. - * \param accessor An instance of the associated AttributeAccessor subclass. - * \param checker An instance of the associated AttributeChecker subclass. + * \param [in] flags Flags which describe how this attribute can be read and/or written. + * \param [in] initialValue The initial value for this attribute. + * \param [in] accessor An instance of the associated AttributeAccessor + * subclass. + * \param [in] checker An instance of the associated AttributeChecker + * subclass. * \returns This TypeId instance */ TypeId AddAttribute (std::string name, @@ -387,11 +391,11 @@ public: /** * Record a new TraceSource. * - * \param name The name of the new trace source - * \param help Some help text which describes the purpose of this - * trace source. - * \param accessor A pointer to a TraceSourceAccessor which can be - * used to connect/disconnect sinks to this trace source. + * \param [in] name The name of the new trace source + * \param [in] help Some help text which describes the purpose of this + * trace source. + * \param [in] accessor A pointer to a TraceSourceAccessor which can be + * used to connect/disconnect sinks to this trace source. * \returns this TypeId instance. */ TypeId AddTraceSource (std::string name, @@ -402,13 +406,14 @@ public: /** * Record a new TraceSource. * - * \param name The name of the new trace source - * \param help Some help text which describes the purpose of this - * trace source. - * \param accessor A pointer to a TraceSourceAccessor which can be - * used to connect/disconnect sinks to this trace source. - * \param callback Fully qualified typedef name for the callback signature. - * Generally this should begin with the "ns3::" namespace qualifier. + * \param [in] name The name of the new trace source + * \param [in] help Some help text which describes the purpose of this + * trace source. + * \param [in] accessor A pointer to a TraceSourceAccessor which can be + * used to connect/disconnect sinks to this trace source. + * \param [in] callback Fully qualified typedef name for the callback + * signature. Generally this should begin with the + * "ns3::" namespace qualifier. * \returns This TypeId instance. */ TypeId AddTraceSource (std::string name, @@ -425,9 +430,10 @@ public: /** * Find an Attribute by name. * - * \param name The name of the requested attribute - * \param info A pointer to the TypeId::AttributeInformation data structure - * where the result value of this method will be stored. + * \param [in] name The name of the requested attribute + * \param [out] info A pointer to the TypeId::AttributeInformation + * data structure where the result value of this method + * will be stored. * \returns \c true if the requested attribute could be found. */ bool LookupAttributeByName (std::string name, struct AttributeInformation *info) const; @@ -436,9 +442,10 @@ public: * * If no matching trace source is found, this method returns zero. * - * \param name The name of the requested trace source - * \returns The trace source accessor which can be used to connect and disconnect - * trace sinks with the requested trace source on an object instance. + * \param [in] name The name of the requested trace source + * \returns The trace source accessor which can be used to connect + * and disconnect trace sinks with the requested trace source on + * an object instance. */ Ptr LookupTraceSourceByName (std::string name) const; @@ -454,8 +461,8 @@ public: /** * Set the internal id of this TypeId. * - * \param tid The internal integer which uniquely identifies this TypeId. - * This TypeId should already have been registered. + * \param [in] tid The internal integer which uniquely identifies + * this TypeId. This TypeId should already have been registered. * * Typically this is used in serialization/deserialization. * @@ -512,7 +519,7 @@ private: * \relates TypeId * Output streamer. * - * \param [in] os The output stream. + * \param [in,out] os The output stream. * \param [in] tid The TypeId. * \returns The output stream. */ @@ -520,7 +527,7 @@ std::ostream & operator << (std::ostream &os, TypeId tid); /** * \relates TypeId * Input Streamer. - * \param [in] is The input stream. + * \param [in,out] is The input stream. * \param [out] tid The TypeId to set from the stream. * \returns The input stream. */ diff --git a/src/core/model/uinteger.cc b/src/core/model/uinteger.cc index 37c1718fe..dac670ef6 100644 --- a/src/core/model/uinteger.cc +++ b/src/core/model/uinteger.cc @@ -40,9 +40,9 @@ namespace internal { * \ingroup attribute_Uinteger * Make an Uinteger attribute checker with embedded numeric type name. * - * \param min The minimum allowed value. - * \param max The maximum allowed value. - * \param name The original type name ("uint8_t", "uint16_t", _etc_.). + * \param [in] min The minimum allowed value. + * \param [in] max The maximum allowed value. + * \param [in] name The original type name ("uint8_t", "uint16_t", _etc_.). * \returns The AttributeChecker. */ Ptr MakeUintegerChecker (uint64_t min, uint64_t max, std::string name) diff --git a/src/core/model/unix-fd-reader.h b/src/core/model/unix-fd-reader.h index 34edd8f6e..8ea45c355 100644 --- a/src/core/model/unix-fd-reader.h +++ b/src/core/model/unix-fd-reader.h @@ -55,9 +55,9 @@ public: /** * Start a new read thread. * - * \param fd A valid file descriptor open for reading. + * \param [in] fd A valid file descriptor open for reading. * - * \param readCallback A callback to invoke when new data is + * \param [in] readCallback A callback to invoke when new data is * available. */ void Start (int fd, Callback readCallback); @@ -80,8 +80,8 @@ protected: /** * Construct from a buffer of a given length. * - * \param buf The buffer. - * \param len The size of the buffer, in bytes. + * \param [in] buf The buffer. + * \param [in] len The size of the buffer, in bytes. */ Data (uint8_t *buf, ssize_t len) : m_buf (buf), m_len (len) {} /** The read data buffer. */ diff --git a/src/core/model/unix-system-condition.cc b/src/core/model/unix-system-condition.cc index 42eb2f717..99786b715 100644 --- a/src/core/model/unix-system-condition.cc +++ b/src/core/model/unix-system-condition.cc @@ -52,7 +52,7 @@ public: /** * Set the condition. * - * \param condition The new condition value. + * \param [in] condition The new condition value. */ void SetCondition (bool condition); /** @@ -73,7 +73,7 @@ public: * Unset the condition, then wait for a limited amount of wall-clock * time for another thread to set it with SetCondition. * - * \param ns Maximum time to wait, in ns. + * \param [in] ns Maximum time to wait, in ns. * \returns \c true if the condition timed out; \c false if the other * thread set it. */ diff --git a/src/core/model/vector.h b/src/core/model/vector.h index 6f013b293..715e56c65 100644 --- a/src/core/model/vector.h +++ b/src/core/model/vector.h @@ -39,9 +39,9 @@ class Vector3D { public: /** - * \param _x x coordinate of vector - * \param _y y coordinate of vector - * \param _z z coordinate of vector + * \param [in] _x X coordinate of vector + * \param [in] _y Y coordinate of vector + * \param [in] _z Z coordinate of vector * * Create vector (_x, _y, _z) */ @@ -76,8 +76,8 @@ class Vector2D { public: /** - * \param _x x coordinate of vector - * \param _y y coordinate of vector + * \param [in] _x X coordinate of vector + * \param [in] _y Y coordinate of vector * * Create vector (_x, _y) */ @@ -101,15 +101,15 @@ public: }; /** - * \param a one point - * \param b another point - * \returns the cartesian distance between a and b. + * \param [in] a One point + * \param [in] b Another point + * \returns The cartesian distance between a and b. */ double CalculateDistance (const Vector3D &a, const Vector3D &b); /** - * \param a one point - * \param b another point - * \returns the cartesian distance between a and b. + * \param [in] a One point + * \param [in] b Another point + * \returns The cartesian distance between a and b. */ double CalculateDistance (const Vector2D &a, const Vector2D &b); diff --git a/src/core/model/wall-clock-synchronizer.h b/src/core/model/wall-clock-synchronizer.h index cee3111e8..b6ecddd6b 100644 --- a/src/core/model/wall-clock-synchronizer.h +++ b/src/core/model/wall-clock-synchronizer.h @@ -94,7 +94,7 @@ protected: * receives a packet), sets the condition and signals the scheduler * it needs to re-evaluate. * - * @param ns The target normalized real time we should wait for. + * @param [in] ns The target normalized real time we should wait for. * @returns @c true if we reached the target time, * @c false if we retured because the condition was set. */ @@ -118,7 +118,7 @@ protected: * Signal(). In either case, we are done waiting. If the timeout happened, * we return @c true; if a Signal happened we return @c false. * - * @param ns The target normalized real time we should wait for. + * @param [in] ns The target normalized real time we should wait for. * @returns @c true if we reached the target time, * @c false if we retured because the condition was set. */ @@ -139,8 +139,8 @@ protected: * @brief Compute a correction to the nominal delay to account for * realtime drift since the last DoSynchronize. * - * @param nsNow The current simulation time (in nanosecond units). - * @param nsDelay The simulation time we need to wait for (normalized to + * @param [in] nsNow The current simulation time (in nanosecond units). + * @param [in] nsDelay The simulation time we need to wait for (normalized to * nanosecond units). * @returns The corrected delay. */ @@ -162,14 +162,14 @@ protected: /** * @brief Convert an absolute time in ns to a @c timeval * - * @param ns Absolute time in ns. - * @param tv Converted @c timeval. + * @param [in] ns Absolute time in ns. + * @param [out] tv Converted @c timeval. */ void NsToTimeval (int64_t ns, struct timeval *tv); /** * @brief Convert a @c timeval to absolute time, in ns. * - * @param tv The input @c timeval. + * @param [in] tv The input @c timeval. * @returns The absolute time, in ns. */ uint64_t TimevalToNs (struct timeval *tv); @@ -177,9 +177,9 @@ protected: /** * @brief Add two @c timeval. * - * @param tv1 The first @c timeval. - * @param tv2 The second @c timeval. - * @param result The sum of @c tv1 and @c tv2. + * @param [in] tv1 The first @c timeval. + * @param [in] tv2 The second @c timeval. + * @param [out] result The sum of @c tv1 and @c tv2. */ void TimevalAdd ( struct timeval *tv1, diff --git a/src/core/model/watchdog.h b/src/core/model/watchdog.h index 9f7f28cca..07bbbe83c 100644 --- a/src/core/model/watchdog.h +++ b/src/core/model/watchdog.h @@ -64,7 +64,7 @@ public: /** * Delay the timer. * - * \param delay The watchdog delay + * \param [in] delay The watchdog delay * * After a call to this method, the watchdog will not be triggered * until the delay specified has been expired. This operation is @@ -75,7 +75,7 @@ public: /** * Set the function to execute when the timer expires. * - * \param fn The function + * \param [in] fn The function * * Store this function in this Timer for later use by Timer::Schedule. */ @@ -87,8 +87,8 @@ public: * * \tparam MEM_PTR \deduced Class method function type. * \tparam OBJ_PTR \deduced Class type containing the function. - * \param memPtr The member function pointer - * \param objPtr The pointer to object + * \param [in] memPtr The member function pointer + * \param [in] objPtr The pointer to object * * Store this function and object in this Timer for later use by Timer::Schedule. */ @@ -102,15 +102,15 @@ public: /**@{*/ /** * \tparam T1 \deduced Type of the first argument. - * \param a1 The first argument + * \param [in] a1 The first argument */ template void SetArguments (T1 a1); /** * \tparam T1 \deduced Type of the first argument. * \tparam T2 \deduced Type of the second argument. - * \param a1 the first argument - * \param a2 the second argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument */ template void SetArguments (T1 a1, T2 a2); @@ -118,9 +118,9 @@ public: * \tparam T1 \deduced Type of the first argument. * \tparam T2 \deduced Type of the second argument. * \tparam T3 \deduced Type of the third argument. - * \param a1 the first argument - * \param a2 the second argument - * \param a3 the third argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument + * \param [in] a3 the third argument */ template void SetArguments (T1 a1, T2 a2, T3 a3); @@ -129,10 +129,10 @@ public: * \tparam T2 \deduced Type of the second argument. * \tparam T3 \deduced Type of the third argument. * \tparam T4 \deduced Type of the fourth argument. - * \param a1 the first argument - * \param a2 the second argument - * \param a3 the third argument - * \param a4 the fourth argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument + * \param [in] a3 the third argument + * \param [in] a4 the fourth argument */ template void SetArguments (T1 a1, T2 a2, T3 a3, T4 a4); @@ -142,11 +142,11 @@ public: * \tparam T3 \deduced Type of the third argument. * \tparam T4 \deduced Type of the fourth argument. * \tparam T5 \deduced Type of the fifth argument. - * \param a1 the first argument - * \param a2 the second argument - * \param a3 the third argument - * \param a4 the fourth argument - * \param a5 the fifth argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument + * \param [in] a3 the third argument + * \param [in] a4 the fourth argument + * \param [in] a5 the fifth argument */ template void SetArguments (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); @@ -157,12 +157,12 @@ public: * \tparam T4 \deduced Type of the fourth argument. * \tparam T5 \deduced Type of the fifth argument. * \tparam T6 \deduced Type of the sixth argument. - * \param a1 the first argument - * \param a2 the second argument - * \param a3 the third argument - * \param a4 the fourth argument - * \param a5 the fifth argument - * \param a6 the sixth argument + * \param [in] a1 the first argument + * \param [in] a2 the second argument + * \param [in] a3 the third argument + * \param [in] a4 the fourth argument + * \param [in] a5 the fifth argument + * \param [in] a6 the sixth argument */ template void SetArguments (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6);