feisty meow concerns codebase  2.140
basis::nameable Class Referenceabstract

Root object for any class that knows its own name. More...

#include <contracts.h>

Inheritance diagram for basis::nameable:
Collaboration diagram for basis::nameable:

Public Member Functions

virtual const char * class_name () const =0
 Returns the bare name of this class as a constant character pointer. More...
 

Detailed Description

Root object for any class that knows its own name.

This is a really vital thing for debugging to be very helpful, and unfortunately it's not provided by C++.

Definition at line 122 of file contracts.h.

Member Function Documentation

◆ class_name()

virtual const char* basis::nameable::class_name ( ) const
pure virtual

Returns the bare name of this class as a constant character pointer.

The name returned here is supposed to be just a class name and not provide any more information than that. It is especially important not to add any syntactic elements like '::' to the name, since a bare alphanumeric name is expected.

Implemented in basis::text_formable, and application::base_application.

Referenced by unit_test::unit_base::assert_equal(), unit_test::unit_base::assert_false(), unit_test::unit_base::assert_not_equal(), unit_test::unit_base::assert_true(), unit_test::unit_base::record_fail(), and unit_test::unit_base::record_pass().


The documentation for this class was generated from the following file: