gen_introspection.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /******************************************************************************
  2. *
  3. * Copyright (C) 2021 by
  4. * The Salk Institute for Biological Studies
  5. *
  6. * Use of this source code is governed by an MIT-style
  7. * license that can be found in the LICENSE file or at
  8. * https://opensource.org/licenses/MIT.
  9. *
  10. ******************************************************************************/
  11. #ifndef API_GEN_INTROSPECTION_H
  12. #define API_GEN_INTROSPECTION_H
  13. #include "api/api_common.h"
  14. namespace MCell {
  15. namespace API {
  16. class Introspection;
  17. class Color;
  18. class Complex;
  19. class GeometryObject;
  20. class Molecule;
  21. class Wall;
  22. class PythonExportContext;
  23. class GenIntrospection {
  24. public:
  25. GenIntrospection() {
  26. }
  27. GenIntrospection(DefaultCtorArgType) {
  28. }
  29. virtual ~GenIntrospection() {}
  30. std::shared_ptr<Introspection> copy_introspection() const;
  31. std::shared_ptr<Introspection> deepcopy_introspection(py::dict = py::dict()) const;
  32. virtual bool __eq__(const Introspection& other) const;
  33. virtual bool eq_nonarray_attributes(const Introspection& other, const bool ignore_name = false) const;
  34. bool operator == (const Introspection& other) const { return __eq__(other);}
  35. bool operator != (const Introspection& other) const { return !__eq__(other);}
  36. std::string to_str(const bool all_details=false, const std::string ind="") const ;
  37. // --- attributes ---
  38. // --- methods ---
  39. virtual std::vector<int> get_molecule_ids(std::shared_ptr<Complex> pattern = nullptr) = 0;
  40. virtual std::shared_ptr<Molecule> get_molecule(const int id) = 0;
  41. virtual std::string get_species_name(const int species_id) = 0;
  42. virtual std::vector<double> get_vertex(std::shared_ptr<GeometryObject> object, const int vertex_index) = 0;
  43. virtual std::shared_ptr<Wall> get_wall(std::shared_ptr<GeometryObject> object, const int wall_index) = 0;
  44. virtual std::vector<double> get_vertex_unit_normal(std::shared_ptr<GeometryObject> object, const int vertex_index) = 0;
  45. virtual std::vector<double> get_wall_unit_normal(std::shared_ptr<GeometryObject> object, const int wall_index) = 0;
  46. virtual std::shared_ptr<Color> get_wall_color(std::shared_ptr<GeometryObject> object, const int wall_index) = 0;
  47. virtual void set_wall_color(std::shared_ptr<GeometryObject> object, const int wall_index, std::shared_ptr<Color> color) = 0;
  48. }; // GenIntrospection
  49. class Introspection;
  50. py::class_<Introspection> define_pybinding_Introspection(py::module& m);
  51. } // namespace API
  52. } // namespace MCell
  53. #endif // API_GEN_INTROSPECTION_H