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

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

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

ThisType &Dune::XT::Common::NoOpEnableDebugLoggingForCtors::operator=(const ThisType &other) = default

No documentation provided.

ThisType &Dune::XT::Common::NoOpEnableDebugLoggingForCtors::operator=(ThisType &&source) noexcept = default

No documentation provided.

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

No documentation provided.

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

No documentation provided.

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

No documentation provided.

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

No documentation provided.

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

No documentation provided.