~drizzle-trunk/drizzle/jenkins-Drizzle-Builder-205

« back to all changes in this revision

Viewing changes to drizzled/drizzled_abort.h

  • Committer: Continuous Integration
  • Date: 2013-02-28 16:45:31 UTC
  • mfrom: (2622.7.1 remove-more-unireg)
  • Revision ID: ci@drizzle.org-20130228164531-ire1iiu2qbdj8lvm
Merge lp:~stewart/drizzle/remove-more-unireg Build: jenkins-Drizzle-Builder-172

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
5
 *  Copyright (C) 2011 Brian Aker
 
6
 *  Copyright (C) 2013 Stewart Smith
5
7
 *
6
8
 *  This program is free software; you can redistribute it and/or modify
7
9
 *  it under the terms of the GNU General Public License as published by
17
19
 *  along with this program; if not, write to the Free Software
18
20
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
21
 */
20
 
 
21
 
/*  Extra functions used by unireg library */
22
 
 
23
22
#pragma once
24
23
 
25
24
#include <drizzled/visibility.h>
28
27
namespace drizzled
29
28
{
30
29
 
31
 
void unireg_exit() __attribute__((noreturn));
32
 
DRIZZLED_API void unireg_actual_abort(const char *file, int line, const char *func, const std::string& message) __attribute__((noreturn));
33
 
void unireg_startup_finished();
 
30
void drizzled_exit() __attribute__((noreturn));
 
31
DRIZZLED_API void drizzled_actual_abort(const char *file, int line, const char *func, const std::string& message) __attribute__((noreturn));
 
32
void drizzled_startup_finished();
34
33
 
35
34
namespace stream {
36
35
 
37
36
namespace detail {
38
37
 
39
38
template<class Ch, class Tr, class A>
40
 
  class _unireg {
 
39
  class _drizzled_abort_log {
41
40
  private:
42
41
 
43
42
  public:
46
45
  public:
47
46
    void operator()(const stream_buffer &s, const char *filename, int line, const char *func)
48
47
    {
49
 
      unireg_actual_abort(filename, line, func, s.str());
 
48
      drizzled_actual_abort(filename, line, func, s.str());
50
49
    }
51
50
  };
52
51
 
90
89
  };
91
90
} // namespace detail
92
91
 
93
 
class _unireg : public detail::log<detail::_unireg> {
 
92
class _drizzled_abort_log : public detail::log<detail::_drizzled_abort_log> {
94
93
public:
95
 
  _unireg(const char *filename, int line_number, const char *func)
 
94
  _drizzled_abort_log(const char *filename, int line_number, const char *func)
96
95
  {
97
96
    set_filename(filename, line_number, func);
98
97
  }
100
99
 
101
100
} // namespace stream
102
101
 
103
 
#define unireg_abort stream::_unireg(__FILE__, __LINE__, __func__)
 
102
#define drizzled_abort stream::_drizzled_abort_log(__FILE__, __LINE__, __func__)
104
103
 
105
104
} /* namespace drizzled */