source: git/dyn_modules/syzextra/singularxx_defs.h @ 636c28

jengelh-datetimespielwiese
Last change on this file since 636c28 was 636c28, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
ADD: "scons debug=1" for debug version UPD: updated bigintm to support correct (debug/release) version FIX: some minor warnings (thanks to debug version) From: Oleksandr Motsak <motsak@mathematik.uni-kl.de> git-svn-id: file:///usr/local/Singular/svn/trunk@14066 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.6 KB
Line 
1// -*- c++ -*-
2//*****************************************************************************
3/** @file singularxx_defs.h
4 *
5 * @author Alexander Dreyer
6 * @date 2009-06-15
7 *
8 * This file includes some basic definitions for the SINGULAR++ interface.
9 *
10 * @par Copyright:
11 *   (c) 2009 by The SINGULAR Team, see LICENSE file
12 *
13 * @internal
14 * @version \$Id: singularxx_defs.h,v 1.3 2009/07/02 11:21:31 dreyer Exp $
15 *
16**/
17//*****************************************************************************
18
19// Note: inclusion of CSINGULARTypes.h at the end
20
21
22// Get configuration
23// #include "singular_config.h"
24
25#ifndef SINGULAR_singular_defs_h_
26#define SINGULAR_singular_defs_h_
27
28#define BEGIN_NAMESPACE(a) namespace a {
29#define END_NAMESPACE }
30#define USING_NAMESPACE(a) using namespace a;
31
32#define SINGULARXXNAME Singular
33
34#define BEGIN_NAMESPACE_SINGULARXX BEGIN_NAMESPACE(SINGULARXXNAME)
35#define END_NAMESPACE_SINGULARXX END_NAMESPACE
36#define USING_NAMESPACE_SINGULARXX USING_NAMESPACE(SINGULARXXNAME)
37
38#define FROM_NAMESPACE_SINGULARXXNAME(s) SINGULARXXNAME :: s
39
40#define BEGIN_NAMESPACE_NONAME BEGIN_NAMESPACE()
41
42
43
44#ifndef HAVE_THROW
45#  define SINGULARXX_THROW(type) throw type();
46#else
47#  define SINGULARXX_THROW(type) Werror(type().what());
48#endif
49
50/// For optimizing if-branches
51#ifdef __GNUC__
52#define LIKELY(expression) (__builtin_expect(!!(expression), 1))
53#define UNLIKELY(expression) (__builtin_expect(!!(expression), 0))
54#else
55#define LIKELY(expression) (expression)
56#define UNLIKELY(expression) (expression)
57#endif
58
59// #include "CSingularTypes.h"
60
61#endif /* SINGULAR_singular_defs_h_ */
Note: See TracBrowser for help on using the repository browser.