GraphLab: Distributed Graph-Parallel API  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
macros_def.hpp
1 /**
2  * Copyright (c) 2009 Carnegie Mellon University.
3  * All rights reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing,
12  * software distributed under the License is distributed on an "AS
13  * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14  * express or implied. See the License for the specific language
15  * governing permissions and limitations under the License.
16  *
17  * For more about this software visit:
18  *
19  * http://www.graphlab.ml.cmu.edu
20  *
21  */
22 
23 
24 #include <boost/foreach.hpp>
25 #include <stdint.h>
26 
27 // if GNUC is available, this checks if the file which included
28 // macros_def.hpp is the same file which included macros_undef.hpp
29 #ifdef __GNUC__
30 #define GRAPHLAB_MACROS_INC_LEVEL __INCLUDE_LEVEL__
31 #endif
32 
33 
34 // prevent this file from being included before other graphlab headers
35 #ifdef GRAPHLAB_MACROS
36 #error "Repeated include of <macros_def.hpp>. This probably means that macros_def.hpp was not the last include, or some header file failed to include <macros_undef.hpp>"
37 #endif
38 
39 #define GRAPHLAB_MACROS
40 
41 /** A macro to disallow the copy constructor and operator= functions
42  This should be used in the private: declarations for a class */
43 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \
44 TypeName(const TypeName&); \
45 void operator=(const TypeName&);
46 
47 
48 
49 // Shortcut macro definitions
50 //! see http://www.boost.org/doc/html/foreach.html
51 #define foreach BOOST_FOREACH
52 
53 #define rev_foreach BOOST_REVERSE_FOREACH
54 
55 
56 
57