gen_wall_wall_hit_info.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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_WALL_WALL_HIT_INFO_H
  12. #define API_GEN_WALL_WALL_HIT_INFO_H
  13. #include "api/api_common.h"
  14. #include "api/base_introspection_class.h"
  15. namespace MCell {
  16. namespace API {
  17. class WallWallHitInfo;
  18. class Wall;
  19. class PythonExportContext;
  20. #define WALL_WALL_HIT_INFO_CTOR_NOARGS() \
  21. WallWallHitInfo( \
  22. ) { \
  23. class_name = "WallWallHitInfo"; \
  24. wall1 = nullptr; \
  25. wall2 = nullptr; \
  26. postprocess_in_ctor(); \
  27. check_semantics(); \
  28. } \
  29. WallWallHitInfo(DefaultCtorArgType) : \
  30. GenWallWallHitInfo(DefaultCtorArgType()) { \
  31. set_all_attributes_as_default_or_unset(); \
  32. set_all_custom_attributes_to_default(); \
  33. }
  34. class GenWallWallHitInfo: public BaseIntrospectionClass {
  35. public:
  36. GenWallWallHitInfo() {
  37. }
  38. GenWallWallHitInfo(DefaultCtorArgType) {
  39. }
  40. void postprocess_in_ctor() override {}
  41. void check_semantics() const override;
  42. void set_initialized() override;
  43. void set_all_attributes_as_default_or_unset() override;
  44. std::shared_ptr<WallWallHitInfo> copy_wall_wall_hit_info() const;
  45. std::shared_ptr<WallWallHitInfo> deepcopy_wall_wall_hit_info(py::dict = py::dict()) const;
  46. virtual bool __eq__(const WallWallHitInfo& other) const;
  47. virtual bool eq_nonarray_attributes(const WallWallHitInfo& other, const bool ignore_name = false) const;
  48. bool operator == (const WallWallHitInfo& other) const { return __eq__(other);}
  49. bool operator != (const WallWallHitInfo& other) const { return !__eq__(other);}
  50. std::string to_str(const bool all_details=false, const std::string ind="") const override;
  51. // --- attributes ---
  52. std::shared_ptr<Wall> wall1;
  53. virtual void set_wall1(std::shared_ptr<Wall> new_wall1_) {
  54. if (initialized) {
  55. throw RuntimeError("Value 'wall1' of object with name " + name + " (class " + class_name + ") "
  56. "cannot be set after model was initialized.");
  57. }
  58. cached_data_are_uptodate = false;
  59. wall1 = new_wall1_;
  60. }
  61. virtual std::shared_ptr<Wall> get_wall1() const {
  62. cached_data_are_uptodate = false; // arrays and other data can be modified through getters
  63. return wall1;
  64. }
  65. std::shared_ptr<Wall> wall2;
  66. virtual void set_wall2(std::shared_ptr<Wall> new_wall2_) {
  67. if (initialized) {
  68. throw RuntimeError("Value 'wall2' of object with name " + name + " (class " + class_name + ") "
  69. "cannot be set after model was initialized.");
  70. }
  71. cached_data_are_uptodate = false;
  72. wall2 = new_wall2_;
  73. }
  74. virtual std::shared_ptr<Wall> get_wall2() const {
  75. cached_data_are_uptodate = false; // arrays and other data can be modified through getters
  76. return wall2;
  77. }
  78. // --- methods ---
  79. }; // GenWallWallHitInfo
  80. class WallWallHitInfo;
  81. py::class_<WallWallHitInfo> define_pybinding_WallWallHitInfo(py::module& m);
  82. } // namespace API
  83. } // namespace MCell
  84. #endif // API_GEN_WALL_WALL_HIT_INFO_H