Wildmeshing Toolkit
MappableContainer.hpp
Go to the documentation of this file.
1 #pragma once
2 #include "Mappable.hpp"
3 
4 namespace wmtk::multimesh {
5 class MappableContainer : public Mappable
6 {
7 public:
8  MappableContainer(const Mesh& m);
13  ~MappableContainer() = default;
14 
15 
16  virtual std::vector<std::shared_ptr<Mappable>> mappables() = 0;
17 
18  void add(std::shared_ptr<Mappable> mappable);
19 
20  const std::shared_ptr<Mappable>& get(int64_t index) const;
21  int64_t size() const;
22  bool empty() const;
23 
24  std::map<Mesh const*, std::vector<std::shared_ptr<Mappable>>> get_map_mesh_to_invariants();
25 
26 private:
27  std::vector<std::shared_ptr<Mappable>> m_mappables;
28 };
29 
30 } // namespace wmtk::multimesh
MappableContainer(const MappableContainer &)=default
MappableContainer(MappableContainer &&)=default
std::map< Mesh const *, std::vector< std::shared_ptr< Mappable > > > get_map_mesh_to_invariants()
void add(std::shared_ptr< Mappable > mappable)
const std::shared_ptr< Mappable > & get(int64_t index) const
virtual std::vector< std::shared_ptr< Mappable > > mappables()=0
MappableContainer & operator=(const MappableContainer &)
MappableContainer & operator=(MappableContainer &&)
std::vector< std::shared_ptr< Mappable > > m_mappables