[doxygen] Fix some minor doxygen errors.
This commit is contained in:
@@ -37,10 +37,10 @@ namespace ns3 {
|
||||
* the user class can then effectively be made an attribute.
|
||||
*
|
||||
* There are two kinds of helper macros:
|
||||
* 1) The simple macros.
|
||||
* - ATTRIBUTE_HELPER_HEADER(type)
|
||||
* - ATTRIBUTE_HELPER_CPP
|
||||
* 2) The more complex macros.
|
||||
* -# The simple macros.
|
||||
* - ATTRIBUTE_HELPER_HEADER(type)
|
||||
* - ATTRIBUTE_HELPER_CPP(type)
|
||||
* -# The more complex macros.
|
||||
*
|
||||
* The simple macros are implemented in terms of the complex
|
||||
* macros and should generally be preferred over the complex macros.
|
||||
@@ -98,6 +98,10 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying)
|
||||
|
||||
/**
|
||||
* \ingroup attributehelper
|
||||
*
|
||||
* Define the attribute accessor functions \c Make<type>Accessor
|
||||
* for class \pname{type}.
|
||||
*
|
||||
* \param type the name of the class
|
||||
*
|
||||
* This macro defines and generates the code for the implementation
|
||||
@@ -108,46 +112,65 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying)
|
||||
*/
|
||||
#define ATTRIBUTE_ACCESSOR_DEFINE(type) \
|
||||
template <typename T1> \
|
||||
Ptr<const AttributeAccessor> Make ## type ## Accessor (T1 a1) \
|
||||
Ptr<const AttributeAccessor> Make ## type ## Accessor (T1 a1) \
|
||||
{ \
|
||||
return MakeAccessorHelper<type ## Value> (a1); \
|
||||
return MakeAccessorHelper<type ## Value> (a1); \
|
||||
} \
|
||||
template <typename T1, typename T2> \
|
||||
Ptr<const AttributeAccessor> Make ## type ## Accessor (T1 a1, T2 a2) \
|
||||
Ptr<const AttributeAccessor> Make ## type ## Accessor (T1 a1, T2 a2) \
|
||||
{ \
|
||||
return MakeAccessorHelper<type ## Value> (a1, a2); \
|
||||
return MakeAccessorHelper<type ## Value> (a1, a2); \
|
||||
}
|
||||
|
||||
/**
|
||||
* \ingroup attributehelper
|
||||
* \internal
|
||||
*
|
||||
* Declare the attribute value class \pname{name}Value
|
||||
* for underlying class \pname{type}.
|
||||
*
|
||||
* \param type The underlying type.
|
||||
* \param name The token to use in defining the accessor name.
|
||||
*
|
||||
* This macro declares the class \c <type>Value 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.
|
||||
*/
|
||||
#define ATTRIBUTE_VALUE_DEFINE_WITH_NAME(type,name) \
|
||||
class name ## Value : public AttributeValue \
|
||||
class name ## Value : public AttributeValue \
|
||||
{ \
|
||||
public: \
|
||||
name ## Value (); \
|
||||
name ## Value (const type &value); \
|
||||
public: \
|
||||
name ## Value (); \
|
||||
name ## Value (const type &value); \
|
||||
void Set (const type &value); \
|
||||
type Get (void) const; \
|
||||
template <typename T> \
|
||||
bool GetAccessor (T &value) const { \
|
||||
bool GetAccessor (T &value) const { \
|
||||
value = T (m_value); \
|
||||
return true; \
|
||||
} \
|
||||
virtual Ptr<AttributeValue> Copy (void) const; \
|
||||
virtual std::string SerializeToString (Ptr<const AttributeChecker> checker) const; \
|
||||
virtual bool DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker); \
|
||||
private: \
|
||||
virtual std::string \
|
||||
SerializeToString (Ptr<const AttributeChecker> checker) const; \
|
||||
virtual bool \
|
||||
DeserializeFromString (std::string value, \
|
||||
Ptr<const AttributeChecker> checker); \
|
||||
private: \
|
||||
type m_value; \
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* \ingroup attributehelper
|
||||
*
|
||||
* Declare the attribute value class \pname{type}Value
|
||||
* for the class \pname{type}.
|
||||
*
|
||||
* \param type the name of the class.
|
||||
*
|
||||
* This macro defines the class \c typeValue associated to class \c type.
|
||||
* This macro declares the class \c <type>Value associated to class \c type.
|
||||
* This macro is typically invoked in the class header file.
|
||||
*/
|
||||
#define ATTRIBUTE_VALUE_DEFINE(type) \
|
||||
@@ -156,67 +179,99 @@ private: \
|
||||
|
||||
/**
|
||||
* \ingroup attributehelper
|
||||
*
|
||||
* Define the conversion operators class \pname{type} and
|
||||
* Attribute instances.
|
||||
*
|
||||
* \param type the name of the class
|
||||
*
|
||||
* This macro defines the conversion operators for class \c type to and
|
||||
* from instances of type Attribute.
|
||||
* Typically invoked in the class header file.
|
||||
*
|
||||
* \internal
|
||||
* This appears to be unused.
|
||||
*/
|
||||
#define ATTRIBUTE_CONVERTER_DEFINE(type)
|
||||
|
||||
/**
|
||||
* \ingroup attributehelper
|
||||
*
|
||||
* Declare the AttributeChecker class \pname{type}Checker
|
||||
* and the \c Make<type>Checker function for class \pname{type}.
|
||||
*
|
||||
* \param type the name of the class
|
||||
*
|
||||
* This macro defines the \c typeChecker class and the associated
|
||||
* This macro declares the \pname{type}Checker class and the associated
|
||||
* \c Make<type>Checker function.
|
||||
* Typically invoked in the class header file..
|
||||
*
|
||||
* (Note that the \pname{type}Checker class needs no implementation
|
||||
* since it just inherits all its implementation from AttributeChecker.)
|
||||
*
|
||||
* Typically invoked in the class header file.
|
||||
*/
|
||||
#define ATTRIBUTE_CHECKER_DEFINE(type) \
|
||||
class type ## Checker : public AttributeChecker {}; \
|
||||
Ptr<const AttributeChecker> Make ## type ## Checker (void); \
|
||||
#define ATTRIBUTE_CHECKER_DEFINE(type) \
|
||||
class type ## Checker : public AttributeChecker {}; \
|
||||
Ptr<const AttributeChecker> Make ## type ## Checker (void)
|
||||
|
||||
|
||||
/**
|
||||
* \ingroup attributehelper
|
||||
* \internal
|
||||
*
|
||||
* Define the class methods belonging to
|
||||
* the attribute value class \pname{name}Value
|
||||
* of the underlying class \pname{type}.
|
||||
*
|
||||
* \param type The underlying type.
|
||||
* \param name The token to use in defining the accessor name.
|
||||
*
|
||||
* This macro implements the \pname{type}Value class methods
|
||||
* (including the \pname{type}Value::SerializeToString
|
||||
* and \pname{type}Value::DeserializeFromString methods).
|
||||
*
|
||||
* Typically invoked in the source file.
|
||||
*/
|
||||
#define ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME(type,name) \
|
||||
name ## Value::name ## Value () \
|
||||
name ## Value::name ## Value () \
|
||||
: m_value () {} \
|
||||
name ## Value::name ## Value (const type &value) \
|
||||
: m_value (value) {} \
|
||||
void name ## Value::Set (const type &v) { \
|
||||
name ## Value::name ## Value (const type &value) \
|
||||
: m_value (value) {} \
|
||||
void name ## Value::Set (const type &v) { \
|
||||
m_value = v; \
|
||||
} \
|
||||
type name ## Value::Get (void) const { \
|
||||
type name ## Value::Get (void) const { \
|
||||
return m_value; \
|
||||
} \
|
||||
Ptr<AttributeValue> \
|
||||
name ## Value::Copy (void) const { \
|
||||
return ns3::Create<name ## Value> (*this); \
|
||||
name ## Value::Copy (void) const { \
|
||||
return ns3::Create<name ## Value> (*this); \
|
||||
} \
|
||||
std::string \
|
||||
name ## Value::SerializeToString (Ptr<const AttributeChecker> checker) const { \
|
||||
std::ostringstream oss; \
|
||||
oss << m_value; \
|
||||
return oss.str (); \
|
||||
std::string name ## Value::SerializeToString \
|
||||
(Ptr<const AttributeChecker> checker) const { \
|
||||
std::ostringstream oss; \
|
||||
oss << m_value; \
|
||||
return oss.str (); \
|
||||
} \
|
||||
bool \
|
||||
name ## Value::DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker) { \
|
||||
std::istringstream iss; \
|
||||
iss.str (value); \
|
||||
iss >> m_value; \
|
||||
return !iss.bad () && !iss.fail (); \
|
||||
bool name ## Value::DeserializeFromString \
|
||||
(std::string value, Ptr<const AttributeChecker> checker) { \
|
||||
std::istringstream iss; \
|
||||
iss.str (value); \
|
||||
iss >> m_value; \
|
||||
return !iss.bad () && !iss.fail (); \
|
||||
}
|
||||
|
||||
/**
|
||||
* \ingroup attributehelper
|
||||
*
|
||||
* Define the class methods belonging to
|
||||
* attribute value class \pname{type}Value for class \pname{type}.
|
||||
*
|
||||
* \param type the name of the class.
|
||||
*
|
||||
* This macro implements the \c typeValue class (including the
|
||||
* \c typeValue::SerializeToString and \c typeValue::DeserializeFromString
|
||||
* methods).
|
||||
* This macro implements the \pname{type}Value class methods
|
||||
* (including the \pname{type}Value::SerializeToString
|
||||
* and \pname{type}Value::DeserializeFromString methods).
|
||||
*
|
||||
* Typically invoked in the source file.
|
||||
*/
|
||||
#define ATTRIBUTE_VALUE_IMPLEMENT(type) \
|
||||
@@ -225,31 +280,58 @@ private: \
|
||||
|
||||
/**
|
||||
* \ingroup attributehelper
|
||||
*
|
||||
* Define the \c Make<type>Checker function for class \pname{type}.
|
||||
*
|
||||
* \param type the name of the class
|
||||
*
|
||||
* This macro implements the \c Make<type>Checker function.
|
||||
*
|
||||
* Typically invoked in the source file..
|
||||
*/
|
||||
#define ATTRIBUTE_CHECKER_IMPLEMENT(type) \
|
||||
Ptr<const AttributeChecker> Make ## type ## Checker (void) \
|
||||
{ \
|
||||
return MakeSimpleAttributeChecker<type ## Value,type ## Checker> (# type "Value", # type); \
|
||||
Ptr<const AttributeChecker> Make ## type ## Checker (void) { \
|
||||
return MakeSimpleAttributeChecker<type ## Value,type ## Checker> \
|
||||
(# type "Value", # type); \
|
||||
} \
|
||||
|
||||
/**
|
||||
* \ingroup attributehelper
|
||||
* \internal
|
||||
*
|
||||
* Define the \c Make<type>Checker function for class \pname{type}.
|
||||
*
|
||||
* \param type the name of the class.
|
||||
* \param name the string name of the underlying type.
|
||||
*
|
||||
* This macro implements the \c Make<type>Checker function
|
||||
* for class \pname{type}.
|
||||
*
|
||||
* Typically invoked in the source file..
|
||||
*/
|
||||
#define ATTRIBUTE_CHECKER_IMPLEMENT_WITH_NAME(type,name) \
|
||||
Ptr<const AttributeChecker> Make ## type ## Checker (void) \
|
||||
{ \
|
||||
return MakeSimpleAttributeChecker<type ## Value,type ## Checker> (# type "Value", name); \
|
||||
#define ATTRIBUTE_CHECKER_IMPLEMENT_WITH_NAME(type,name) \
|
||||
Ptr<const AttributeChecker> Make ## type ## Checker (void) { \
|
||||
return MakeSimpleAttributeChecker<type ## Value,type ## Checker> \
|
||||
(# type "Value", name); \
|
||||
} \
|
||||
|
||||
/**
|
||||
* \ingroup attributehelper
|
||||
*
|
||||
* Declare the attribute value, accessor and checkers for class \pname{type}
|
||||
*
|
||||
* \param type the name of the class
|
||||
*
|
||||
* This macro declares:
|
||||
*
|
||||
* - The attribute value class \pname{type}Value,
|
||||
*
|
||||
* - The attribute accessor functions \c Make<type>Accessor,
|
||||
*
|
||||
* - The AttributeChecker class \pname{type}Checker
|
||||
* and the \c Make<type>Checker function,
|
||||
*
|
||||
* for class \pname{type}.
|
||||
*
|
||||
* This macro should be invoked outside of the class
|
||||
* declaration in its public header.
|
||||
*/
|
||||
@@ -260,8 +342,19 @@ private: \
|
||||
|
||||
/**
|
||||
* \ingroup attributehelper
|
||||
*
|
||||
* Define the attribute value, accessor and checkers for class \pname{type}
|
||||
*
|
||||
* \param type the name of the class
|
||||
*
|
||||
* This macro implements
|
||||
*
|
||||
* - The \pname{type}Value class methods,
|
||||
*
|
||||
* - The \c Make<type>Checker function,
|
||||
*
|
||||
* for class \pname{type}.
|
||||
*
|
||||
* This macro should be invoked from the class implementation file.
|
||||
*/
|
||||
#define ATTRIBUTE_HELPER_CPP(type) \
|
||||
|
||||
@@ -68,7 +68,7 @@ struct CallbackTraits<T *>
|
||||
/**
|
||||
* \ingroup callback
|
||||
* \defgroup callbackimpl Callback Implementation
|
||||
* CallbackImpl classes
|
||||
* Callback implementation classes
|
||||
*/
|
||||
/**
|
||||
* \ingroup callbackimpl
|
||||
@@ -1695,10 +1695,8 @@ private:
|
||||
CallbackBase m_value; //!< the CallbackBase
|
||||
};
|
||||
|
||||
/** Attribute helpers @{ */
|
||||
ATTRIBUTE_ACCESSOR_DEFINE (Callback);
|
||||
ATTRIBUTE_CHECKER_DEFINE (Callback);
|
||||
/**@}*/
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
@@ -531,7 +531,7 @@ private:
|
||||
* Record all instances of Time, so we can rescale them when
|
||||
* the resolution changes.
|
||||
*
|
||||
* \intern
|
||||
* \internal
|
||||
*
|
||||
* We use a std::set so we can remove the record easily when
|
||||
* ~Time() is called.
|
||||
@@ -551,7 +551,7 @@ private:
|
||||
* Record of outstanding Time objects which will need conversion
|
||||
* when the resolution is set.
|
||||
*
|
||||
* \intern
|
||||
* \internal
|
||||
*
|
||||
* Use a classic static variable so we can check in Time ctors
|
||||
* without a function call.
|
||||
@@ -576,7 +576,7 @@ private:
|
||||
/**
|
||||
* Remove all MarkedTimes.
|
||||
*
|
||||
* \intern
|
||||
* \internal
|
||||
* Has to be visible to the Simulator class, hence the friending.
|
||||
*/
|
||||
static void ClearMarkedTimes ();
|
||||
@@ -617,7 +617,7 @@ private:
|
||||
}; // class Time
|
||||
|
||||
|
||||
// Force static initialization of Time
|
||||
/// Force static initialization of Time
|
||||
static bool NS_UNUSED_GLOBAL (g_TimeStaticInit) = Time::StaticInit ();
|
||||
|
||||
inline bool
|
||||
@@ -697,7 +697,6 @@ inline Time &operator -= (Time &lhs, const Time &rhs)
|
||||
}
|
||||
|
||||
/**
|
||||
* \anchor ns3-Time-Abs
|
||||
* \relates ns3::TimeUnit
|
||||
* Absolute value function for Time
|
||||
* \param time the input value
|
||||
@@ -708,7 +707,6 @@ inline Time Abs (const Time &time)
|
||||
return Time ((time.m_data < 0) ? -time.m_data : time.m_data);
|
||||
}
|
||||
/**
|
||||
* \anchor ns3-Time-Max
|
||||
* \relates ns3::TimeUnit
|
||||
* \param ta the first value
|
||||
* \param tb the seconds value
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* \ingroup attribute
|
||||
* \ingroup AttributeList
|
||||
*
|
||||
* \class ns3::StringValue
|
||||
* \brief hold variables of type string
|
||||
@@ -15,7 +15,6 @@ namespace ns3 {
|
||||
* This class can be used to hold variables of type string,
|
||||
* that is, either char * or std::string.
|
||||
*/
|
||||
|
||||
ATTRIBUTE_VALUE_DEFINE_WITH_NAME (std::string, String);
|
||||
ATTRIBUTE_ACCESSOR_DEFINE (String);
|
||||
ATTRIBUTE_CHECKER_DEFINE (String);
|
||||
|
||||
@@ -30,7 +30,8 @@ NS_LOG_COMPONENT_DEFINE ("SystemCondition");
|
||||
namespace ns3 {
|
||||
|
||||
class SystemConditionPrivate {
|
||||
public:
|
||||
public:
|
||||
/// Conversion from ns to s.
|
||||
static const uint64_t NS_PER_SEC = (uint64_t)1000000000;
|
||||
|
||||
SystemConditionPrivate ();
|
||||
|
||||
@@ -67,6 +67,7 @@ public:
|
||||
|
||||
static const uint64_t US_PER_NS = (uint64_t)1000;
|
||||
static const uint64_t US_PER_SEC = (uint64_t)1000000;
|
||||
/// Conversion from ns to s.
|
||||
static const uint64_t NS_PER_SEC = (uint64_t)1000000000;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -138,7 +138,6 @@ public:
|
||||
* uint32_t node id of destination
|
||||
* unit32_t dev id on destination
|
||||
* uint8_t[] serialized packet
|
||||
* \endinternal
|
||||
*/
|
||||
virtual void SendPacket (Ptr<Packet> p, const Time &rxTime, uint32_t node, uint32_t dev);
|
||||
/**
|
||||
@@ -164,7 +163,6 @@ public:
|
||||
* uint64_t guarantee time
|
||||
* uint32_t 0 must be zero for Null Message
|
||||
* uint32_t 0 must be zero for Null Message
|
||||
* \endinternal
|
||||
*/
|
||||
static void SendNullMessage (const Time& guaranteeUpdate, Ptr<RemoteChannelBundle> bundle);
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user