From bc2ab59d4c09aebb5d355e5f291ad0d0617a0515 Mon Sep 17 00:00:00 2001 From: "Peter D. Barnes, Jr." Date: Mon, 18 Sep 2017 00:51:28 -0700 Subject: [PATCH] [doxy] core/model --- src/core/model/assert.h | 2 +- src/core/model/attribute-helper.h | 90 ++++---- src/core/model/boolean.cc | 2 +- src/core/model/boolean.h | 5 +- src/core/model/breakpoint.h | 4 +- src/core/model/build-profile.h | 4 +- src/core/model/cairo-wideint-private.h | 3 +- src/core/model/calendar-scheduler.cc | 2 +- src/core/model/calendar-scheduler.h | 2 +- src/core/model/command-line.cc | 2 +- src/core/model/command-line.h | 7 +- src/core/model/config.cc | 46 ++-- src/core/model/default-deleter.h | 3 +- src/core/model/default-simulator-impl.cc | 4 +- src/core/model/default-simulator-impl.h | 2 +- src/core/model/deprecated.h | 2 +- src/core/model/double.cc | 2 +- src/core/model/double.h | 2 +- src/core/model/empty.h | 2 +- src/core/model/enum.cc | 2 +- src/core/model/enum.h | 2 +- src/core/model/fatal-impl.cc | 12 +- src/core/model/fatal-impl.h | 3 +- src/core/model/global-value.h | 10 +- src/core/model/hash-fnv.cc | 4 +- src/core/model/heap-scheduler.h | 2 +- src/core/model/integer.cc | 2 +- src/core/model/integer.h | 2 +- src/core/model/list-scheduler.cc | 2 +- src/core/model/list-scheduler.h | 2 +- src/core/model/log-macros-enabled.h | 2 +- src/core/model/log.cc | 2 +- src/core/model/map-scheduler.cc | 2 +- src/core/model/map-scheduler.h | 2 +- src/core/model/math.h | 2 +- src/core/model/names.cc | 106 +++++++-- src/core/model/non-copyable.h | 2 +- src/core/model/object-base.h | 4 +- src/core/model/object-map.h | 4 +- src/core/model/object-ptr-container.cc | 2 +- src/core/model/object-ptr-container.h | 2 +- src/core/model/object-vector.h | 2 +- src/core/model/object.cc | 11 +- src/core/model/pointer.cc | 2 +- src/core/model/pointer.h | 2 +- src/core/model/ptr.h | 4 +- src/core/model/random-variable-stream.cc | 2 +- src/core/model/random-variable-stream.h | 21 +- src/core/model/realtime-simulator-impl.cc | 2 - src/core/model/rng-stream.cc | 190 ++++++++-------- src/core/model/rng-stream.h | 4 +- src/core/model/simple-ref-count.h | 20 +- src/core/model/simulator-impl.cc | 2 +- src/core/model/simulator-impl.h | 2 +- src/core/model/simulator.h | 12 +- src/core/model/string.cc | 2 +- src/core/model/string.h | 2 +- src/core/model/system-condition.h | 3 +- src/core/model/system-path.cc | 9 +- src/core/model/system-path.h | 8 +- src/core/model/system-wall-clock-ms.h | 2 +- src/core/model/test.cc | 3 +- src/core/model/test.h | 25 ++- src/core/model/time.cc | 4 +- src/core/model/type-id.cc | 10 + src/core/model/type-id.h | 6 +- src/core/model/type-traits.h | 5 +- src/core/model/uinteger.cc | 2 +- src/core/model/uinteger.h | 2 +- src/core/model/unix-system-condition.cc | 4 +- src/core/model/unix-system-wall-clock-ms.cc | 3 +- src/core/model/unused.h | 2 +- src/core/model/vector.h | 223 +++++++++++-------- src/core/model/win32-system-wall-clock-ms.cc | 3 +- 74 files changed, 562 insertions(+), 391 deletions(-) diff --git a/src/core/model/assert.h b/src/core/model/assert.h index e618b7b55..d9f1b10a3 100644 --- a/src/core/model/assert.h +++ b/src/core/model/assert.h @@ -24,7 +24,7 @@ /** * \file * \ingroup assert - * Definition of assertion macros NS_ASSERT() and NS_ASSERT_MSG(). + * NS_ASSERT() and NS_ASSERT_MSG() macro definitions */ /** diff --git a/src/core/model/attribute-helper.h b/src/core/model/attribute-helper.h index f7c6f22ae..8489d3542 100644 --- a/src/core/model/attribute-helper.h +++ b/src/core/model/attribute-helper.h @@ -28,7 +28,7 @@ /** * \file * \ingroup attributehelper - * Declaration of Attribute helper macros. + * Attribute helper (\c ATTRIBUTE_ )macros definition. */ namespace ns3 { @@ -97,7 +97,10 @@ template Ptr MakeSimpleAttributeChecker (std::string name, std::string underlying) { - /* String-based AttributeChecker implementation. */ + /** + * String-based AttributeChecker implementation. + * \extends AttributeChecker + */ struct SimpleAttributeChecker : public BASE { virtual bool Check (const AttributeValue &value) const { @@ -164,18 +167,19 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) /** * \ingroup attributehelper * - * Declare the attribute value class \p \Value + * Declare the attribute value class \p nameValue * for underlying class \p type. * - * \param [in] type The underlying type name + * \param [in] type The underlying type name token * \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 declares the class \c typeValue associated with class \c type. * This macro is typically invoked in the class header file. * * This can be used directly for things like plain old data, * such as \c std::string, to create the attribute value class - * StringValue. + * StringValue, as in + * `ATTRIBUTE_VALUE_DEFINE_WITH_NAME(std::string, String);` */ #define ATTRIBUTE_VALUE_DEFINE_WITH_NAME(type,name) \ class name ## Value : public AttributeValue \ @@ -198,22 +202,22 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) Ptr checker); \ private: \ type m_value; \ - }; + } /** * \ingroup attributehelper * - * Declare the attribute value class \p \Value - * for the class \p Name + * Declare the attribute value class \p nameValue + * for the class \p name * - * \param [in] 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 declares the class \c nameValue associated to class \c name. * This macro is typically invoked in the class header file. */ -#define ATTRIBUTE_VALUE_DEFINE(Name) \ - ATTRIBUTE_VALUE_DEFINE_WITH_NAME (Name,Name) +#define ATTRIBUTE_VALUE_DEFINE(name) \ + ATTRIBUTE_VALUE_DEFINE_WITH_NAME (name,name) /** @@ -225,26 +229,26 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * \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. + * from instances of \c typeAttribute. * Typically invoked in the class header file. * * \internal - * This appears to be unused. + * This appears to be unused in the current code base. */ #define ATTRIBUTE_CONVERTER_DEFINE(type) /** * \ingroup attributehelper * - * Declare the AttributeChecker class \p \Checker - * and the \c MakeTypeChecker function for class \p type. + * Declare the AttributeChecker class \p typeChecker + * and the \c MaketypeChecker function for class \p type. * * \param [in] type The name of the class * - * This macro declares the \p \Checker class and the associated - * \c MakeTypeChecker function. + * This macro declares the \p typeChecker class and the associated + * \c MaketypeChecker function. * - * (Note that the \p \Checker class needs no implementation + * (Note that the \p typeChecker class needs no implementation * since it just inherits all its implementation from AttributeChecker.) * * Typically invoked in the class header file. @@ -258,17 +262,17 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * \ingroup attributehelper * * Define the class methods belonging to - * the attribute value class \p \Value + * the attribute value class \p nameValue * of the underlying class \p type. * * \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 - * and \p \Value::DeserializeFromString methods). + * This macro implements the \p typeValue class methods + * (including the \p typeValue::SerializeToString + * and \p typeValue::DeserializeFromString methods). * - * Typically invoked in the source file. + * Typically invoked in the source file */ #define ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME(type,name) \ name ## Value::name ## Value () \ @@ -296,7 +300,9 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) std::istringstream iss; \ iss.str (value); \ iss >> m_value; \ - NS_ABORT_MSG_UNLESS (iss.eof (), "Attribute value " << "\"" << value << "\"" << " is not properly formatted"); \ + NS_ABORT_MSG_UNLESS (iss.eof (), \ + "Attribute value " << "\"" << value << "\"" \ + << " is not properly formatted"); \ return !iss.bad () && !iss.fail (); \ } @@ -304,13 +310,13 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * \ingroup attributehelper * * Define the class methods belonging to - * attribute value class \p \Value for class \p type. + * attribute value class \p typeValue for class \p type. * * \param [in] type The name of the class. * - * This macro implements the \p \Value class methods - * (including the \p \Value::SerializeToString - * and \p \Value::DeserializeFromString methods). + * This macro implements the \p typeValue class methods + * (including the \p typeValue::SerializeToString + * and \p typeValue::DeserializeFromString methods). * * Typically invoked in the source file. */ @@ -321,11 +327,11 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) /** * \ingroup attributehelper * - * Define the \c MakeTypeChecker function for class \p type. + * Define the \c MaketypeChecker function for class \p type. * * \param [in] type The name of the class * - * This macro implements the \c MakeTypeChecker function. + * This macro implements the \c MaketypeChecker function. * * Typically invoked in the source file.. */ @@ -338,12 +344,12 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) /** * \ingroup attributehelper * - * Define the \c MakeTypeChecker function for class \p type. + * Define the \c MaketypeChecker function for class \p 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 + * This macro implements the \c MaketypeChecker function * for class \p type. * * Typically invoked in the source file.. @@ -363,12 +369,12 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * * This macro declares: * - * - The attribute value class \p \Value, + * - The attribute value class \p typeValue, * - * - The attribute accessor functions \c MakeTypeAccessor, + * - The attribute accessor functions \c MaketypeAccessor, * - * - The AttributeChecker class \p \Checker - * and the \c MakeTypeChecker function, + * - The AttributeChecker class \p typeChecker + * and the \c MaketypeChecker function, * * for class \p type. * @@ -378,7 +384,7 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) #define ATTRIBUTE_HELPER_HEADER(type) \ ATTRIBUTE_VALUE_DEFINE (type); \ ATTRIBUTE_ACCESSOR_DEFINE (type); \ - ATTRIBUTE_CHECKER_DEFINE (type); + ATTRIBUTE_CHECKER_DEFINE (type) /** * \ingroup attributehelper @@ -389,9 +395,9 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * * This macro implements * - * - The \p \Value class methods, + * - The \p typeValue class methods, * - * - The \c MakeTypeChecker function, + * - The \c MaketypeChecker function, * * for class \p type. * @@ -399,7 +405,7 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) */ #define ATTRIBUTE_HELPER_CPP(type) \ ATTRIBUTE_CHECKER_IMPLEMENT (type); \ - ATTRIBUTE_VALUE_IMPLEMENT (type); + ATTRIBUTE_VALUE_IMPLEMENT (type) #endif /* ATTRIBUTE_HELPER_H */ diff --git a/src/core/model/boolean.cc b/src/core/model/boolean.cc index 09bf82a94..7d3aefa6c 100644 --- a/src/core/model/boolean.cc +++ b/src/core/model/boolean.cc @@ -24,7 +24,7 @@ /** * \file * \ingroup attribute_Boolean - * Boolean attribute value implementaations. + * ns3::BooleanValue attribute value implementaation. */ namespace ns3 { diff --git a/src/core/model/boolean.h b/src/core/model/boolean.h index ab65c99ec..7439c03d1 100644 --- a/src/core/model/boolean.h +++ b/src/core/model/boolean.h @@ -26,11 +26,13 @@ /** * \file * \ingroup attribute_Boolean - * Boolean attribute value declarations. + * ns3::BooleanValue attribute value declarations. */ namespace ns3 { +// Doxygen for this class is auto-generated by +// utils/print-introspected-doxygen.h class BooleanValue : public AttributeValue { public: @@ -67,6 +69,7 @@ bool BooleanValue::GetAccessor (T &v) const } /** + * \ingroup attribute_Boolean * Output streamer. * * The value is printed as "true" or "false". diff --git a/src/core/model/breakpoint.h b/src/core/model/breakpoint.h index f48f1fde4..8f8169ec5 100644 --- a/src/core/model/breakpoint.h +++ b/src/core/model/breakpoint.h @@ -24,7 +24,7 @@ /** * \file * \ingroup breakpoint - * Definition of NS_BREAKPOINT() macro and ns3::BreakpointFallback + * NS_BREAKPOINT() macro definition and ns3::BreakpointFallback * function declaration. */ @@ -54,7 +54,7 @@ namespace ns3 { * Inserts a breakpoint instruction (or equivalent system call) into * the code for selected machines. When an NS_ASSERT cannot verify * its condition, this macro is used. Falls back to calling - * AssertBreakpoint() for architectures where breakpoint assembly + * ns3::BreakpointFallback() for architectures where breakpoint assembly * instructions are not supported. */ #if (defined (__i386__) || defined (__amd64__) || defined (__x86_64__)) && defined (__GNUC__) && __GNUC__ >= 2 diff --git a/src/core/model/build-profile.h b/src/core/model/build-profile.h index 8874fb243..4c647fa47 100644 --- a/src/core/model/build-profile.h +++ b/src/core/model/build-profile.h @@ -24,8 +24,8 @@ /** * \file * \ingroup debugging - * Definition of build profile macros NS_BUILD_DEBUG, NS_BUILD_RELEASE, - * and NS_BUILD_OPTIMIZED. + * NS_BUILD_DEBUG, NS_BUILD_RELEASE, and NS_BUILD_OPTIMIZED + * macro definitions. */ /** diff --git a/src/core/model/cairo-wideint-private.h b/src/core/model/cairo-wideint-private.h index 4df2a01ca..d3df4e98d 100644 --- a/src/core/model/cairo-wideint-private.h +++ b/src/core/model/cairo-wideint-private.h @@ -36,7 +36,8 @@ /** * \file * \ingroup highprec - * Declaration of the cairo_x functions which implement high precision arithmetic. + * \c cairo_x function declarations, which provide the fallback + * high precision arithmetic implementation. */ // Adapt to ns-3 environment diff --git a/src/core/model/calendar-scheduler.cc b/src/core/model/calendar-scheduler.cc index 49ab4e08e..e897bb23d 100644 --- a/src/core/model/calendar-scheduler.cc +++ b/src/core/model/calendar-scheduler.cc @@ -29,7 +29,7 @@ /** * \file * \ingroup scheduler - * Implementation of ns3::CalendarScheduler class. + * ns3::CalendarScheduler class implementation. */ namespace ns3 { diff --git a/src/core/model/calendar-scheduler.h b/src/core/model/calendar-scheduler.h index 4aed946fe..8ecc5355c 100644 --- a/src/core/model/calendar-scheduler.h +++ b/src/core/model/calendar-scheduler.h @@ -28,7 +28,7 @@ /** * \file * \ingroup scheduler - * Declaration of ns3::CalendarScheduler class. + * ns3::CalendarScheduler class declaration. */ namespace ns3 { diff --git a/src/core/model/command-line.cc b/src/core/model/command-line.cc index d0d8d3f35..908ffd30c 100644 --- a/src/core/model/command-line.cc +++ b/src/core/model/command-line.cc @@ -38,7 +38,7 @@ /** * \file * \ingroup commandline - * CommandLine class implementation. + * ns3::CommandLine implementation. */ namespace ns3 { diff --git a/src/core/model/command-line.h b/src/core/model/command-line.h index 6b6860f1b..cd583de73 100644 --- a/src/core/model/command-line.h +++ b/src/core/model/command-line.h @@ -29,7 +29,7 @@ /** * \file * \ingroup commandline - * CommandLine class declaration. + * ns3::CommandLine declaration. */ namespace ns3 { @@ -395,7 +395,10 @@ private: */ static bool HandleAttribute (const std::string name, const std::string value); - /** Handler for \c \-\-PrintGlobals: print all global variables and values */ + /** + * Handler for \c \-\-PrintGlobals: print all global variables and values + * \param [in,out] os The output stream to print on. + */ void PrintGlobals (std::ostream &os) const; /** * Handler for \c \-\-PrintAttributes: print the attributes for a given type. diff --git a/src/core/model/config.cc b/src/core/model/config.cc index 76dd1ab8e..00237564a 100644 --- a/src/core/model/config.cc +++ b/src/core/model/config.cc @@ -31,7 +31,7 @@ /** * \file * \ingroup config - * Imlementation of the various ns3::Config functions and classes. + * ns3::Config implementations. */ namespace ns3 { @@ -146,10 +146,11 @@ MatchContainer::DisconnectWithoutContext (std::string name, const CallbackBase & } } -} // namespace Config - -/** Helper to test if an array entry matches a config path specification. */ +/** + * \ingroup config-impl + * Helper to test if an array entry matches a config path specification. + */ class ArrayMatcher { public: @@ -177,7 +178,8 @@ private: bool StringToUint32 (std::string str, uint32_t *value) const; /** The Config path element. */ std::string m_element; -}; + +}; // class ArrayMatcher ArrayMatcher::ArrayMatcher (std::string element) @@ -260,6 +262,7 @@ ArrayMatcher::StringToUint32 (std::string str, uint32_t *value) const } /** + * \ingroup config-impl * Abstract class to parse Config paths into object references. */ class Resolver @@ -325,7 +328,8 @@ private: std::vector m_workStack; /** The Config path. */ std::string m_path; -}; + +}; // class Resolver Resolver::Resolver (std::string path) : m_path (path) @@ -572,7 +576,10 @@ Resolver::DoArrayResolve (std::string path, const ObjectPtrContainerValue &conta } } -/** Config system implementation class. */ +/** + * \ingroup config-impl + * Config system implementation class. + */ class ConfigImpl : public Singleton { public: @@ -587,7 +594,7 @@ public: /** \copydoc Config::Disconnect() */ void Disconnect (std::string path, const CallbackBase &cb); /** \copydoc Config::LookupMatches() */ - Config::MatchContainer LookupMatches (std::string path); + MatchContainer LookupMatches (std::string path); /** \copydoc Config::RegisterRootNamespaceObject() */ void RegisterRootNamespaceObject (Ptr obj); @@ -614,7 +621,8 @@ private: /** The list of Config path roots. */ Roots m_roots; -}; + +}; // class ConfigImpl void ConfigImpl::ParsePath (std::string path, std::string *root, std::string *leaf) const @@ -635,7 +643,7 @@ ConfigImpl::Set (std::string path, const AttributeValue &value) std::string root, leaf; ParsePath (path, &root, &leaf); - Config::MatchContainer container = LookupMatches (root); + MatchContainer container = LookupMatches (root); container.Set (leaf, value); } void @@ -644,7 +652,7 @@ ConfigImpl::ConnectWithoutContext (std::string path, const CallbackBase &cb) NS_LOG_FUNCTION (this << path << &cb); std::string root, leaf; ParsePath (path, &root, &leaf); - Config::MatchContainer container = LookupMatches (root); + MatchContainer container = LookupMatches (root); container.ConnectWithoutContext (leaf, cb); } void @@ -653,7 +661,7 @@ ConfigImpl::DisconnectWithoutContext (std::string path, const CallbackBase &cb) NS_LOG_FUNCTION (this << path << &cb); std::string root, leaf; ParsePath (path, &root, &leaf); - Config::MatchContainer container = LookupMatches (root); + MatchContainer container = LookupMatches (root); container.DisconnectWithoutContext (leaf, cb); } void @@ -663,7 +671,7 @@ ConfigImpl::Connect (std::string path, const CallbackBase &cb) std::string root, leaf; ParsePath (path, &root, &leaf); - Config::MatchContainer container = LookupMatches (root); + MatchContainer container = LookupMatches (root); container.Connect (leaf, cb); } void @@ -673,11 +681,11 @@ ConfigImpl::Disconnect (std::string path, const CallbackBase &cb) std::string root, leaf; ParsePath (path, &root, &leaf); - Config::MatchContainer container = LookupMatches (root); + MatchContainer container = LookupMatches (root); container.Disconnect (leaf, cb); } -Config::MatchContainer +MatchContainer ConfigImpl::LookupMatches (std::string path) { NS_LOG_FUNCTION (this << path); @@ -687,7 +695,8 @@ ConfigImpl::LookupMatches (std::string path) LookupMatchesResolver (std::string path) : Resolver (path) {} - virtual void DoOne (Ptr object, std::string path) { + virtual void DoOne (Ptr object, std::string path) + { m_objects.push_back (object); m_contexts.push_back (path); } @@ -706,7 +715,7 @@ ConfigImpl::LookupMatches (std::string path) // resolver.Resolve (0); - return Config::MatchContainer (resolver.m_objects, resolver.m_contexts, path); + return MatchContainer (resolver.m_objects, resolver.m_contexts, path); } void @@ -744,7 +753,6 @@ ConfigImpl::GetRootNamespaceObject (uint32_t i) const return m_roots[i]; } -namespace Config { void Reset (void) { @@ -843,7 +851,7 @@ Disconnect (std::string path, const CallbackBase &cb) NS_LOG_FUNCTION (path << &cb); ConfigImpl::Get ()->Disconnect (path, cb); } -Config::MatchContainer LookupMatches (std::string path) +MatchContainer LookupMatches (std::string path) { NS_LOG_FUNCTION (path); return ConfigImpl::Get ()->LookupMatches (path); diff --git a/src/core/model/default-deleter.h b/src/core/model/default-deleter.h index fcb66b4cd..41e537db2 100644 --- a/src/core/model/default-deleter.h +++ b/src/core/model/default-deleter.h @@ -23,7 +23,8 @@ /** * \file * \ingroup ptr - * Default deletion implementation for reference-counted smart pointers. + * ns3::DefaultDeleter declaration and template implementation, + * for reference-counted smart pointers. */ namespace ns3 { diff --git a/src/core/model/default-simulator-impl.cc b/src/core/model/default-simulator-impl.cc index ba0609a65..52f3d9df5 100644 --- a/src/core/model/default-simulator-impl.cc +++ b/src/core/model/default-simulator-impl.cc @@ -34,7 +34,7 @@ /** * \file * \ingroup simulator - * Implementation of class ns3::DefaultSimulatorImpl. + * ns3::DefaultSimulatorImpl implementation. */ namespace ns3 { @@ -403,8 +403,6 @@ DefaultSimulatorImpl::IsExpired (const EventId &id) const Time DefaultSimulatorImpl::GetMaximumSimulationTime (void) const { - /// \todo I am fairly certain other compilers use other non-standard - /// post-fixes to indicate 64 bit constants. return TimeStep (0x7fffffffffffffffLL); } diff --git a/src/core/model/default-simulator-impl.h b/src/core/model/default-simulator-impl.h index aa4ce1021..aaac4e231 100644 --- a/src/core/model/default-simulator-impl.h +++ b/src/core/model/default-simulator-impl.h @@ -34,7 +34,7 @@ /** * \file * \ingroup simulator - * Declaration of class ns3::DefaultSimulatorImpl. + * ns3::DefaultSimulatorImpl declaration. */ namespace ns3 { diff --git a/src/core/model/deprecated.h b/src/core/model/deprecated.h index 9a54807a9..ffd016d52 100644 --- a/src/core/model/deprecated.h +++ b/src/core/model/deprecated.h @@ -24,7 +24,7 @@ /** * \file * \ingroup core - * Definition of the NS_DEPRECATED macro. + * NS_DEPRECATED macro definition. */ /** diff --git a/src/core/model/double.cc b/src/core/model/double.cc index b79614a56..c300ece60 100644 --- a/src/core/model/double.cc +++ b/src/core/model/double.cc @@ -25,7 +25,7 @@ /** * \file * \ingroup attribute_Double - * Double attribute value implementations. + * ns3::DoubleValue attribute value implementation. */ namespace ns3 { diff --git a/src/core/model/double.h b/src/core/model/double.h index c708823ab..7287945ce 100644 --- a/src/core/model/double.h +++ b/src/core/model/double.h @@ -28,7 +28,7 @@ /** * \file * \ingroup attribute_Double - * Double attribute value declarations and template implementations. + * ns3::DoubleValue attribute value declarations and template implementations. */ namespace ns3 { diff --git a/src/core/model/empty.h b/src/core/model/empty.h index 992ead588..6631e6992 100644 --- a/src/core/model/empty.h +++ b/src/core/model/empty.h @@ -23,7 +23,7 @@ /** * \file * \ingroup callback - * Definition of class ns3::empty, used by callbacks. + * ns3::empty declaration, used by callbacks. */ namespace ns3 { diff --git a/src/core/model/enum.cc b/src/core/model/enum.cc index 38eba98b6..4ba11d5bb 100644 --- a/src/core/model/enum.cc +++ b/src/core/model/enum.cc @@ -25,7 +25,7 @@ /** * \file * \ingroup attribute_Enum - * Enum attribute value implementations. + * ns3::EnumValue attribute value implementation. */ namespace ns3 { diff --git a/src/core/model/enum.h b/src/core/model/enum.h index 6909b3d20..20798c0eb 100644 --- a/src/core/model/enum.h +++ b/src/core/model/enum.h @@ -27,7 +27,7 @@ /** * \file * \ingroup attribute_Enum - * Enum attribute value declarations. + * ns3::EnumValue attribute value declarations. */ namespace ns3 { diff --git a/src/core/model/fatal-impl.cc b/src/core/model/fatal-impl.cc index 69ea9e87c..de64cf6a2 100644 --- a/src/core/model/fatal-impl.cc +++ b/src/core/model/fatal-impl.cc @@ -31,7 +31,9 @@ /** * \file * \ingroup fatalimpl - * \brief Implementation of RegisterStream(), UnregisterStream(), and FlushStreams(); see Implementation note! + * \brief ns3::FatalImpl::RegisterStream(), ns3::FatalImpl::UnregisterStream(), + * and ns3::FatalImpl::FlushStreams() implementations; + * see Implementation note! * * \note Implementation. * @@ -56,7 +58,7 @@ namespace FatalImpl { /** * \ingroup fatalimpl - * Anonymous namespace for fatal streams memory implementation + * Unnamed namespace for fatal streams memory implementation * and signal handler. */ namespace { @@ -92,7 +94,7 @@ std::list *GetStreamList (void) return *pstreams; } -} // anonymous namespace +} // unnamed namespace void RegisterStream (std::ostream* stream) @@ -120,7 +122,7 @@ UnregisterStream (std::ostream* stream) /** * \ingroup fatalimpl - * Anonymous namespace for fatal streams signal hander. + * Unnamed namespace for fatal streams signal hander. * * This is private to the fatal implementation. */ @@ -141,7 +143,7 @@ void sigHandler (int sig) FlushStreams (); std::abort (); } -} // anonymous namespace +} // unnamed namespace void FlushStreams (void) diff --git a/src/core/model/fatal-impl.h b/src/core/model/fatal-impl.h index a4f378e9c..f7a29fbe7 100644 --- a/src/core/model/fatal-impl.h +++ b/src/core/model/fatal-impl.h @@ -26,7 +26,8 @@ /** * \file * \ingroup fatalimpl - * \brief Declaration of RegisterStream(), UnregisterStream(), and FlushStreams(). + * ns3::FatalImpl::RegisterStream(), ns3::FatalImpl::UnregisterStream(), + * and ns3::FatalImpl::FlushStreams() declarations. */ /** diff --git a/src/core/model/global-value.h b/src/core/model/global-value.h index 913513e55..5651e9255 100644 --- a/src/core/model/global-value.h +++ b/src/core/model/global-value.h @@ -31,10 +31,13 @@ * ns3::GlobalValue declaration. */ -class GlobalValueTestCase; - namespace ns3 { + /* Forward declaration */ + namespace tests { + class GlobalValueTestCase; + } + /** * \ingroup Core * @@ -181,7 +184,8 @@ public: private: - friend class ::GlobalValueTestCase; + // Test case needs direct access to GetVector() + friend class tests::GlobalValueTestCase; /** * Get the static vector of all GlobalValues. diff --git a/src/core/model/hash-fnv.cc b/src/core/model/hash-fnv.cc index 8e21f2695..2aca0dcaa 100644 --- a/src/core/model/hash-fnv.cc +++ b/src/core/model/hash-fnv.cc @@ -268,9 +268,7 @@ enum fnv_type { /* * external functions //PDB converted to forward declarations */ -/** - * \copydoc fnv_32a_buf() - */ +/** \copydoc fnv_32a_buf() */ /* extern */ Fnv32_t fnv_32_buf(void *buf, size_t len, Fnv32_t hval); /** \copydoc fnv_32a_str() */ /* extern */ Fnv32_t fnv_32_str(char *str, Fnv32_t hval); diff --git a/src/core/model/heap-scheduler.h b/src/core/model/heap-scheduler.h index 1968e16c1..d5ce6ef44 100644 --- a/src/core/model/heap-scheduler.h +++ b/src/core/model/heap-scheduler.h @@ -28,7 +28,7 @@ /** * \file * \ingroup scheduler - * Declaration of ns3::HeapScheduler class. + * ns3::HeapScheduler declaration. */ namespace ns3 { diff --git a/src/core/model/integer.cc b/src/core/model/integer.cc index f3b4b8c3f..680d9b483 100644 --- a/src/core/model/integer.cc +++ b/src/core/model/integer.cc @@ -25,7 +25,7 @@ /** * \file * \ingroup attribute_Integer - * Integer attribute value implementations. + * ns3::MakeIntegerChecker implementation. */ namespace ns3 { diff --git a/src/core/model/integer.h b/src/core/model/integer.h index 68eacc9e4..3622885a0 100644 --- a/src/core/model/integer.h +++ b/src/core/model/integer.h @@ -28,7 +28,7 @@ /** * \file * \ingroup attribute_Integer - * Integer attribute value declarations and template implementations. + * ns3::IntegerValue attribute value declarations and template implementations. */ namespace ns3 { diff --git a/src/core/model/list-scheduler.cc b/src/core/model/list-scheduler.cc index 53467febd..b7b6fe6ba 100644 --- a/src/core/model/list-scheduler.cc +++ b/src/core/model/list-scheduler.cc @@ -28,7 +28,7 @@ /** * \file * \ingroup scheduler - * Implementation of ns3::ListScheduler class. + * ns3::ListScheduler implementation. */ namespace ns3 { diff --git a/src/core/model/list-scheduler.h b/src/core/model/list-scheduler.h index 9683c04f2..dd9f80b4d 100644 --- a/src/core/model/list-scheduler.h +++ b/src/core/model/list-scheduler.h @@ -29,7 +29,7 @@ /** * \file * \ingroup scheduler - * Declaration of ns3::ListScheduler class. + * ns3::ListScheduler declaration. */ namespace ns3 { diff --git a/src/core/model/log-macros-enabled.h b/src/core/model/log-macros-enabled.h index b0a3337ee..a6fe0b50d 100644 --- a/src/core/model/log-macros-enabled.h +++ b/src/core/model/log-macros-enabled.h @@ -24,7 +24,7 @@ /** * \file * \ingroup logging - * Definition of logging macros. + * NS_LOG and related logging macro definitions. */ #ifdef NS3_LOG_ENABLE diff --git a/src/core/model/log.cc b/src/core/model/log.cc index 06a76f547..beb4f0b9b 100644 --- a/src/core/model/log.cc +++ b/src/core/model/log.cc @@ -38,7 +38,7 @@ /** * \file * \ingroup logging - * Debug message logging implementation. + * ns3::LogComponent and related implementations. */ diff --git a/src/core/model/map-scheduler.cc b/src/core/model/map-scheduler.cc index c2d32bf5e..159b561f4 100644 --- a/src/core/model/map-scheduler.cc +++ b/src/core/model/map-scheduler.cc @@ -28,7 +28,7 @@ /** * \file * \ingroup scheduler - * Implementation of ns3::MapScheduler class. + * ns3::MapScheduler implementation. */ namespace ns3 { diff --git a/src/core/model/map-scheduler.h b/src/core/model/map-scheduler.h index c71def78d..e3e7f377b 100644 --- a/src/core/model/map-scheduler.h +++ b/src/core/model/map-scheduler.h @@ -29,7 +29,7 @@ /** * \file * \ingroup scheduler - * Declaration of ns3::MapScheduler class. + * ns3::MapScheduler declaration. */ namespace ns3 { diff --git a/src/core/model/math.h b/src/core/model/math.h index da19190a6..40f67fc72 100644 --- a/src/core/model/math.h +++ b/src/core/model/math.h @@ -27,7 +27,7 @@ /** * \file * \ingroup core - * Custom version of log2() to deal with \bugid{1467}. + * log2() macro definition; to deal with \bugid{1467}. */ #include diff --git a/src/core/model/names.cc b/src/core/model/names.cc index a13a6590a..78eae267d 100644 --- a/src/core/model/names.cc +++ b/src/core/model/names.cc @@ -27,8 +27,7 @@ /** * \file * \ingroup config - * Implementation of class ns3::Names, and declaration of classes - * ns3::NamesNode and ns3::NamePriv. + * ns3::Names, ns3::NamesNode and ns3::NamePriv implementations. */ namespace ns3 { @@ -125,52 +124,129 @@ public: NamesPriv (); /** Destructor. */ ~NamesPriv (); - + + // Doxygen \copydoc bug: won't copy these docs, so we repeat them. + /** - * \copydoc Names::Add(std::string,Ptrobject) + * Internal implementation for Names::Add(std::string,Ptr) + * + * \param [in] name The name of the object you want to associate; + * which may be prepended with a path to that object. + * \param [in] object A smart pointer to the object itself. * \return \c true if the object was named successfully. */ bool Add (std::string name, Ptr object); /** - * \copydoc Names::Add(std::string,std::string,Ptr) + * Internal implementation for Names::Add(std::string,std::string,Ptr) + * + * \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. * \return \c true if the object was named successfully. */ bool Add (std::string path, std::string name, Ptr object); /** - * \copydoc Names::Add(Ptr,std::string,Ptr) + * Internal implementation for Names::Add(Ptr,std::string,Ptr) + * + * \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. * \return \c true if the object was named successfully. */ bool Add (Ptr context, std::string name, Ptr object); /** - * \copydoc Names::Rename(std::string,std::string) + * Internal implementation for Names::Rename(std::string,std::string) + * + * \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. * \return \c true if the object was renamed successfully. */ bool Rename (std::string oldpath, std::string newname); /** - * \copydoc Names::Rename(std::string,std::string,std::string) + * Internal implementation for + * Names::Rename(std::string,std::string,std::string) + * + * \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. * \return \c true if the object was renamed successfully. */ bool Rename (std::string path, std::string oldname, std::string newname); /** - * \copydoc Names::Rename(Ptr,std::string,std::string) + * Internal implementation for + * Names::Rename(Ptr,std::string,std::string) + * + * \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. * \return \c true if the object was renamed successfully. */ bool Rename (Ptr context, std::string oldname, std::string newname); - /** \copydoc Names::FindName() */ + /** + * Internal implementation for Names::FindName() + * + * \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. + */ std::string FindName (Ptr object); - /** \copydoc Names::FindPath() */ + /** + * Internal implementation of Names::FindPath() + * + * \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. + */ std::string FindPath (Ptr object); - /** \copydoc Names::Clear() */ + /** + * Internal implementation for Names::Clear() + */ void Clear (void); - /** \copydoc Names::Find(std::string) */ + /** + * Internal implementation for ns3::Names::Find(std::string) + * + * \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. + */ Ptr Find (std::string path); - /** \copydoc Names::Find(std::string,std::string) */ + /** + * Internal implementation for ns3::Names::Find(std::string,std::string) + * + * \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. + */ Ptr Find (std::string path, std::string name); - /** \copydoc Names::Find(Ptr,std::string) */ + /** + * Internal implementation for ns3::Names::Find(Ptr,std::string) + * + * \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. + */ Ptr Find (Ptr context, std::string name); private: diff --git a/src/core/model/non-copyable.h b/src/core/model/non-copyable.h index e4eb19aa6..12fe143cc 100644 --- a/src/core/model/non-copyable.h +++ b/src/core/model/non-copyable.h @@ -24,7 +24,7 @@ /** * \file * \ingroup access - * ns3::NonCopyable class declaration and implementation. + * ns3::NonCopyable declaration. */ /** diff --git a/src/core/model/object-base.h b/src/core/model/object-base.h index 8c43cd8bd..1bd8c74f8 100644 --- a/src/core/model/object-base.h +++ b/src/core/model/object-base.h @@ -28,7 +28,8 @@ /** * \file * \ingroup object - * ns3::ObjectBase class declaration and NS_OBJECT_ENSURE_REGISTERED() definition. + * ns3::ObjectBase declaration and + * NS_OBJECT_ENSURE_REGISTERED() madro definition. */ /** @@ -120,6 +121,7 @@ class ObjectBase public: /** * Get the type ID. + * \return The object TypeId. */ static TypeId GetTypeId (void); diff --git a/src/core/model/object-map.h b/src/core/model/object-map.h index 42f98e3ee..d5c1f6e00 100644 --- a/src/core/model/object-map.h +++ b/src/core/model/object-map.h @@ -28,14 +28,14 @@ /** * \file * \ingroup attribute_ObjectMap - * ObjectMap attribute value declarations and template implementations. + * ns3::ObjectMap attribute value declarations and template implementations. */ namespace ns3 { /** * \ingroup attribute_ObjectMap - * ObjectVectorMap is an alias for ObjectPtrContainerValue + * ObjectMapValue is an alias for ObjectPtrContainerValue */ typedef ObjectPtrContainerValue ObjectMapValue; diff --git a/src/core/model/object-ptr-container.cc b/src/core/model/object-ptr-container.cc index 5187cbc1c..4dc2d1f51 100644 --- a/src/core/model/object-ptr-container.cc +++ b/src/core/model/object-ptr-container.cc @@ -23,7 +23,7 @@ /** * \file * \ingroup attribute_ObjectPtrContainer - * ObjectPtrContainer attribute value implementation. + * ns3::ObjectPtrContainerValue attribute value implementations. */ namespace ns3 { diff --git a/src/core/model/object-ptr-container.h b/src/core/model/object-ptr-container.h index 0c4ed5536..6eb3dd373 100644 --- a/src/core/model/object-ptr-container.h +++ b/src/core/model/object-ptr-container.h @@ -28,7 +28,7 @@ /** * \file * \ingroup attribute_ObjectPtrContainer - * ObjectPtrContainer attribute value declarations and template implementations. + * ns3::ObjectPtrContainerValue attribute value declarations and template implementations. */ diff --git a/src/core/model/object-vector.h b/src/core/model/object-vector.h index 608437fba..e9f76c97d 100644 --- a/src/core/model/object-vector.h +++ b/src/core/model/object-vector.h @@ -28,7 +28,7 @@ /** * \file * \ingroup attribute_ObjectVector - * ObjectVector attribute value declarations and template implementations. + * ns3::ObjectVectorValue attribute value declarations and template implementations. */ namespace ns3 { diff --git a/src/core/model/object.cc b/src/core/model/object.cc index 72822d13e..024e512d4 100644 --- a/src/core/model/object.cc +++ b/src/core/model/object.cc @@ -374,15 +374,18 @@ bool Object::CheckLoose (void) const { NS_LOG_FUNCTION (this); - uint32_t refcount = 0; + bool nonZeroRefCount = false; uint32_t n = m_aggregates->n; for (uint32_t i = 0; i < n; i++) { Object *current = m_aggregates->buffer[i]; - /// \todo Shortcircuit this loop. - refcount += current->GetReferenceCount (); + if (current->GetReferenceCount ()) + { + nonZeroRefCount = true; + break; + } } - return (refcount > 0); + return nonZeroRefCount; } void Object::DoDelete (void) diff --git a/src/core/model/pointer.cc b/src/core/model/pointer.cc index 97fb59e09..37570ed45 100644 --- a/src/core/model/pointer.cc +++ b/src/core/model/pointer.cc @@ -25,7 +25,7 @@ /** * \file * \ingroup attribute_Pointer - * Pointer attribute value implementations. + * ns3::PointerValue attribute value implementations. */ namespace ns3 { diff --git a/src/core/model/pointer.h b/src/core/model/pointer.h index 207f2588a..53893e036 100644 --- a/src/core/model/pointer.h +++ b/src/core/model/pointer.h @@ -26,7 +26,7 @@ /** * \file * \ingroup attribute_Pointer - * Pointer attribute value declarations and template implementations. + * ns3::PointerValue attribute value declarations and template implementations. */ namespace ns3 { diff --git a/src/core/model/ptr.h b/src/core/model/ptr.h index c205facb5..48d1314c0 100644 --- a/src/core/model/ptr.h +++ b/src/core/model/ptr.h @@ -28,7 +28,7 @@ /** * \file * \ingroup ptr - * Smart pointer implementation. + * ns3::Ptr smart pointer declaration and implementation. */ namespace ns3 { @@ -476,6 +476,8 @@ struct CallbackTraits > }; // Duplicate of struct EventMemberImplObjTraits as defined in make-event.h +// We repeat it here to declare a specialization on Ptr +// without making this header dependent on make-event.h template struct EventMemberImplObjTraits; diff --git a/src/core/model/random-variable-stream.cc b/src/core/model/random-variable-stream.cc index 949f09ff2..514b05c98 100644 --- a/src/core/model/random-variable-stream.cc +++ b/src/core/model/random-variable-stream.cc @@ -40,7 +40,7 @@ /** * \file * \ingroup randomvariable - * Implementation of ns3::RandomVariableStream and derivatives. + * ns3::RandomVariableStream and related implementations */ namespace ns3 { diff --git a/src/core/model/random-variable-stream.h b/src/core/model/random-variable-stream.h index 446e932b8..fa0986225 100644 --- a/src/core/model/random-variable-stream.h +++ b/src/core/model/random-variable-stream.h @@ -34,7 +34,7 @@ /** * \file * \ingroup randomvariable - * Declaration of ns3::RandomVariableStream and derivatives. + * ns3::RandomVariableStream declaration, and related classes. */ namespace ns3 { @@ -87,8 +87,8 @@ class RngStream; * By default, the underlying generator is seeded all the time with * the same seed value and run number coming from the ns3::GlobalValue * \ref GlobalValueRngSeed "RngSeed" and \ref GlobalValueRngRun - * "RngRun". Also by default, the stream number value for this RNG - * stream is automatically allocated. + * "RngRun". Also by default, the stream number value for the + * underlying RngStream is automatically allocated. * * Instances can be configured to return "antithetic" values. * See the documentation for the specific distributions to see @@ -112,15 +112,15 @@ public: virtual ~RandomVariableStream(); /** - * \brief Specifies the stream number for this RNG stream. - * \param [in] stream The stream number for this RNG stream. + * \brief Specifies the stream number for the RngStream. + * \param [in] stream The stream number for the RngStream. * -1 means "allocate a stream number automatically". */ void SetStream (int64_t stream); /** - * \brief Returns the stream number for this RNG stream. - * \return The stream number for this RNG stream. + * \brief Returns the stream number for the RngStream. + * \return The stream number for the RngStream. * -1 means this stream was allocated automatically. */ int64_t GetStream(void) const; @@ -151,7 +151,8 @@ public: protected: /** - * \brief Get the pointer to the underlying RNG stream. + * \brief Get the pointer to the underlying RngStream. + * \return The underlying RngStream */ RngStream *Peek(void) const; @@ -177,13 +178,13 @@ private: */ RandomVariableStream &operator = (const RandomVariableStream &o); - /** Pointer to the underlying RNG stream. */ + /** Pointer to the underlying RngStream. */ RngStream *m_rng; /** Indicates if antithetic values should be generated by this RNG stream. */ bool m_isAntithetic; - /** The stream number for this RNG stream. */ + /** The stream number for the RngStream. */ int64_t m_stream; }; // class RandomVariableStream diff --git a/src/core/model/realtime-simulator-impl.cc b/src/core/model/realtime-simulator-impl.cc index 3d72f36fe..36805d42c 100644 --- a/src/core/model/realtime-simulator-impl.cc +++ b/src/core/model/realtime-simulator-impl.cc @@ -802,8 +802,6 @@ RealtimeSimulatorImpl::IsExpired (const EventId &id) const Time RealtimeSimulatorImpl::GetMaximumSimulationTime (void) const { - /// \todo I am fairly certain other compilers use other non-standard - /// post-fixes to indicate 64 bit constants. return TimeStep (0x7fffffffffffffffLL); } diff --git a/src/core/model/rng-stream.cc b/src/core/model/rng-stream.cc index 0b3fe8691..abff6de4a 100644 --- a/src/core/model/rng-stream.cc +++ b/src/core/model/rng-stream.cc @@ -26,9 +26,11 @@ #include "fatal-error.h" #include "log.h" -/// \file -/// \ingroup rngimpl -/// Class RngStream and MRG32k3a implementation. +/** + * \file + * \ingroup rngimpl + * ns3::RngStream and MRG32k3a implementations. + */ namespace ns3 { @@ -40,61 +42,52 @@ NS_LOG_COMPONENT_DEFINE ("RngStream"); } // namespace ns3 -/// \ingroup rngimpl -/// Unnamed namespace for MRG32k3a implementation details. -namespace +/** + * \ingroup rngimpl + * @{ + */ +/** Namespace for MRG32k3a implementation details. */ +namespace MRG32k3a { -/// \ingroup rngimpl -/// Type for 3x3 matrix of doubles. +/** Type for 3x3 matrix of doubles. */ typedef double Matrix[3][3]; -/// \ingroup rngimpl -/// First component modulus, 232 - 209. +/** First component modulus, 232 - 209. */ const double m1 = 4294967087.0; -/// \ingroup rngimpl -/// Second component modulus, 232 - 22853. +/** Second component modulus, 232 - 22853. */ const double m2 = 4294944443.0; -/// \ingroup rngimpl -/// Normalization to obtain randoms on [0,1). +/** Normalization to obtain randoms on [0,1). */ const double norm = 1.0 / (m1 + 1.0); -/// \ingroup rngimpl -/// First component multiplier of n - 2 value. +/** First component multiplier of n - 2 value. */ const double a12 = 1403580.0; -/// \ingroup rngimpl -/// First component multiplier of n - 3 value. +/** First component multiplier of n - 3 value. */ const double a13n = 810728.0; -/// \ingroup rngimpl -/// Second component multiplier of n - 1 value. +/** Second component multiplier of n - 1 value. */ const double a21 = 527612.0; -/// \ingroup rngimpl -/// Second component multiplier of n - 3 value. +/** Second component multiplier of n - 3 value. */ const double a23n = 1370589.0; -/// \ingroup rngimpl -/// Decomposition factor for computing a*s in less than 53 bits, 217 +/** Decomposition factor for computing a*s in less than 53 bits, 217 */ const double two17 = 131072.0; -/// \ingroup rngimpl -/// IEEE-754 floating point precision, 253 +/** IEEE-754 floating point precision, 253 */ const double two53 = 9007199254740992.0; -/// \ingroup rngimpl -/// First component transition matrix. +/** First component transition matrix. */ const Matrix A1p0 = { { 0.0, 1.0, 0.0 }, { 0.0, 0.0, 1.0 }, { -810728.0, 1403580.0, 0.0 } }; -/// \ingroup rngimpl -/// Second component transition matrix. +/** Second component transition matrix. */ const Matrix A2p0 = { { 0.0, 1.0, 0.0 }, { 0.0, 0.0, 1.0 }, @@ -103,18 +96,18 @@ const Matrix A2p0 = { //------------------------------------------------------------------------- -/// \ingroup rngimpl -/// Return (a*s + c) MOD m; a, s, c and m must be < 2^35 -/// -/// This computes the result exactly, without exceeding the 53 bit -/// precision of doubles. -/// -/// \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 -// +/** + * Return (a*s + c) MOD m; a, s, c and m must be < 2^35 + * + * This computes the result exactly, without exceeding the 53 bit + * precision of doubles. + * + * \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) { double v; @@ -146,15 +139,15 @@ double MultModM (double a, double s, double c, double m) //------------------------------------------------------------------------- -/// \ingroup rngimpl -/// Compute the vector v = A*s MOD m. Assume that -m < s[i] < m. -/// Works also when v = s. -/// -/// \param [in] A Matrix argument, 3x3. -/// \param [in] s Three component input vector. -/// \param [out] v Three component output vector. -/// \param [in] m Modulus. -// +/** + * Compute the vector v = A*s MOD m. Assume that -m < s[i] < m. + * Works also when v = s. + * + * \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) { @@ -175,15 +168,15 @@ void MatVecModM (const Matrix A, const double s[3], double v[3], //------------------------------------------------------------------------- -/// \ingroup rngimpl -/// 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 [in] A First matrix argument. -/// \param [in] B Second matrix argument. -/// \param [out] C Result matrix. -/// \param [in] m Modulus. -// +/** + * 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 [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) { @@ -214,14 +207,14 @@ 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 [in] src Matrix input argument \c A. -/// \param [out] dst Matrix output \c B. -/// \param [in] m Modulus. -/// \param [in] e The exponent. -// +/** + * Compute the matrix B = (A^(2^e) Mod m); works also if A = B. + * + * \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) { int i, j; @@ -243,18 +236,16 @@ 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 [in] A Matrix input argument. -/// \param [out] B Matrix output. -/// \param [in] m Modulus. -/// \param [in] n Exponent. -// +/** + * Compute the matrix B = (A^n Mod m); works even if A = B. + * + * \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) { - NS_LOG_FUNCTION (A << B << m << n); int i, j; double W[3][3]; @@ -283,21 +274,23 @@ void MatPowModM (const double A[3][3], double B[3][3], double m, int32_t n) n /= 2; } } -*/ -/// The transition matrices of the two MRG components -/// (in matrix form), raised to all powers of 2 from 1 to 191 -// +/** + * The transition matrices of the two MRG components + * (in matrix form), raised to all powers of 2 from 1 to 191 + */ struct Precalculated { Matrix a1[190]; //!< First component transition matrix powers. Matrix a2[190]; //!< Second component transition matrix powers. }; -/// Compute the transition matrices of the two MRG components -// raised to all powers of 2 from 1 to 191. -/// -/// \returns The precalculated powers of the transition matrices. -// + +/** + * Compute the transition matrices of the two MRG components + * raised to all powers of 2 from 1 to 191. + * + * \returns The precalculated powers of the transition matrices. + */ struct Precalculated PowerOfTwoConstants (void) { struct Precalculated precalculated; @@ -309,12 +302,13 @@ struct Precalculated PowerOfTwoConstants (void) } return precalculated; } -/// Get the transition matrices raised to a power of 2. -/// -/// \param [in] n The power of 2. -/// \param [out] a1p The first transition matrix power. -/// \param [out] a2p The second transition matrix power. -// +/** + * Get the transition matrices raised to a power of 2. + * + * \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) { static struct Precalculated constants = PowerOfTwoConstants (); @@ -328,13 +322,13 @@ void PowerOfTwoMatrix (int n, Matrix a1p, Matrix a2p) } } -} // end of anonymous namespace +} // namespace MRG32k3a namespace ns3 { -//------------------------------------------------------------------------- -// Generate the next random number. -// + +using namespace MRG32k3a; + double RngStream::RandU01 () { int32_t k; @@ -406,3 +400,5 @@ RngStream::AdvanceNthBy (uint64_t nth, int by, double state[6]) } } // namespace ns3 + +/**@}*/ // \ingroup rngimpl diff --git a/src/core/model/rng-stream.h b/src/core/model/rng-stream.h index 0a7dc21a2..1218ceb52 100644 --- a/src/core/model/rng-stream.h +++ b/src/core/model/rng-stream.h @@ -25,14 +25,14 @@ /** * \file * \ingroup rngimpl - * Declaration of class RngStream. + * ns3::RngStream declaration. */ namespace ns3 { /** * \ingroup randomvariable - * \defgroup rngimpl RNG Implementation. + * \defgroup rngimpl RNG Implementation */ /** diff --git a/src/core/model/simple-ref-count.h b/src/core/model/simple-ref-count.h index 7715ae3a4..cff1d72e7 100644 --- a/src/core/model/simple-ref-count.h +++ b/src/core/model/simple-ref-count.h @@ -31,7 +31,7 @@ /** * \file * \ingroup ptr - * Reference counting for smart pointers. + * ns3::SimpleRefCount declaration and template implementation. */ namespace ns3 { @@ -44,7 +44,7 @@ namespace ns3 { * to a class. This template does not require this class to * have a virtual destructor or a specific (or any) parent class. * - * Note: if you are moving to this template from the RefCountBase class, + * \note If you are moving to this template from the RefCountBase class, * you need to be careful to mark appropriately your destructor virtual * if needed. i.e., if your class has subclasses, _do_ mark your destructor * virtual. @@ -72,23 +72,21 @@ template static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2,U3,U4,U5,U6), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6); - /** @} */ + /** @} */ // Schedule events (in a different context) to run now or at a future time. /** * @name Schedule events (in the same context) to run now. @@ -955,7 +955,7 @@ public: typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> static EventId ScheduleNow (void (*f)(U1,U2,U3,U4,U5,U6), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6); - /** @} */ + /** @} */ // Schedule events (in the same context) to run now. /** * @name Schedule events to run at the end of the simulation, when Simulator:Destroy() is called. @@ -1196,7 +1196,7 @@ public: typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> static EventId ScheduleDestroy (void (*f)(U1,U2,U3,U4,U5,U6), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6); - /** @} */ + /** @} */ // Schedule events to run when Simulator:Destroy() is called. /** * Remove an event from the event list. @@ -1367,6 +1367,10 @@ Time Now (void); namespace ns3 { +// Doxygen has trouble with static template functions in a class: +// it treats the in-class declaration as different from the +// out of class definition, so makes two entries in the member list. Ugh + template EventId Simulator::Schedule (Time const &delay, MEM mem_ptr, OBJ obj) { diff --git a/src/core/model/string.cc b/src/core/model/string.cc index e3e13748a..6af367d6e 100644 --- a/src/core/model/string.cc +++ b/src/core/model/string.cc @@ -22,7 +22,7 @@ /** * \file * \ingroup attribute_String - * String attribute value implementations. + * ns3::StringValue attribute value implementation. */ namespace ns3 { diff --git a/src/core/model/string.h b/src/core/model/string.h index eff162aac..f867d2a45 100644 --- a/src/core/model/string.h +++ b/src/core/model/string.h @@ -26,7 +26,7 @@ /** * \file * \ingroup attribute_String - * String attribute value declarations. + * ns3::StringValue attribute value declarations. */ namespace ns3 { diff --git a/src/core/model/system-condition.h b/src/core/model/system-condition.h index 543dd6d1d..91cd9de82 100644 --- a/src/core/model/system-condition.h +++ b/src/core/model/system-condition.h @@ -24,7 +24,7 @@ /** * @file * @ingroup thread - * System-independent thread conditional wait. + * ns3::SystemCondition declaration. */ namespace ns3 { @@ -81,6 +81,7 @@ public: /** * Get the value of the underlying condition. + * \returns The state of the condition */ bool GetCondition (void); diff --git a/src/core/model/system-path.cc b/src/core/model/system-path.cc index 5c398cb8f..06ac87674 100644 --- a/src/core/model/system-path.cc +++ b/src/core/model/system-path.cc @@ -66,7 +66,7 @@ /** * \file * \ingroup systempath - * System-independent file and directory functions implementation. + * ns3::SystemPath implementation. */ namespace ns3 { @@ -134,8 +134,9 @@ std::string FindSelfDirectory (void) } #elif defined (__win32__) { - /// \todo untested. it should work if code is compiled with - /// LPTSTR = char * + /** \todo untested. it should work if code is compiled with + * LPTSTR = char * + */ DWORD size = 1024; LPTSTR lpFilename = (LPTSTR) malloc (sizeof(TCHAR) * size); DWORD status = GetModuleFilename (0, lpFilename, size); @@ -256,7 +257,7 @@ std::list ReadFiles (std::string path) } closedir (dp); #elif defined (HAVE_FIND_FIRST_FILE) - /// \todo untested + /** \todo untested */ HANDLE hFind; WIN32_FIND_DATA fileData; diff --git a/src/core/model/system-path.h b/src/core/model/system-path.h index 7420cf3bd..162aa8a76 100644 --- a/src/core/model/system-path.h +++ b/src/core/model/system-path.h @@ -17,8 +17,8 @@ * * Authors: Mathieu Lacage */ -#ifndef SYSTEM_PATH -#define SYSTEM_PATH +#ifndef SYSTEM_PATH_H +#define SYSTEM_PATH_H #include #include @@ -26,7 +26,7 @@ /** * \file * \ingroup systempath - * System-independent file and directory function declarations. + * ns3::SystemPath declarations. */ namespace ns3 { @@ -128,4 +128,4 @@ namespace SystemPath { } // namespace ns3 -#endif /* SYSTEM_PATH */ +#endif /* SYSTEM_PATH_H */ diff --git a/src/core/model/system-wall-clock-ms.h b/src/core/model/system-wall-clock-ms.h index e3eed0974..9019e76bb 100644 --- a/src/core/model/system-wall-clock-ms.h +++ b/src/core/model/system-wall-clock-ms.h @@ -26,7 +26,7 @@ /** * \file * \ingroup system - * System-independent wall clock class ns3::SystemWallClockMs declaration. + * ns3::SystemWallClockMs declaration. */ namespace ns3 { diff --git a/src/core/model/test.cc b/src/core/model/test.cc index fcf2605bd..1d2d93b5d 100644 --- a/src/core/model/test.cc +++ b/src/core/model/test.cc @@ -33,7 +33,7 @@ /** * \file * \ingroup testing - * Implementation of the testing classes and functions + * \brief ns3::TestCase, ns3::TestSuite, ns3::TestRunner implementations, */ namespace ns3 { @@ -133,6 +133,7 @@ struct TestCase::Result /** * \ingroup testingimpl * Container for all tests. + * \todo Move TestRunnerImpl to separate file. */ class TestRunnerImpl : public Singleton { diff --git a/src/core/model/test.h b/src/core/model/test.h index 450056641..36b9b8383 100644 --- a/src/core/model/test.h +++ b/src/core/model/test.h @@ -34,8 +34,8 @@ /** * \file * \ingroup testing - * \brief Definition of the testing macros and declaration of - * the testing classes. + * \brief ns3::TestCase, ns3::TestSuite, ns3::TestRunner declarations, + * and \c NS_TEST_ASSERT macro definitions. */ /** @@ -53,6 +53,13 @@ * \brief Internal implementation of the Testing system. */ +namespace ns3 { + + /** Namespace for test files, TestCases and TestSuites. */ + namespace tests { + + } // namespace tests + // // Note on below macros: // @@ -1104,7 +1111,6 @@ #define NS_TEST_EXPECT_MSG_GT_OR_EQ(actual, limit, msg) \ NS_TEST_EXPECT_MSG_GT_OR_EQ_INTERNAL (actual, limit, msg, __FILE__, __LINE__) -namespace ns3 { /** * \ingroup testing @@ -1143,6 +1149,8 @@ class TestRunnerImpl; * 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. + * + * \see sample-test-suite.cc */ class TestCase : private NonCopyable { @@ -1176,9 +1184,10 @@ protected: * \brief Add an individual child TestCase to this test suite. * * \param [in] testCase Pointer to the TestCase object to be added. - * \param [in] duration Amount of time this test takes to execute. + * \param [in] duration Amount of time this test takes to execute + * (defaults to QUICK). */ - void AddTestCase (TestCase *testCase, enum TestDuration duration); + void AddTestCase (TestCase *testCase, TestDuration duration = QUICK); /** * \brief Set the data directory where reference trace files can be @@ -1305,9 +1314,7 @@ private: * \param [in] runner The test runner implementation. */ void Run (TestRunnerImpl *runner); - /** - * \copydoc IsStatusFailure() - */ + /** \copydoc IsStatusFailure() */ bool IsFailed (void) const; /** @@ -1329,6 +1336,8 @@ private: * \ingroup testing * * \brief A suite of tests to run. + * + * \see sample-test-suite.cc */ class TestSuite : public TestCase { diff --git a/src/core/model/time.cc b/src/core/model/time.cc index 026283767..a10447296 100644 --- a/src/core/model/time.cc +++ b/src/core/model/time.cc @@ -30,8 +30,8 @@ /** * \file * \ingroup time - * Implementation of classes ns3::Time and ns3::TimeWithUnit, - * and the TimeValue implementation classes. + * ns3::Time, ns3::TimeWithUnit + * and ns3::TimeValue attribute value implementations. */ namespace ns3 { diff --git a/src/core/model/type-id.cc b/src/core/model/type-id.cc index b8310a298..66eb55383 100644 --- a/src/core/model/type-id.cc +++ b/src/core/model/type-id.cc @@ -365,7 +365,17 @@ IidManager::Hasher (const std::string name) return hasher.clear ().GetHash32 (name); } +/** + * \ingroup object + * \internal + * IidManager shorthand for use in NS_LOG + */ #define IID "IidManager" +/** + * \ingroup object + * \internal + * IidManager shorthand for use in NS_LOG + */ #define IIDL IID << ": " uint16_t diff --git a/src/core/model/type-id.h b/src/core/model/type-id.h index a9cfc868f..f467ac39e 100644 --- a/src/core/model/type-id.h +++ b/src/core/model/type-id.h @@ -368,11 +368,11 @@ public: * \param [in] supportMsg Upgrade hint if this attribute is no longer * supported. If the attribute is \c DEPRECATED the attribute * behavior still exists, but user code should be updated - * following guidance in the hint.. + * following guidance in the hint. * If the attribute is \c OBSOLETE, the hint should indicate * which class the attribute functional has been moved to, * or that the functionality is no longer supported. - * See test file \file type-id-test-suite.cc for examples. + * See test file type-id-test-suite.cc for examples. * \returns This TypeId instance */ TypeId AddAttribute (std::string name, @@ -459,7 +459,7 @@ public: * If the attribute is \c OBSOLETE, the hint should indicate * which class the attribute functional has been moved to, * or that the functionality is no longer supported. - * See test file \file type-id-test-suite.cc for examples. + * See test file type-id-test-suite.cc for examples. * \returns This TypeId instance. */ TypeId AddTraceSource (std::string name, diff --git a/src/core/model/type-traits.h b/src/core/model/type-traits.h index 5de7f7886..b8ca148fe 100644 --- a/src/core/model/type-traits.h +++ b/src/core/model/type-traits.h @@ -25,9 +25,11 @@ /** * \file * \ingroup object - * TypeTraits introspection template. + * ns3::TypeTraits introspection declaration and template implementation. */ +namespace ns3 { + /** * \ingroup object * Inspect a type to deduce its features. @@ -597,5 +599,6 @@ public: typedef FunctionPtrTraits FunctionPointerTraits; }; +} // namespace ns3 #endif /* TYPE_TRAITS_H */ diff --git a/src/core/model/uinteger.cc b/src/core/model/uinteger.cc index dac670ef6..9f1f07fb5 100644 --- a/src/core/model/uinteger.cc +++ b/src/core/model/uinteger.cc @@ -25,7 +25,7 @@ /** * \file * \ingroup attribute_Uinteger - * Uinteger attribute value implementations. + * ns3::UintegerValue attribute value implementations. */ namespace ns3 { diff --git a/src/core/model/uinteger.h b/src/core/model/uinteger.h index 63ce48ff3..f46b5d39b 100644 --- a/src/core/model/uinteger.h +++ b/src/core/model/uinteger.h @@ -28,7 +28,7 @@ /** * \file * \ingroup attribute_Uinteger - * Unsigned integer attribute value declarations and template implementations. + * ns3::UintegerValue attribute value declarations and template implementations. */ namespace ns3 { diff --git a/src/core/model/unix-system-condition.cc b/src/core/model/unix-system-condition.cc index 99786b715..9eb3ec3a0 100644 --- a/src/core/model/unix-system-condition.cc +++ b/src/core/model/unix-system-condition.cc @@ -28,7 +28,7 @@ /** * \file * \ingroup thread - * Thread conditional wait implementation for Unix-like systems. + * ns3::SystemCondition and ns3::SystemConditionPrivate implementations. */ namespace ns3 { @@ -41,7 +41,7 @@ NS_LOG_COMPONENT_DEFINE ("SystemCondition"); */ class SystemConditionPrivate { public: - /// Conversion from ns to s. + /** Conversion from ns to s. */ static const uint64_t NS_PER_SEC = (uint64_t)1000000000; /** Constructor. */ diff --git a/src/core/model/unix-system-wall-clock-ms.cc b/src/core/model/unix-system-wall-clock-ms.cc index fa170e274..5fcd934a6 100644 --- a/src/core/model/unix-system-wall-clock-ms.cc +++ b/src/core/model/unix-system-wall-clock-ms.cc @@ -27,8 +27,7 @@ /** * \file * \ingroup system - * Wall clock class ns3::SystemWallClockMs implementation - * for Unix-like systems. + * ns3::SystemWallClockMs and ns3::SystemWallClockMsPrivate implementation. */ namespace ns3 { diff --git a/src/core/model/unused.h b/src/core/model/unused.h index 04813cb25..3da7e9dc9 100644 --- a/src/core/model/unused.h +++ b/src/core/model/unused.h @@ -24,7 +24,7 @@ /** * \file * \ingroup core - * Definition of the NS_UNUSED NS_UNUSED_GLOBAL macros. + * NS_UNUSED and NS_UNUSED_GLOBAL macro definitions. */ /** diff --git a/src/core/model/vector.h b/src/core/model/vector.h index aed1c93f9..147ce47fb 100644 --- a/src/core/model/vector.h +++ b/src/core/model/vector.h @@ -25,13 +25,20 @@ /** * \file - * \ingroup attribute_Vector - * ns3::Vector, ns3::Vector2D and ns3::Vector3D attribute value declarations. + * \ingroup geometry + * ns3::Vector, ns3::Vector2D and ns3::Vector3D declarations. */ namespace ns3 { /** + * \ingroup core + * \defgroup geometry Geometry primitives + * \brief Primitives for geometry, such as vectors and angles. + */ + +/** + * \ingroup geometry * \brief a 3d vector * \see attribute_Vector3D */ @@ -46,33 +53,75 @@ public: * Create vector (_x, _y, _z) */ Vector3D (double _x, double _y, double _z); - /** - * Create vector (0.0, 0.0, 0.0) - */ + /** Create vector (0.0, 0.0, 0.0) */ Vector3D (); - /** - * x coordinate of vector - */ - double x; - /** - * y coordinate of vector - */ - double y; - /** - * z coordinate of vector - */ - double z; + + double x; //!< x coordinate of vector + double y; //!< y coordinate of vector + double z; //!< z coordinate of vector + /** + * Compute the length (magnitude) of the vector. + * \returns the vector length. + */ double GetLength () const; + + /** + * \brief Calculate the Cartesian distance between two points. + * \param [in] a One point + * \param [in] b Another point + * \returns The distance between \p a and \p b. + */ friend double CalculateDistance (const Vector3D &a, const Vector3D &b); + + /** + * Output streamer. + * Vectors are written as "x:y:z". + * + * \param [in,out] os The stream. + * \param [in] vector The vector to stream + * \return The stream. + */ friend std::ostream &operator << (std::ostream &os, const Vector3D &vector); + + /** + * Input streamer. + * + * Vectors are expected to be in the form "x:y:z". + * + * \param [in,out] is The stream. + * \param [in] vector The vector. + * \returns The stream. + */ friend std::istream &operator >> (std::istream &is, Vector3D &vector); + + /** + * Less than comparison operator + * \param [in] a lhs vector + * \param [in] b rhs vector + * \returns \c true if \p a is less than \p b + */ friend bool operator < (const Vector3D &a, const Vector3D &b); + + /** + * Addition operator. + * \param [in] a lhs vector. + * \param [in] b rhs vector. + * \returns The vector sum of \p a and \p b. + */ friend Vector3D operator + (const Vector3D &a, const Vector3D &b); + + /** + * Subtraction operator. + * \param [in] a lhs vector. + * \param [in] b rhs vector. + * \returns The vector differend of \p a less \p b. + */ friend Vector3D operator - (const Vector3D &a, const Vector3D &b); }; /** + * \ingroup geometry * \brief a 2d vector * \see attribute_Vector2D */ @@ -86,99 +135,95 @@ public: * Create vector (_x, _y) */ Vector2D (double _x, double _y); - /** - * Create vector vector (0.0, 0.0) - */ + /** Constructor: (0.0, 0.0) */ Vector2D (); - /** - * x coordinate of vector - */ - double x; - /** - * y coordinate of vector - */ - double y; + double x; //!< x coordinate of vector + double y; //!< y coordinate of vector + // works: /** \copydoc ns3::Vector3D::GetLength() */ + /** \copydoc Vector3D::GetLength() */ double GetLength () const; + + /** + * \brief Calculate the Cartesian distance between two points. + * \param [in] a One point + * \param [in] b Another point + * \returns The distance between \p a and \p b. + */ friend double CalculateDistance (const Vector2D &a, const Vector2D &b); + + /** + * Output streamer. + * Vectors are written as "x:y". + * + * \param [in,out] os The stream. + * \param [in] vector The vector to stream + * \return The stream. + */ friend std::ostream &operator << (std::ostream &os, const Vector2D &vector); + + /** + * Input streamer. + * + * Vectors are expected to be in the form "x:y". + * + * \param [in,out] is The stream. + * \param [in] vector The vector. + * \returns The stream. + */ friend std::istream &operator >> (std::istream &is, Vector2D &vector); + + /** + * Less than comparison operator + * \param [in] a lhs vector + * \param [in] b rhs vector + * \returns \c true if \p a is less than \p b + */ friend bool operator < (const Vector2D &a, const Vector2D &b); + + /** + * Addition operator. + * \param [in] a lhs vector. + * \param [in] b rhs vector. + * \returns The vector sum of \p a and \p b. + */ friend Vector2D operator + (const Vector2D &a, const Vector2D &b); + + /** + * Subtraction operator. + * \param [in] a lhs vector. + * \param [in] b rhs vector. + * \returns The vector differend of \p a less \p b. + */ friend Vector2D operator - (const Vector2D &a, const Vector2D &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 [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); - +std::ostream &operator << (std::ostream &os, const Vector3D &vector); +std::ostream &operator << (std::ostream &os, const Vector2D &vector); +std::istream &operator >> (std::istream &is, Vector3D &vector); +std::istream &operator >> (std::istream &is, Vector2D &vector); +bool operator < (const Vector3D &a, const Vector3D &b); +bool operator < (const Vector2D &a, const Vector2D &b); + ATTRIBUTE_HELPER_HEADER (Vector3D); ATTRIBUTE_HELPER_HEADER (Vector2D); -/** - * Output streamer. - * - * Vectors are written as "x:y:z". - * - * \param [in,out] os The stream. - * \param [in] vector The vector to stream - * \return The stream. - */ -std::ostream &operator << (std::ostream &os, const Vector3D &vector); -/** - * Output streamer. - * - * Vectors are written as "x:y". - * - * \param [in,out] os The stream. - * \param [in] vector The vector to stream - * \return The stream. - */ -std::ostream &operator << (std::ostream &os, const Vector2D &vector); - -/** - * Input streamer. - * - * Vectors are expected to be in the form "x:y:z". - * - * \param [in,out] is The stream. - * \param [in] vector The vector. - * \returns The stream. - */ -std::istream &operator >> (std::istream &is, Vector3D &vector); -/** - * Input streamer. - * - * Vectors are expected to be in the form "x:y". - * - * \param [in,out] is The stream. - * \param [in] vector The vector. - * \returns The stream. - */ -std::istream &operator >> (std::istream &is, Vector2D &vector); - - /** * \relates Vector3D * Vector alias typedef for compatibility with mobility models */ typedef Vector3D Vector; + /** - * \ingroup attribute_Vector3D + * \relates Vector3D * Vector alias typedef for compatibility with mobility models */ typedef Vector3DValue VectorValue; + /** - * \ingroup attribute_Vector3D + * \relates Vector3D * Vector alias typedef for compatibility with mobility models */ typedef Vector3DChecker VectorChecker; @@ -186,13 +231,14 @@ typedef Vector3DChecker VectorChecker; // Document these by hand so they go in group attribute_Vector3D /** - * \ingroup attribute_Vector3D + * \relates Vector3D * \fn ns3::Ptr ns3::MakeVectorAccessor (T1 a1) * \copydoc ns3::MakeAccessorHelper(T1) * \see AttributeAccessor */ + /** - * \ingroup attribute_Vector3D + * \relates Vector3D * \fn ns3::Ptr ns3::MakeVectorAccessor (T1 a1, T2 a2) * \copydoc ns3::MakeAccessorHelper(T1,T2) * \see AttributeAccessor @@ -201,12 +247,13 @@ typedef Vector3DChecker VectorChecker; ATTRIBUTE_ACCESSOR_DEFINE (Vector); /** - * \ingroup attribute_Vector3D + * \relates Vector3D * \returns The AttributeChecker. * \see AttributeChecker */ Ptr MakeVectorChecker (void); - + + } // namespace ns3 #endif /* NS3_VECTOR_H */ diff --git a/src/core/model/win32-system-wall-clock-ms.cc b/src/core/model/win32-system-wall-clock-ms.cc index aa2355a78..bdde6d76e 100644 --- a/src/core/model/win32-system-wall-clock-ms.cc +++ b/src/core/model/win32-system-wall-clock-ms.cc @@ -25,8 +25,7 @@ /** * \file * \ingroup system - * Wall clock class ns3::SystemWallClockMs implementation - * for Windows-32 systems. + * ns3::SystemWallClockMs and ns3::SystemWallClockMsPrivate implementation. */ namespace ns3 {