IMP  2.0.1
The Integrative Modeling Platform
bracket_macros.h File Reference

Various general useful macros for IMP. More...

#include <IMP/base/base_config.h>
+ Include dependency graph for bracket_macros.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IMP_BRACKET(Value, Index, bounds_check_expr, expr)
 
#define IMP_CONST_BRACKET(Value, Index, bounds_check_expr, expr)   const Value operator[](Index) const;
 

Detailed Description

Copyright 2007-2013 IMP Inventors. All rights reserved.

Definition in file bracket_macros.h.

Macro Definition Documentation

#define IMP_BRACKET (   Value,
  Index,
  bounds_check_expr,
  expr 
)
Value:
const Value operator[](Index) const; \
Value& operator[](Index);

Implement operator[] for C++ and python. The index type is Index and the expression that returns the value is expr. If the bounds_check_expr is false, then a UsageException is thrown in C++ or and IndexException if called from python.

Definition at line 20 of file bracket_macros.h.

#define IMP_CONST_BRACKET (   Value,
  Index,
  bounds_check_expr,
  expr 
)    const Value operator[](Index) const;

Implement operator[] for C++ and python. The index type is Index and the expression that returns the value is expr. The value returned is not mutable. If the bounds_check_expr is false, then a UsageException is thrown in C++ or and IndexException if called from python.

Definition at line 30 of file bracket_macros.h.