Class template Dune::XT::Common::NoOpEnableDebugLoggingForCtors

template<typename T = void>
class Dune::XT::Common::NoOpEnableDebugLoggingForCtors<T>

Base class to generate debug output about object creation and deletion using the TimedLogging.

class Foo : EnableDebugLoggingForCtors { public: Foo() : EnableDebugLoggingForCtors(“dune.xt.foo”, “Foo”) {} };

int main() { Foo foo; Foo bar(foo); }

00:00|dune.xt.foo: Foo(this=0x0001) 00:00|dune.xt.foo: Foo(this=0x0002, other=0x0001) 00:00|dune.xt.foo: ~Foo(this=0x0002) 00:00|dune.xt.foo: ~Foo(this=0x0001)

Simply derive from this class

and provide the prefix (for the logger) as well as the class name. Using your class, i.e. as in

should yield an output like

The same holds for the move ctor as well as move and assignment operators.

Note

Output is only generated in debug builds (or when DUNE_XT_COMMON_TIMEDLOGGING_ENABLE_DEBUG is true) and when the TimedLogger is active.

See also: TimedLogging, TimedLogger

Method Dune::XT::Common::NoOpEnableDebugLoggingForCtors::operator=

template<typename T = void>
ThisType &Dune::XT::Common::NoOpEnableDebugLoggingForCtors<T>::operator=(const ThisType &other) = default

No documentation provided.

Method Dune::XT::Common::NoOpEnableDebugLoggingForCtors::operator=

template<typename T = void>
ThisType &Dune::XT::Common::NoOpEnableDebugLoggingForCtors<T>::operator=(ThisType &&source) noexcept = default

No documentation provided.

Constructor Dune::XT::Common::NoOpEnableDebugLoggingForCtors::NoOpEnableDebugLoggingForCtors<T>

template<>
template<typename T = void>
Dune::XT::Common::NoOpEnableDebugLoggingForCtors<T>::NoOpEnableDebugLoggingForCtors<T>(const std::string&, const std::string&)

No documentation provided.

Constructor Dune::XT::Common::NoOpEnableDebugLoggingForCtors::NoOpEnableDebugLoggingForCtors<T>

template<>
template<typename T = void>
Dune::XT::Common::NoOpEnableDebugLoggingForCtors<T>::NoOpEnableDebugLoggingForCtors<T>(const ThisType &other) = default

No documentation provided.

Constructor Dune::XT::Common::NoOpEnableDebugLoggingForCtors::NoOpEnableDebugLoggingForCtors<T>

template<>
template<typename T = void>
Dune::XT::Common::NoOpEnableDebugLoggingForCtors<T>::NoOpEnableDebugLoggingForCtors<T>(ThisType &&source) noexcept = default

No documentation provided.

Destructor Dune::XT::Common::NoOpEnableDebugLoggingForCtors::~NoOpEnableDebugLoggingForCtors<T>

template<>
template<typename T = void>
Dune::XT::Common::NoOpEnableDebugLoggingForCtors<T>::~NoOpEnableDebugLoggingForCtors<T>() = default

No documentation provided.

Type alias Dune::XT::Common::NoOpEnableDebugLoggingForCtors::ThisType

type Dune::XT::Common::NoOpEnableDebugLoggingForCtors::ThisType

No documentation provided.