// ClusterContainerStandard.h #ifndef ClusterContainerStandard_H #define ClusterContainerStandard_H // Simple implementation of ClusterContainer that stores // clusters in a ClusterList. #include "ClusterContainer.h" namespace trf { class ClusterContainerStandard : public ClusterContainer { private: // data // The list of clusters. ClusterList _clusters; public: // methods // Default constructor. // Leaves the container empty. ClusterContainerStandard(); // Constructor which copies a list. explicit ClusterContainerStandard(const ClusterList clusters); // Return container size; size_type size() const {return _clusters.size();} // Add a cluster to the list. // The cluster is managed externally. //void add_cluster(const Cluster* pclus); // Return the cluster list. const ClusterList& get_clusters() const; // Return the cluster list mutable. ClusterList& get_clusters_mutable(); // Empty the container. void drop_clusters(); // Add a cluster to the collection. void add_cluster(const ClusterPtr& pclu); // Append clusters to the list. void add_clusters(const ClusterList& clusters); ClusterContainer* new_empty_container() const { return new ClusterContainerStandard;} }; } // end namespace trf #endif