IMP  2.0.0
The Integrative Modeling Platform
kernel/score_state_macros.h
Go to the documentation of this file.
1 /**
2  * \file IMP/kernel/score_state_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 IMPKERNEL_SCORE_STATE_MACROS_H
10 #define IMPKERNEL_SCORE_STATE_MACROS_H
11 #include <IMP/kernel/kernel_config.h>
12 #include <IMP/base/value_macros.h>
13 #include "ScoreState.h"
14 #include "container_base.h"
15 #include "input_output_macros.h"
16 
17 
18 
19 //! For backwards compatibility
20 #define IMP_SCORE_STATE(Name) \
21  protected: \
22  virtual void do_before_evaluate(); \
23  virtual void do_after_evaluate(DerivativeAccumulator *da); \
24  IMP_MODEL_OBJECT_BACKWARDS_MACRO_INPUTS; \
25  IMP_MODEL_OBJECT_BACKWARDS_MACRO_OUTPUTS; \
26  IMP_OBJECT(Name)
27 
28 
29 //! For backwards compatibility
30 #define IMP_CONSTRAINT(Name) \
31  protected: \
32  void do_update_attributes(); \
33  void do_update_derivatives(DerivativeAccumulator *da); \
34  IMP_MODEL_OBJECT_BACKWARDS_MACRO_INPUTS; \
35  IMP_MODEL_OBJECT_BACKWARDS_MACRO_OUTPUTS; \
36  IMP_OBJECT(Name)
37 
38 #if IMP_HAS_DEPRECATED
39 //! For backwards compatibility
40 #define IMP_SCORE_STATE_2(Name) \
41  protected: \
42  virtual void do_before_evaluate(); \
43  virtual void do_after_evaluate(DerivativeAccumulator *da); \
44  virtual ModelObjectsTemp do_get_inputs() const; \
45  virtual ModelObjectsTemp do_get_outputs() const; \
46  IMP_OBJECT(Name)
47 
48 
49 //! For backwards compatibility
50 #define IMP_CONSTRAINT_2(Name) \
51  protected: \
52  void do_update_attributes(); \
53  void do_update_derivatives(DerivativeAccumulator *da); \
54  virtual ModelObjectsTemp do_get_inputs() const; \
55  virtual ModelObjectsTemp do_get_outputs() const; \
56  IMP_OBJECT(Name)
57 #endif
58 
59 #endif /* IMPKERNEL_SCORE_STATE_MACROS_H */