// Autogenerated by tools\build\make_containers.py
// from tools\build\container_templates\container\ClassnamesOptimizerState.h
// Do not edit - any changes will be lost!

/**
 *  \file IMP/container/PairsOptimizerState.h
 *  \brief Use a PairModifier applied to a ParticlePairsTemp to
 *  maintain an invariant
 *
 *  Copyright 2007-2021 IMP Inventors. All rights reserved.
 */

#ifndef IMPCONTAINER_PAIRS_OPTIMIZER_STATE_H
#define IMPCONTAINER_PAIRS_OPTIMIZER_STATE_H

#include <IMP/container/container_config.h>
#include <IMP/PairContainer.h>
#include <IMP/PairModifier.h>
#include <IMP/OptimizerState.h>
#include <IMP/Pointer.h>

IMPKERNEL_BEGIN_NAMESPACE
// for swig
class PairContainer;
class PairModifier;
IMPKERNEL_END_NAMESPACE

IMPCONTAINER_BEGIN_NAMESPACE
//! Apply a PairFunction to a PairContainer to maintain an invariant
/** \ingroup restraint
    \see PairOptimizerState
 */
class IMPCONTAINEREXPORT PairsOptimizerState : public OptimizerState {
  IMP::PointerMember<PairModifier> f_;
  IMP::PointerMember<PairContainer> c_;

 public:
  /** \param[in] c The Container to hold the elements to process
      \param[in] gf The PairModifier to apply to all elements.
      \param[in] name The name to use for this Object
   */
  PairsOptimizerState(PairContainerAdaptor c, PairModifier *gf,
                           std::string name = "PairsOptimizerState %1%");

  virtual void update() IMP_OVERRIDE;
  IMP_OBJECT_METHODS(PairsOptimizerState);
};

IMP_OBJECTS(PairsOptimizerState, PairsOptimizerStates);

IMPCONTAINER_END_NAMESPACE

#endif /* IMPCONTAINER_PAIRS_OPTIMIZER_STATE_H */
