~valavanisalex/ubuntu/maverick/scidavis/fix-604811

« back to all changes in this revision

Viewing changes to scidavis/src/future/lib/macros.h

  • Committer: Bazaar Package Importer
  • Author(s): Ruben Molina
  • Date: 2009-09-06 11:34:04 UTC
  • Revision ID: james.westby@ubuntu.com-20090906113404-4awaey82l3686w4q
Tags: upstream-0.2.3
ImportĀ upstreamĀ versionĀ 0.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
    File                 : macros.h
 
3
    Project              : SciDAVis
 
4
    Description          : Various preprocessor macros
 
5
    --------------------------------------------------------------------
 
6
    Copyright            : (C) 2008-2009 Tilman Benkert (thzs*gmx.net)
 
7
    Copyright            : (C) 2008-2009 Knut Franke (knut.franke*gmx.de)
 
8
                           (replace * with @ in the email addresses) 
 
9
                           
 
10
 ***************************************************************************/
 
11
 
 
12
/***************************************************************************
 
13
 *                                                                         *
 
14
 *  This program is free software; you can redistribute it and/or modify   *
 
15
 *  it under the terms of the GNU General Public License as published by   *
 
16
 *  the Free Software Foundation; either version 2 of the License, or      *
 
17
 *  (at your option) any later version.                                    *
 
18
 *                                                                         *
 
19
 *  This program is distributed in the hope that it will be useful,        *
 
20
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
 
21
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
 
22
 *  GNU General Public License for more details.                           *
 
23
 *                                                                         *
 
24
 *   You should have received a copy of the GNU General Public License     *
 
25
 *   along with this program; if not, write to the Free Software           *
 
26
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
 
27
 *   Boston, MA  02110-1301  USA                                           *
 
28
 *                                                                         *
 
29
 ***************************************************************************/
 
30
 
 
31
#ifndef MACROS_H
 
32
#define MACROS_H
 
33
 
 
34
#define BASIC_ACCESSOR(type, var, method, Method) \
 
35
        type method() const { return var; }; \
 
36
        void set ## Method(const type value) { var = value; }
 
37
#define CLASS_ACCESSOR(type, var, method, Method) \
 
38
        type method() const { return var; }; \
 
39
        void set ## Method(const type & value) { var = value; }
 
40
 
 
41
#endif // MACROS_H