replace char const * with std::string const &
This commit is contained in:
@@ -36,7 +36,7 @@ TraceContainer::~TraceContainer ()
|
||||
}
|
||||
|
||||
void
|
||||
TraceContainer::SetUiVariableCallback (char const *name, Callback<void,uint64_t, uint64_t> callback)
|
||||
TraceContainer::SetUiVariableCallback (std::string const&name, Callback<void,uint64_t, uint64_t> callback)
|
||||
{
|
||||
for (UiListI i = m_uiList.begin (); i != m_uiList.end (); i++)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ TraceContainer::SetUiVariableCallback (char const *name, Callback<void,uint64_t,
|
||||
NS_ASSERT (false);
|
||||
}
|
||||
void
|
||||
TraceContainer::SetSiVariableCallback (char const *name, Callback<void,int64_t, int64_t> callback)
|
||||
TraceContainer::SetSiVariableCallback (std::string const&name, Callback<void,int64_t, int64_t> callback)
|
||||
{
|
||||
for (SiListI i = m_siList.begin (); i != m_siList.end (); i++)
|
||||
{
|
||||
@@ -62,12 +62,12 @@ TraceContainer::SetSiVariableCallback (char const *name, Callback<void,int64_t,
|
||||
NS_ASSERT (false);
|
||||
}
|
||||
void
|
||||
TraceContainer::SetFVariableCallback (char const *name, Callback<void,double, double> callback)
|
||||
TraceContainer::SetFVariableCallback (std::string const&name, Callback<void,double, double> callback)
|
||||
{
|
||||
NS_ASSERT (false);
|
||||
}
|
||||
void
|
||||
TraceContainer::SetStream (char const *name, std::ostream *os)
|
||||
TraceContainer::SetStream (std::string const&name, std::ostream *os)
|
||||
{
|
||||
for (StreamTracerListI i = m_traceStreamList.begin (); i != m_traceStreamList.end (); i++)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ TraceContainer::SetStream (char const *name, std::ostream *os)
|
||||
}
|
||||
|
||||
void
|
||||
TraceContainer::RegisterUiVariable (char const *name, UiVariableTracerBase *var)
|
||||
TraceContainer::RegisterUiVariable (std::string const&name, UiVariableTracerBase *var)
|
||||
{
|
||||
// ensure unicity
|
||||
for (UiListI i = m_uiList.begin (); i != m_uiList.end (); i++)
|
||||
@@ -95,7 +95,7 @@ TraceContainer::RegisterUiVariable (char const *name, UiVariableTracerBase *var)
|
||||
m_uiList.push_back (std::make_pair (var, name));
|
||||
}
|
||||
void
|
||||
TraceContainer::RegisterSiVariable (char const *name, SiVariableTracerBase *var)
|
||||
TraceContainer::RegisterSiVariable (std::string const&name, SiVariableTracerBase *var)
|
||||
{
|
||||
// ensure unicity
|
||||
for (SiListI i = m_siList.begin (); i != m_siList.end (); i++)
|
||||
@@ -109,13 +109,13 @@ TraceContainer::RegisterSiVariable (char const *name, SiVariableTracerBase *var)
|
||||
m_siList.push_back (std::make_pair (var, name));
|
||||
}
|
||||
void
|
||||
TraceContainer::RegisterFVariable (char const *name, FVariableTracerBase *var)
|
||||
TraceContainer::RegisterFVariable (std::string const&name, FVariableTracerBase *var)
|
||||
{
|
||||
NS_ASSERT (false);
|
||||
}
|
||||
|
||||
void
|
||||
TraceContainer::RegisterStream (char const *name, StreamTracer *stream)
|
||||
TraceContainer::RegisterStream (std::string const&name, StreamTracer *stream)
|
||||
{
|
||||
// ensure unicity
|
||||
for (StreamTracerListI i = m_traceStreamList.begin (); i != m_traceStreamList.end (); i++)
|
||||
@@ -131,7 +131,7 @@ TraceContainer::RegisterStream (char const *name, StreamTracer *stream)
|
||||
}
|
||||
|
||||
void
|
||||
TraceContainer::RegisterCallback (char const *name, CallbackTracerBase *tracer)
|
||||
TraceContainer::RegisterCallback (std::string const&name, CallbackTracerBase *tracer)
|
||||
{
|
||||
for (CallbackListI i = m_callbackList.begin (); i != m_callbackList.end (); i++)
|
||||
{
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
* This method targets only event sources which are variables of any unsigned
|
||||
* integer type.
|
||||
*/
|
||||
void SetUiVariableCallback (char const *name,
|
||||
void SetUiVariableCallback (std::string const &name,
|
||||
Callback<void,uint64_t, uint64_t> callback);
|
||||
/**
|
||||
* \param name the name of the target event source
|
||||
@@ -77,21 +77,21 @@ public:
|
||||
* This method targets only event sources which are variables of any signed
|
||||
* integer type.
|
||||
*/
|
||||
void SetSiVariableCallback (char const *name, Callback<void,int64_t, int64_t> callback);
|
||||
void SetSiVariableCallback (std::string const &name, Callback<void,int64_t, int64_t> callback);
|
||||
/**
|
||||
* \param name the name of the target event source
|
||||
* \param callback the callback being connected to the target event source
|
||||
*
|
||||
* This method targets only event sources which are variables of any double type.
|
||||
*/
|
||||
void SetFVariableCallback (char const *name, Callback<void,double, double> callback);
|
||||
void SetFVariableCallback (std::string const &name, Callback<void,double, double> callback);
|
||||
/**
|
||||
* \param name the name of the target event source
|
||||
* \param os the output stream being connected to the source trace stream
|
||||
*
|
||||
* This method targets only event sources which are of type StreamTracer.
|
||||
*/
|
||||
void SetStream (char const *name, std::ostream *os);
|
||||
void SetStream (std::string const &name, std::ostream *os);
|
||||
|
||||
/**
|
||||
* \param name the name of the target event source
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
* This method targets only event sources which are of type CallbackTracer<T1>
|
||||
*/
|
||||
template <typename T1>
|
||||
void SetCallback (char const *name, Callback<void,T1> callback);
|
||||
void SetCallback (std::string const &name, Callback<void,T1> callback);
|
||||
/**
|
||||
* \param name the name of the target event source
|
||||
* \param callback the callback being connected to the target event source.
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
* This method targets only event sources which are of type CallbackTracer<T1,T2>
|
||||
*/
|
||||
template <typename T1, typename T2>
|
||||
void SetCallback (char const *name, Callback<void,T1,T2> callback);
|
||||
void SetCallback (std::string const &name, Callback<void,T1,T2> callback);
|
||||
/**
|
||||
* \param name the name of the target event source
|
||||
* \param callback the callback being connected to the target event source.
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
* This method targets only event sources which are of type CallbackTracer<T1,T2,T3>
|
||||
*/
|
||||
template <typename T1, typename T2, typename T3>
|
||||
void SetCallback (char const *name, Callback<void,T1,T2,T3> callback);
|
||||
void SetCallback (std::string const &name, Callback<void,T1,T2,T3> callback);
|
||||
/**
|
||||
* \param name the name of the target event source
|
||||
* \param callback the callback being connected to the target event source.
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
* This method targets only event sources which are of type CallbackTracer<T1,T2,T3,T4>
|
||||
*/
|
||||
template <typename T1, typename T2, typename T3, typename T4>
|
||||
void SetCallback (char const *name, Callback<void,T1,T2,T3,T4> callback);
|
||||
void SetCallback (std::string const&name, Callback<void,T1,T2,T3,T4> callback);
|
||||
/**
|
||||
* \param name the name of the target event source
|
||||
* \param callback the callback being connected to the target event source.
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
* This method targets only event sources which are of type CallbackTracer<T1,T2,T3,T4,T5>
|
||||
*/
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5>
|
||||
void SetCallback (char const *name, Callback<void,T1,T2,T3,T4,T5> callback);
|
||||
void SetCallback (std::string const &name, Callback<void,T1,T2,T3,T4,T5> callback);
|
||||
|
||||
/**
|
||||
* \param name the name of the registered event source
|
||||
@@ -140,28 +140,28 @@ public:
|
||||
*
|
||||
* This method registers only event sources of type "unsigned integer".
|
||||
*/
|
||||
void RegisterUiVariable (char const *name, UiVariableTracerBase *var);
|
||||
void RegisterUiVariable (std::string const&name, UiVariableTracerBase *var);
|
||||
/**
|
||||
* \param name the name of the registered event source
|
||||
* \param var the event source being registered
|
||||
*
|
||||
* This method registers only event sources of type "signed integer".
|
||||
*/
|
||||
void RegisterSiVariable (char const *name, SiVariableTracerBase *var);
|
||||
void RegisterSiVariable (std::string const&name, SiVariableTracerBase *var);
|
||||
/**
|
||||
* \param name the name of the registered event source
|
||||
* \param var the event source being registered
|
||||
*
|
||||
* This method registers only event sources of type "double".
|
||||
*/
|
||||
void RegisterFVariable (char const *name, FVariableTracerBase *var);
|
||||
void RegisterFVariable (std::string const&name, FVariableTracerBase *var);
|
||||
/**
|
||||
* \param name the name of the registered event source
|
||||
* \param stream the event source being registered
|
||||
*
|
||||
* This method registers only event sources of type StreamTracer.
|
||||
*/
|
||||
void RegisterStream (char const *name, StreamTracer *stream);
|
||||
void RegisterStream (std::string const&name, StreamTracer *stream);
|
||||
|
||||
/**
|
||||
* \param name the name of the registeref event source
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
*
|
||||
* This method registers only event sources of type CallbackTracer
|
||||
*/
|
||||
void RegisterCallback (char const *name, CallbackTracerBase*tracer);
|
||||
void RegisterCallback (std::string const&name, CallbackTracerBase*tracer);
|
||||
|
||||
/**
|
||||
* Print the list of registered event sources in this container only.
|
||||
@@ -202,7 +202,7 @@ namespace ns3 {
|
||||
|
||||
template <typename T1>
|
||||
void
|
||||
TraceContainer::SetCallback (char const *name, Callback<void,T1> callback)
|
||||
TraceContainer::SetCallback (std::string const&name, Callback<void,T1> callback)
|
||||
{
|
||||
for (CallbackListI i = m_callbackList.begin (); i != m_callbackList.end (); i++)
|
||||
{
|
||||
@@ -223,7 +223,7 @@ TraceContainer::SetCallback (char const *name, Callback<void,T1> callback)
|
||||
}
|
||||
template <typename T1, typename T2>
|
||||
void
|
||||
TraceContainer::SetCallback (char const *name, Callback<void,T1,T2> callback)
|
||||
TraceContainer::SetCallback (std::string const&name, Callback<void,T1,T2> callback)
|
||||
{
|
||||
for (CallbackListI i = m_callbackList.begin (); i != m_callbackList.end (); i++)
|
||||
{
|
||||
@@ -244,7 +244,7 @@ TraceContainer::SetCallback (char const *name, Callback<void,T1,T2> callback)
|
||||
}
|
||||
template <typename T1, typename T2, typename T3>
|
||||
void
|
||||
TraceContainer::SetCallback (char const *name, Callback<void,T1,T2,T3> callback)
|
||||
TraceContainer::SetCallback (std::string const&name, Callback<void,T1,T2,T3> callback)
|
||||
{
|
||||
for (CallbackListI i = m_callbackList.begin (); i != m_callbackList.end (); i++)
|
||||
{
|
||||
@@ -265,7 +265,7 @@ TraceContainer::SetCallback (char const *name, Callback<void,T1,T2,T3> callback)
|
||||
}
|
||||
template <typename T1, typename T2, typename T3, typename T4>
|
||||
void
|
||||
TraceContainer::SetCallback (char const *name, Callback<void,T1,T2,T3,T4> callback)
|
||||
TraceContainer::SetCallback (std::string const&name, Callback<void,T1,T2,T3,T4> callback)
|
||||
{
|
||||
for (CallbackListI i = m_callbackList.begin (); i != m_callbackList.end (); i++)
|
||||
{
|
||||
@@ -286,7 +286,7 @@ TraceContainer::SetCallback (char const *name, Callback<void,T1,T2,T3,T4> callba
|
||||
}
|
||||
template <typename T1, typename T2, typename T3, typename T4, typename T5>
|
||||
void
|
||||
TraceContainer::SetCallback (char const *name, Callback<void,T1,T2,T3,T4,T5> callback)
|
||||
TraceContainer::SetCallback (std::string const&name, Callback<void,T1,T2,T3,T4,T5> callback)
|
||||
{
|
||||
for (CallbackListI i = m_callbackList.begin (); i != m_callbackList.end (); i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user