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 
18 #include <basis/definitions.h>
19 
20 namespace basis {
21 
23 
30 //hmmm: temporary to hide missing code.
31 #define frame_tracking_instance
32 #define __trail_of_function(a, b, c, d, e)
33 
34 class enhance_cpp : public virtual root_object
35 {
36 public:
37  // this class is an encapsulator; any macros are not actual members.
38 
40 
42 
45  #define DEFINE_CLASS_NAME(objname) \
46  static const char *static_class_name() { return (objname); } \
47  virtual const char *class_name() const { return static_class_name(); }
48 
50 
52 
57  #define FUNCDEF(func_in) \
58  const char *func = (const char *)func_in; \
59  frame_tracking_instance __trail_of_function(static_class_name(), func, \
60  __FILE__, __LINE__, true)
61 
63 
65  #define BASE_FUNCTION(func) astring just_function = astring(func); \
66  astring function_name = static_class_name(); \
67  function_name += astring("::") + just_function
69 
72  #define FUNCTION(func) BASE_FUNCTION(func); \
73  function_name += ": "; \
74  update_current_stack_frame_line_number(__LINE__)
75 
77  #define BASE_INSTANCE_FUNCTION(func) astring just_function = astring(func); \
78  astring function_name = instance_name(); \
79  function_name += astring("::") + just_function
81 
84  #define INSTANCE_FUNCTION(func) BASE_INSTANCE_FUNCTION(func); \
85  function_name += ": "; \
86  update_current_stack_frame_line_number(__LINE__)
87 
89 
91 
94  #define __WHERE__ basis::a_sprintf("%s [line %d]", __FILE__, __LINE__)
95 
96 };
97 
98 } //namespace.
99 
100 #endif
101 
Constants and objects used throughout HOOPLE.
The guards collection helps in testing preconditions and reporting errors.
Definition: array.h:30