00001 /** 00002 * \file StateAdaptor.h 00003 * \brief XXXXXXXXXXXXXX 00004 * 00005 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00006 */ 00007 00008 #ifndef IMPMISC_STATE_ADAPTOR_H 00009 #define IMPMISC_STATE_ADAPTOR_H 00010 00011 #include "misc_config.h" 00012 00013 #include <IMP/OptimizerState.h> 00014 #include <IMP/ScoreState.h> 00015 00016 IMPMISC_BEGIN_NAMESPACE 00017 00018 //! Allow OptimizerStates to be used as ScoreStates 00019 /** You can have up to two, one for before, and one for after. 00020 */ 00021 class IMPMISCEXPORT StateAdaptor: public ScoreState 00022 { 00023 IMP::internal::OwnerPointer<OptimizerState> before_, after_; 00024 public: 00025 //! set the before and after states 00026 StateAdaptor(OptimizerState *before, OptimizerState *after); 00027 00028 IMP_SCORE_STATE(StateAdaptor); 00029 }; 00030 00031 00032 IMPMISC_END_NAMESPACE 00033 00034 #endif /* IMPMISC_STATE_ADAPTOR_H */