IMP
2.2.1
The Integrative Modeling Platform
|
Various general useful macros for IMP. More...
Go to the source code of this file.
Macros | |
#define | IMP_COMPARE_ONE(vara, varb) |
#define | IMP_SAFE_BOOL(Name, expr) |
Comparisons | |
Helper macros for implementing comparisons in terms of either member variables or a member compare function. All of the <,>,== etc are implemented for both C++ and Python. | |
#define | IMP_COMPARISONS(Name) |
Implement comparison in a class using a compare function. More... | |
#define | IMP_COMPARISONS_1(Name, field) |
Implement comparison in a class using field as the variable to compare. More... | |
#define | IMP_COMPARISONS_2(Name, f0, f1) |
Implement comparison in a class using field as the variable to compare. More... | |
#define | IMP_COMPARISONS_3(Name, f0, f1, f2) |
Implement comparison in a class using field as the variable to compare. More... | |
Copyright 2007-2014 IMP Inventors. All rights reserved.
Definition in file base/comparison_macros.h.
#define IMP_COMPARE_ONE | ( | vara, | |
varb | |||
) |
Compare one value and return -1 or 1 as appriate. If they are equal, control returns to the current scope.
Definition at line 217 of file base/comparison_macros.h.
#define IMP_COMPARISONS | ( | Name | ) |
The compare function should take a const Name & and return -1, 0, 1 as appropriate.
Definition at line 27 of file base/comparison_macros.h.
#define IMP_COMPARISONS_1 | ( | Name, | |
field | |||
) |
[in] | Name | the name of the class |
[in] | field | the first field to compare on |
Definition at line 33 of file base/comparison_macros.h.
#define IMP_COMPARISONS_2 | ( | Name, | |
f0, | |||
f1 | |||
) |
[in] | Name | the name of the class |
[in] | f0 | the first field to compare on |
[in] | f1 | the second field to compare on |
Definition at line 40 of file base/comparison_macros.h.
#define IMP_COMPARISONS_3 | ( | Name, | |
f0, | |||
f1, | |||
f2 | |||
) |
[in] | Name | the name of the class |
[in] | f0 | the first field to compare on |
[in] | f1 | the second field to compare on |
[in] | f2 | the third field to compare on |
Definition at line 48 of file base/comparison_macros.h.
#define IMP_SAFE_BOOL | ( | Name, | |
expr | |||
) |
Implement the safe bool idiom in a class. The expression must evaluate to a boolean.
Definition at line 202 of file base/comparison_macros.h.