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

/**
 *  \file IMP/container/DynamicListSingletonContainer.h
 *  \brief Store a list of ParticlesTemp
 *
 *  Copyright 2007-2021 IMP Inventors. All rights reserved.
 */

#ifndef IMPCONTAINER_DYNAMIC_LIST_SINGLETON_CONTAINER_H
#define IMPCONTAINER_DYNAMIC_LIST_SINGLETON_CONTAINER_H

#include <IMP/container/container_config.h>
#include <IMP/object_macros.h>
#include <IMP/internal/DynamicListContainer.h>

IMPCONTAINER_BEGIN_NAMESPACE

//! Store a ParticleIndexes
/** In contrast to ListSingletonContainer, this list is designed to act
    as the output of a ScoreState or another container. The key difference
    is that it uses the passed Container to define the list of all
    possible contents of the container.
 */
class IMPCONTAINEREXPORT DynamicListSingletonContainer :
#if defined(IMP_DOXYGEN) || defined(SWIG)
    public SingletonContainer
#else
    public IMP::internal::DynamicListContainer<SingletonContainer>
#endif
    {
  typedef IMP::internal::DynamicListContainer<SingletonContainer> P;

 public:
  /** Constructs the dynamic list

      @param scope a container with a list of all possible particles that
                   are allowed to be dynamically added or removed in this
                   container
      @param name  the name of this container
  */
  DynamicListSingletonContainer(Container *scope, std::string name =
                                                  "ListSingletonContainer %1%");

  /** @name Methods to control the contained objects

      This container stores a list of Singleton objects. To manipulate
      the list use these methods.
   */
  /**@{*/
#if defined(SWIG) || defined(IMP_DOXYGEN)
  //! Add a single ParticleIndex to the container.
  void add(ParticleIndex vt);

  //! Add ParticleIndexes to the container.
  void add(const ParticleIndexes &c);

  //! Set the contents of the container to the given ParticleIndexes.
  void set(ParticleIndexes cp);

  //! Clear the contents of the container.
  void clear();
#endif

/**@}*/
#ifdef SWIG
  ParticleIndexes get_indexes() const;
  ParticleIndexes get_range_indexes() const;
  ModelObjectsTemp do_get_inputs() const;
  void do_apply(const SingletonModifier *sm) const;
  ParticleIndexes get_all_possible_indexes() const;
#endif
  IMP_OBJECT_METHODS(DynamicListSingletonContainer);
};

IMP_OBJECTS(DynamicListSingletonContainer, DynamicListSingletonContainers);

IMPCONTAINER_END_NAMESPACE

#endif /* IMPCONTAINER_DYNAMIC_LIST_SINGLETON_CONTAINER_H */
