9#ifndef IMPKERNEL_CONTAINER_BASE_H
10#define IMPKERNEL_CONTAINER_BASE_H
12#include <IMP/kernel_config.h>
20#include <cereal/access.hpp>
21#include <cereal/types/base_class.hpp>
23IMPKERNEL_BEGIN_NAMESPACE
46class IMPKERNELEXPORT Container :
public ModelObject {
47#if IMP_HAS_CHECKS >= IMP_INTERNAL
52 friend class cereal::access;
54 template<
class Archive>
void serialize(Archive &ar) {
55#if IMP_HAS_CHECKS < IMP_INTERNAL
57 bool readable_ =
true, writeable_ =
true;
59 ar(cereal::base_class<ModelObject>(
this), readable_, writeable_);
63 Container(Model *m, std::string name =
"Container %1%");
66 virtual std::size_t do_get_contents_hash()
const = 0;
90#if !defined(IMP_DOXYGEN)
92 void validate_readable()
const;
93 void validate_writable()
const;
94 void set_is_readable(
bool tf);
95 void set_is_writable(
bool tf);
101IMPKERNEL_END_NAMESPACE
Base class for objects in a Model that depend on other objects.
A shared base class to help in debugging and things.
A weak pointer to an Object or RefCountedObject.
Abstract class for containers of particles.
virtual ParticleIndexes get_all_possible_indexes() const =0
Get contained particles.
virtual bool get_is_decomposable() const
ModelObjectsTemp do_get_outputs() const override
containers don't have outputs
std::size_t get_contents_hash() const
Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
A list of particles, each identified by its ParticleIndex.
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Functions and adaptors for dealing with particle indexes.
Macros to help with reference counting.
#define IMP_REF_COUNTED_DESTRUCTOR(Name)
Set up destructor for a ref counted object.
Various general useful macros for IMP.