IMP logo
IMP Reference Guide  2.20.0
The Integrative Modeling Platform
tuple_macros.h File Reference

Macros to help in defining tuple classes. More...

#include <IMP/kernel_config.h>
#include "Value.h"
#include "Showable.h"
#include "hash.h"
#include "hash_macros.h"
#include "showable_macros.h"
#include "value_macros.h"
#include "comparison_macros.h"
#include "swig_macros.h"
+ Include dependency graph for tuple_macros.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IMP_TUPLE_VALUE(Name, type_name, data_name, var_name)
 

Named tuples

It is often useful to declare little structures to aid in the passing of arguments by name or returning sets of values. One can use boost::tuples, but these don't have names for their parts and so don't lead to clear code. Instead we provide a macro to aid declaring such classes. The resulting class is hashable and comparable too.

#define IMP_NAMED_TUPLE_1(Name, Names, type0, var0, invariant)
 
#define IMP_NAMED_TUPLE_2(Name, Names, type0, var0, type1, var1, invariant)
 
#define IMP_NAMED_TUPLE_3(Name, Names, type0, var0, type1, var1, type2, var2, invariant)
 
#define IMP_NAMED_TUPLE_4(Name, Names, type0, var0, type1, var1, type2, var2, type3, var3, invariant)
 
#define IMP_NAMED_TUPLE_5(Name, Names, type0, var0, type1, var1, type2, var2, type3, var3, type4, var4, invariant)
 

Detailed Description

Macros to help in defining tuple classes.

Copyright 2007-2022 IMP Inventors. All rights reserved.

Definition in file tuple_macros.h.

Macro Definition Documentation

#define IMP_TUPLE_VALUE (   Name,
  type_name,
  data_name,
  var_name 
)

Implementation macro

Definition at line 22 of file tuple_macros.h.