feisty meow concerns codebase 2.140
enhance_cpp.h
Go to the documentation of this file.
1#ifndef ENHANCE_CPP_GROUP
2#define ENHANCE_CPP_GROUP
3
4/*****************************************************************************\
5* *
6* Name : enhance_cpp *
7* Author : Chris Koeritz *
8* *
9*******************************************************************************
10* Copyright (c) 1996-$now By Author. This program is free software; you can *
11* redistribute it and/or modify it under the terms of the GNU General Public *
12* License as published by the Free Software Foundation; either version 2 of *
13* the License or (at your option) any later version. This is online at: *
14* http://www.fsf.org/copyleft/gpl.html *
15* Please send any updates to: fred@gruntose.com *
16\*****************************************************************************/
17
19#include <basis/definitions.h>
20
21namespace basis {
22
24
31class enhance_cpp : public virtual root_object
32{
33public:
34 // this class is an encapsulator; any macros are not actual members.
35
37
39
42 #define DEFINE_CLASS_NAME(objname) \
43 static const char *static_class_name() { return (objname); } \
44 virtual const char *class_name() const { return static_class_name(); }
45
47
49
54 #define FUNCDEF(func_in) \
55 const char *func = (const char *)func_in; \
56 application::frame_tracking_instance __trail_of_function(static_class_name(), func, \
57 __FILE__, __LINE__, true);
58
60
62 #define BASE_FUNCTION(func) astring just_function = astring(func); \
63 astring function_name = static_class_name(); \
64 function_name += astring("::") + just_function
66
69 #define FUNCTION(func) BASE_FUNCTION(func); \
70 function_name += ": "; \
71 application::update_current_stack_frame_line_number(__LINE__)
72
74 #define BASE_INSTANCE_FUNCTION(func) astring just_function = astring(func); \
75 astring function_name = instance_name(); \
76 function_name += astring("::") + just_function
78
81 #define INSTANCE_FUNCTION(func) BASE_INSTANCE_FUNCTION(func); \
82 function_name += ": "; \
83 application::update_current_stack_frame_line_number(__LINE__)
84
86
88
91 #define __WHERE__ basis::a_sprintf("%s [line %d]", __FILE__, __LINE__)
92
93};
94
95} //namespace.
96
97#endif
98
Provides missing language features in C++.
Definition enhance_cpp.h:32
Constants and objects used throughout HOOPLE.
The guards collection helps in testing preconditions and reporting errors.
Definition array.h:30