Class to collect and provide information about deprecated class interfaces. More...
#include <utl/Deprecator.h>
Classes | |
class | DeprecationInfo |
Information about the deprecated interface. More... | |
Public Member Functions | |
void | Deprecated (const std::string &theInterface, const std::string &theVersion, const std::string &theNewUsageHint) |
Log the usage of a deprecated interface and emit a warning. More... | |
Deprecator () | |
Constructor. More... | |
std::string | GetReport () const |
Get the final report on interface usage problems. More... | |
std::size_t | GetSize () const |
Size, i.e., number of different deprecated interfaces uses. More... | |
bool | IsEmpty () const |
Check if empty, i.e., no deprecated usage registered. More... | |
Public Attributes | |
static Deprecator &return | instance |
Private Types | |
typedef std::map< std::string, DeprecationInfo > | DataMap |
Private Attributes | |
DataMap | fData |
Class to collect and provide information about deprecated class interfaces.
A central deprecation log is used to collect the information about all uses of deprecated interfaces. Use the Deprecator::GetInstance() call to get a reference to the central deprecation log. The member function Deprecated() is used to log the use of a deprecated interface. At the end of the run, use GetReport() to obtain a string reporting the deprecated interface uses.
Definition at line 54 of file Deprecator.h.
|
private |
Definition at line 107 of file Deprecator.h.
|
inline |
Constructor.
Definition at line 62 of file Deprecator.h.
void utl::Deprecator::Deprecated | ( | const std::string & | theInterface, |
const std::string & | theVersion, | ||
const std::string & | theNewUsageHint | ||
) |
Log the usage of a deprecated interface and emit a warning.
theInterface | The name of the deprecated interface |
theVersion | The version where this interface got deprecated in |
theNewUsageHint | Information about what to do in the future |
Definition at line 21 of file Deprecator.cc.
References WARNING_TERSE.
Referenced by testDeprecator::testCentralDeprecator().
string utl::Deprecator::GetReport | ( | ) | const |
Get the final report on interface usage problems.
Definition at line 37 of file Deprecator.cc.
References utl::delr, utl::endc, utl::endr, utl::hline(), result, and utl::TabularStream::Str().
Referenced by testDeprecator::testCentralDeprecator().
|
inline |
Size, i.e., number of different deprecated interfaces uses.
Definition at line 78 of file Deprecator.h.
References fData.
Referenced by testDeprecator::testCentralDeprecator().
|
inline |
Check if empty, i.e., no deprecated usage registered.
Definition at line 75 of file Deprecator.h.
References fData.
Referenced by testDeprecator::testCentralDeprecator().
|
private |
Definition at line 108 of file Deprecator.h.
|
inherited |
Definition at line 44 of file Singleton.h.