source: git/dyn_modules/syzextra/singularxx_defs.h @ 6ce030f

fieker-DuValspielwiese
Last change on this file since 6ce030f was 6ce030f, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
removal of the $Id$ svn tag from everywhere NOTE: the git SHA1 may be used instead (only on special places) NOTE: the libraries Singular/LIB/*.lib still contain the marker due to our current use of svn
  • Property mode set to 100644
File size: 1.5 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**/
14//*****************************************************************************
15
16// Note: inclusion of CSINGULARTypes.h at the end
17
18
19// Get configuration
20// #include "singular_config.h"
21
22#ifndef SINGULAR_singular_defs_h_
23#define SINGULAR_singular_defs_h_
24
25#define BEGIN_NAMESPACE(a) namespace a {
26#define END_NAMESPACE }
27#define USING_NAMESPACE(a) using namespace a;
28
29#define SINGULARXXNAME Singular
30
31#define BEGIN_NAMESPACE_SINGULARXX BEGIN_NAMESPACE(SINGULARXXNAME)
32#define END_NAMESPACE_SINGULARXX END_NAMESPACE
33#define USING_NAMESPACE_SINGULARXX USING_NAMESPACE(SINGULARXXNAME)
34
35#define FROM_NAMESPACE_SINGULARXXNAME(s) SINGULARXXNAME :: s
36
37#define BEGIN_NAMESPACE_NONAME BEGIN_NAMESPACE()
38
39
40
41#ifndef HAVE_THROW
42#  define SINGULARXX_THROW(type) throw type();
43#else
44#  define SINGULARXX_THROW(type) Werror(type().what());
45#endif
46
47/// For optimizing if-branches
48#ifdef __GNUC__
49#define LIKELY(expression) (__builtin_expect(!!(expression), 1))
50#define UNLIKELY(expression) (__builtin_expect(!!(expression), 0))
51#else
52#define LIKELY(expression) (expression)
53#define UNLIKELY(expression) (expression)
54#endif
55
56// #include "CSingularTypes.h"
57
58#endif /* SINGULAR_singular_defs_h_ */
Note: See TracBrowser for help on using the repository browser.