IMP  2.0.0
The Integrative Modeling Platform
value_macros.h
Go to the documentation of this file.
1 /**
2  * \file IMP/base/value_macros.h
3  * \brief Various general useful macros for IMP.
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPBASE_VALUE_MACROS_H
10 #define IMPBASE_VALUE_MACROS_H
11 #include <IMP/base/base_config.h>
12 #include "Vector.h"
13 
14 //! Define the type for storing sets of values
15 /** The macro defines the type Names. PluralName should be
16  Names unless the English spelling is
17  different. This macro also defines the output operator
18  for the type.
19 
20  See
21  \ref values "Value and Objects" for a description of what
22  it means to be an object vs a value in \imp.
23  */
24 #define IMP_VALUES(Name, PluralName) \
25  /** Pass or store a set of Name. */ \
26 typedef IMP::base::Vector<Name> PluralName
27 
28 
29 /** To be used with native types.*/
30 #define IMP_BUILTIN_VALUES(Name, PluralName) \
31  IMP_VALUES(Name, PluralName); \
32  IMP_VALUES(PluralName, PluralName##s)
33 
34 
35 
36 #endif /* IMPBASE_VALUE_MACROS_H */