IMP Reference Guide
2.10.0
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... | |
Various general useful macros for IMP.
Copyright 2007-2018 IMP Inventors. All rights reserved.
Definition in file comparison_macros.h.
#define IMP_COMPARE_ONE | ( | vara, | |
varb | |||
) |
Compare one value and return -1 or 1 as appropriate. If they are equal, control returns to the current scope.
Definition at line 218 of file comparison_macros.h.
#define IMP_COMPARISONS | ( | Name | ) |
Implement comparison in a class using a compare function.
The compare function should take a const Name & and return -1, 0, 1 as appropriate.
Definition at line 27 of file comparison_macros.h.
#define IMP_COMPARISONS_1 | ( | Name, | |
field | |||
) |
Implement comparison in a class using field as the variable to compare.
[in] | Name | the name of the class |
[in] | field | the first field to compare on |
Definition at line 33 of file comparison_macros.h.
#define IMP_COMPARISONS_2 | ( | Name, | |
f0, | |||
f1 | |||
) |
Implement comparison in a class using field as the variable to compare.
[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 comparison_macros.h.
#define IMP_COMPARISONS_3 | ( | Name, | |
f0, | |||
f1, | |||
f2 | |||
) |
Implement comparison in a class using field as the variable to compare.
[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 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 203 of file comparison_macros.h.