Tag uses of NS_DEPRECATED by release

This commit is contained in:
Peter Barnes
2020-05-11 20:12:51 +00:00
parent 07baf5b48f
commit 1d47a14c14
11 changed files with 23 additions and 74 deletions

View File

@@ -58,7 +58,7 @@ public:
* \c MobilityBuildingInfo class.
*
*/
NS_DEPRECATED
NS_DEPRECATED_3_31
static void MakeMobilityModelConsistent ();
/**
* \brief Make the given mobility model consistent, by determining whether

View File

@@ -81,7 +81,7 @@ public:
* will satisfy the need to determine if a node is inside or outside
* a building.
*/
NS_DEPRECATED
NS_DEPRECATED_3_31
bool IsOutdoor (void);
/**

View File

@@ -30,7 +30,7 @@
* \deprecated This method will go away in future versions of ns-3.
* See instead TheNewWay()
*/
NS_DEPRECATED
NS_DEPRECATED_3_XX
void SomethingUseful (void);
/*
* Do something more useful.

View File

@@ -39,13 +39,10 @@
*
* For example,
* \snippet src/core/doc/deprecated-example.h doxygen snippet
*
* To ease future maintenance please use the versioned forms:
* `NS_DEPRECATED_3_XX`, not the generic `NS_DEPRECATED`
*/
/**
* \ingroup core
* \def NS_DEPRECATED_3_31
* Tag for things deprecated in version ns-3.31.
*/
#if defined(__GNUC__)
/* Test for GCC >= 4.1 */
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)
@@ -65,8 +62,22 @@
#define NS_DEPRECATED
#endif
/**
* \ingroup core
* \def NS_DEPRECATED_3_31
* Tag for things deprecated in version ns-3.31.
*/
#ifdef NS_DEPRECATED
#define NS_DEPRECATED_3_31 NS_DEPRECATED
#endif
/**
* \ingroup core
* \def NS_DEPRECATED_3_30
* Tag for things deprecated in version ns-3.30.
*/
#ifdef NS_DEPRECATED
#define NS_DEPRECATED_3_30 NS_DEPRECATED
#endif
#endif /* NS3_DEPRECATED_H */

View File

@@ -483,21 +483,6 @@ ParetoRandomVariable::ParetoRandomVariable ()
NS_UNUSED (m_mean);
}
double
ParetoRandomVariable::GetMean (void) const
{
NS_LOG_FUNCTION (this);
double mean = std::numeric_limits<double>::infinity ();
if (m_shape > 1)
{
mean = m_shape * m_scale / (m_shape - 1);
}
return mean;
}
double
ParetoRandomVariable::GetScale (void) const
{

View File

@@ -652,13 +652,6 @@ public:
*/
ParetoRandomVariable ();
/**
* \brief Returns the mean parameter for the Pareto distribution returned by this RNG stream.
* \return The mean parameter for the Pareto distribution returned by this RNG stream.
*/
NS_DEPRECATED
double GetMean (void) const;
/**
* \brief Returns the scale parameter for the Pareto distribution returned by this RNG stream.
* \return The scale parameter for the Pareto distribution returned by this RNG stream.

View File

@@ -1107,14 +1107,6 @@ TypeId::GetTraceSource (std::size_t i) const
return IidManager::Get ()->GetTraceSource (m_tid, i);
}
TypeId
TypeId::AddTraceSource (std::string name,
std::string help,
Ptr<const TraceSourceAccessor> accessor)
{
return AddTraceSource (name, help, accessor, "(not yet documented)");
}
TypeId
TypeId::AddTraceSource (std::string name,
std::string help,

View File

@@ -427,22 +427,6 @@ public:
SupportLevel supportLevel = SUPPORTED,
const std::string &supportMsg = "");
/**
* Record a new TraceSource.
*
* \param [in] name The name of the new trace source
* \param [in] help Some help text which describes the purpose of this
* trace source.
* \param [in] accessor A pointer to a TraceSourceAccessor which can be
* used to connect/disconnect sinks to this trace source.
* \returns this TypeId instance.
* \deprecated
*/
NS_DEPRECATED
TypeId AddTraceSource (std::string name,
std::string help,
Ptr<const TraceSourceAccessor> accessor);
/**
* Record a new TraceSource.
*

View File

@@ -226,12 +226,6 @@ bool DataRate::operator != (const DataRate& rhs) const
return m_bps!=rhs.m_bps;
}
double DataRate::CalculateTxTime (uint32_t bytes) const
{
NS_LOG_FUNCTION (this << bytes);
return static_cast<double>(bytes)*8/m_bps;
}
Time DataRate::CalculateBytesTxTime (uint32_t bytes) const
{
NS_LOG_FUNCTION (this << bytes);

View File

@@ -178,19 +178,6 @@ public:
*/
Time CalculateBitsTxTime (uint32_t bits) const;
/**
* \brief Calculate transmission time
*
* Calculates the transmission time at this data rate
* \param bytes The number of bytes (not bits) for which to calculate
* \return The transmission time in seconds for the number of bytes specified
*
* \deprecated This method will go away in future versions of ns-3.
* See instead CalculateBytesTxTime()
*/
NS_DEPRECATED
double CalculateTxTime (uint32_t bytes) const;
/**
* Get the underlying bitrate
* \return The underlying bitrate in bits per second

View File

@@ -276,6 +276,9 @@ def ns3_python_bindings(bld):
defines = list(pymod.env['DEFINES'])
defines.extend(['NS_DEPRECATED=', 'NS3_DEPRECATED_H'])
defines.extend(['NS_DEPRECATED_3_31=', 'NS3_DEPRECATED_H'])
defines.extend(['NS_DEPRECATED_3_30=', 'NS3_DEPRECATED_H'])
defines.extend(['NS_DEPRECATED_3_27=', 'NS3_DEPRECATED_H'])
defines.extend(['NS_DEPRECATED_3_26=', 'NS3_DEPRECATED_H'])
if Utils.unversioned_sys_platform()== 'win32':
try:
defines.remove('_DEBUG') # causes undefined symbols on win32