[doxy] core/model

This commit is contained in:
Peter D. Barnes, Jr.
2017-09-18 00:51:28 -07:00
parent 29b3cd66f7
commit bc2ab59d4c
74 changed files with 562 additions and 391 deletions

View File

@@ -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
*/
/**

View File

@@ -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 <typename T, typename BASE>
Ptr<AttributeChecker>
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 \<name>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<const AttributeChecker> checker); \
private: \
type m_value; \
};
}
/**
* \ingroup attributehelper
*
* Declare the attribute value class \p \<Name>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 \<type>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 \<type>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 \<type>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 \<name>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 \<type>Value class methods
* (including the \p \<type>Value::SerializeToString
* and \p \<type>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 \<type>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 \<type>Value class methods
* (including the \p \<type>Value::SerializeToString
* and \p \<type>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 \<type>Value,
* - The attribute value class \p typeValue,
*
* - The attribute accessor functions \c MakeTypeAccessor,
* - The attribute accessor functions \c MaketypeAccessor,
*
* - The AttributeChecker class \p \<type>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 \<type>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 */

View File

@@ -24,7 +24,7 @@
/**
* \file
* \ingroup attribute_Boolean
* Boolean attribute value implementaations.
* ns3::BooleanValue attribute value implementaation.
*/
namespace ns3 {

View File

@@ -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".

View File

@@ -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

View File

@@ -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.
*/
/**

View File

@@ -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

View File

@@ -29,7 +29,7 @@
/**
* \file
* \ingroup scheduler
* Implementation of ns3::CalendarScheduler class.
* ns3::CalendarScheduler class implementation.
*/
namespace ns3 {

View File

@@ -28,7 +28,7 @@
/**
* \file
* \ingroup scheduler
* Declaration of ns3::CalendarScheduler class.
* ns3::CalendarScheduler class declaration.
*/
namespace ns3 {

View File

@@ -38,7 +38,7 @@
/**
* \file
* \ingroup commandline
* CommandLine class implementation.
* ns3::CommandLine implementation.
*/
namespace ns3 {

View File

@@ -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.

View File

@@ -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<std::string> 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<ConfigImpl>
{
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<Object> 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> object, std::string path) {
virtual void DoOne (Ptr<Object> 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);

View File

@@ -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 {

View File

@@ -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);
}

View File

@@ -34,7 +34,7 @@
/**
* \file
* \ingroup simulator
* Declaration of class ns3::DefaultSimulatorImpl.
* ns3::DefaultSimulatorImpl declaration.
*/
namespace ns3 {

View File

@@ -24,7 +24,7 @@
/**
* \file
* \ingroup core
* Definition of the NS_DEPRECATED macro.
* NS_DEPRECATED macro definition.
*/
/**

View File

@@ -25,7 +25,7 @@
/**
* \file
* \ingroup attribute_Double
* Double attribute value implementations.
* ns3::DoubleValue attribute value implementation.
*/
namespace ns3 {

View File

@@ -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 {

View File

@@ -23,7 +23,7 @@
/**
* \file
* \ingroup callback
* Definition of class ns3::empty, used by callbacks.
* ns3::empty declaration, used by callbacks.
*/
namespace ns3 {

View File

@@ -25,7 +25,7 @@
/**
* \file
* \ingroup attribute_Enum
* Enum attribute value implementations.
* ns3::EnumValue attribute value implementation.
*/
namespace ns3 {

View File

@@ -27,7 +27,7 @@
/**
* \file
* \ingroup attribute_Enum
* Enum attribute value declarations.
* ns3::EnumValue attribute value declarations.
*/
namespace ns3 {

View File

@@ -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<std::ostream*> *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)

View File

@@ -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.
*/
/**

View File

@@ -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.

View File

@@ -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);

View File

@@ -28,7 +28,7 @@
/**
* \file
* \ingroup scheduler
* Declaration of ns3::HeapScheduler class.
* ns3::HeapScheduler declaration.
*/
namespace ns3 {

View File

@@ -25,7 +25,7 @@
/**
* \file
* \ingroup attribute_Integer
* Integer attribute value implementations.
* ns3::MakeIntegerChecker implementation.
*/
namespace ns3 {

View File

@@ -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 {

View File

@@ -28,7 +28,7 @@
/**
* \file
* \ingroup scheduler
* Implementation of ns3::ListScheduler class.
* ns3::ListScheduler implementation.
*/
namespace ns3 {

View File

@@ -29,7 +29,7 @@
/**
* \file
* \ingroup scheduler
* Declaration of ns3::ListScheduler class.
* ns3::ListScheduler declaration.
*/
namespace ns3 {

View File

@@ -24,7 +24,7 @@
/**
* \file
* \ingroup logging
* Definition of logging macros.
* NS_LOG and related logging macro definitions.
*/
#ifdef NS3_LOG_ENABLE

View File

@@ -38,7 +38,7 @@
/**
* \file
* \ingroup logging
* Debug message logging implementation.
* ns3::LogComponent and related implementations.
*/

View File

@@ -28,7 +28,7 @@
/**
* \file
* \ingroup scheduler
* Implementation of ns3::MapScheduler class.
* ns3::MapScheduler implementation.
*/
namespace ns3 {

View File

@@ -29,7 +29,7 @@
/**
* \file
* \ingroup scheduler
* Declaration of ns3::MapScheduler class.
* ns3::MapScheduler declaration.
*/
namespace ns3 {

View File

@@ -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 <cmath>

View File

@@ -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,Ptr<Object>object)
* Internal implementation for Names::Add(std::string,Ptr<Object>)
*
* \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> object);
/**
* \copydoc Names::Add(std::string,std::string,Ptr<Object>)
* Internal implementation for Names::Add(std::string,std::string,Ptr<Object>)
*
* \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> object);
/**
* \copydoc Names::Add(Ptr<Object>,std::string,Ptr<Object>)
* Internal implementation for Names::Add(Ptr<Object>,std::string,Ptr<Object>)
*
* \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<Object> context, std::string name, Ptr<Object> 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<Object>,std::string,std::string)
* Internal implementation for
* Names::Rename(Ptr<Object>,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<Object> 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> 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> 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<Object> 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<Object> Find (std::string path, std::string name);
/** \copydoc Names::Find(Ptr<Object>,std::string) */
/**
* Internal implementation for ns3::Names::Find(Ptr<Object>,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<Object> Find (Ptr<Object> context, std::string name);
private:

View File

@@ -24,7 +24,7 @@
/**
* \file
* \ingroup access
* ns3::NonCopyable class declaration and implementation.
* ns3::NonCopyable declaration.
*/
/**

View File

@@ -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);

View File

@@ -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;

View File

@@ -23,7 +23,7 @@
/**
* \file
* \ingroup attribute_ObjectPtrContainer
* ObjectPtrContainer attribute value implementation.
* ns3::ObjectPtrContainerValue attribute value implementations.
*/
namespace ns3 {

View File

@@ -28,7 +28,7 @@
/**
* \file
* \ingroup attribute_ObjectPtrContainer
* ObjectPtrContainer attribute value declarations and template implementations.
* ns3::ObjectPtrContainerValue attribute value declarations and template implementations.
*/

View File

@@ -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 {

View File

@@ -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)

View File

@@ -25,7 +25,7 @@
/**
* \file
* \ingroup attribute_Pointer
* Pointer attribute value implementations.
* ns3::PointerValue attribute value implementations.
*/
namespace ns3 {

View File

@@ -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 {

View File

@@ -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<Ptr<T> >
};
// Duplicate of struct EventMemberImplObjTraits<T> as defined in make-event.h
// We repeat it here to declare a specialization on Ptr<T>
// without making this header dependent on make-event.h
template <typename T>
struct EventMemberImplObjTraits;

View File

@@ -40,7 +40,7 @@
/**
* \file
* \ingroup randomvariable
* Implementation of ns3::RandomVariableStream and derivatives.
* ns3::RandomVariableStream and related implementations
*/
namespace ns3 {

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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, 2<sup>32</sup> - 209.
/** First component modulus, 2<sup>32</sup> - 209. */
const double m1 = 4294967087.0;
/// \ingroup rngimpl
/// Second component modulus, 2<sup>32</sup> - 22853.
/** Second component modulus, 2<sup>32</sup> - 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 <i>n</i> - 2 value.
/** First component multiplier of <i>n</i> - 2 value. */
const double a12 = 1403580.0;
/// \ingroup rngimpl
/// First component multiplier of <i>n</i> - 3 value.
/** First component multiplier of <i>n</i> - 3 value. */
const double a13n = 810728.0;
/// \ingroup rngimpl
/// Second component multiplier of <i>n</i> - 1 value.
/** Second component multiplier of <i>n</i> - 1 value. */
const double a21 = 527612.0;
/// \ingroup rngimpl
/// Second component multiplier of <i>n</i> - 3 value.
/** Second component multiplier of <i>n</i> - 3 value. */
const double a23n = 1370589.0;
/// \ingroup rngimpl
/// Decomposition factor for computing a*s in less than 53 bits, 2<sup>17</sup>
/** Decomposition factor for computing a*s in less than 53 bits, 2<sup>17</sup> */
const double two17 = 131072.0;
/// \ingroup rngimpl
/// IEEE-754 floating point precision, 2<sup>53</sup>
/** IEEE-754 floating point precision, 2<sup>53</sup> */
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 <tt>(a*s +c) MOD m</tt>
//
/**
* 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 <tt>(a*s +c) MOD m</tt>
*/
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

View File

@@ -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
*/
/**

View File

@@ -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 <typename T, typename PARENT = empty, typename DELETER = DefaultDeleter
class SimpleRefCount : public PARENT
{
public:
/**
* Constructor
*/
/** Default constructor. */
SimpleRefCount ()
: m_count (1)
{}
/**
* Copy constructor
* \param o The object to be copied
* \param [in] o The object to copy into this one.
*/
SimpleRefCount (const SimpleRefCount &o)
: m_count (1)
{}
/**
* Assignment
* \param o The object to be copied
* \return A reference to the new object
* Assignment operator
* \param [in] o The object to copy
* \returns The copy of \p o
*/
SimpleRefCount &operator = (const SimpleRefCount &o)
{
@@ -131,10 +129,6 @@ public:
return m_count;
}
/**
* Noop
*/
static void Cleanup (void) {}
private:
/**
* The reference count.

View File

@@ -23,7 +23,7 @@
/**
* \file
* \ingroup simulator
* Implementation of class ns3::SimulatorImpl.
* ns3::SimulatorImpl implementation.
*/
namespace ns3 {

View File

@@ -31,7 +31,7 @@
/**
* \file
* \ingroup simulator
* Declaration of class ns3::SimulatorImpl.
* ns3::SimulatorImpl declaration.
*/
namespace ns3 {

View File

@@ -450,7 +450,7 @@ public:
static EventId Schedule (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 the same context) to run at a future time.
/**
* @name Schedule events (in a different context) to run now or at a future time.
@@ -714,7 +714,7 @@ public:
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
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 <typename MEM, typename OBJ>
EventId Simulator::Schedule (Time const &delay, MEM mem_ptr, OBJ obj)
{

View File

@@ -22,7 +22,7 @@
/**
* \file
* \ingroup attribute_String
* String attribute value implementations.
* ns3::StringValue attribute value implementation.
*/
namespace ns3 {

View File

@@ -26,7 +26,7 @@
/**
* \file
* \ingroup attribute_String
* String attribute value declarations.
* ns3::StringValue attribute value declarations.
*/
namespace ns3 {

View File

@@ -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);

View File

@@ -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<std::string> ReadFiles (std::string path)
}
closedir (dp);
#elif defined (HAVE_FIND_FIRST_FILE)
/// \todo untested
/** \todo untested */
HANDLE hFind;
WIN32_FIND_DATA fileData;

View File

@@ -17,8 +17,8 @@
*
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
*/
#ifndef SYSTEM_PATH
#define SYSTEM_PATH
#ifndef SYSTEM_PATH_H
#define SYSTEM_PATH_H
#include <string>
#include <list>
@@ -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 */

View File

@@ -26,7 +26,7 @@
/**
* \file
* \ingroup system
* System-independent wall clock class ns3::SystemWallClockMs declaration.
* ns3::SystemWallClockMs declaration.
*/
namespace ns3 {

View File

@@ -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<TestRunnerImpl>
{

View File

@@ -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
{

View File

@@ -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 {

View File

@@ -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

View File

@@ -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,

View File

@@ -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<T> FunctionPointerTraits;
};
} // namespace ns3
#endif /* TYPE_TRAITS_H */

View File

@@ -25,7 +25,7 @@
/**
* \file
* \ingroup attribute_Uinteger
* Uinteger attribute value implementations.
* ns3::UintegerValue attribute value implementations.
*/
namespace ns3 {

View File

@@ -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 {

View File

@@ -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. */

View File

@@ -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 {

View File

@@ -24,7 +24,7 @@
/**
* \file
* \ingroup core
* Definition of the NS_UNUSED NS_UNUSED_GLOBAL macros.
* NS_UNUSED and NS_UNUSED_GLOBAL macro definitions.
*/
/**

View File

@@ -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<const ns3::AttributeAccessor> ns3::MakeVectorAccessor (T1 a1)
* \copydoc ns3::MakeAccessorHelper(T1)
* \see AttributeAccessor
*/
/**
* \ingroup attribute_Vector3D
* \relates Vector3D
* \fn ns3::Ptr<const ns3::AttributeAccessor> 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<const AttributeChecker> MakeVectorChecker (void);
} // namespace ns3
#endif /* NS3_VECTOR_H */

View File

@@ -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 {