surface_region.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /******************************************************************************
  2. *
  3. * Copyright (C) 2020 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_SURFACE_REGION_H
  12. #define API_SURFACE_REGION_H
  13. #include "generated/gen_surface_region.h"
  14. #include "api/api_common.h"
  15. #include "defines.h"
  16. namespace MCell {
  17. namespace API {
  18. class GeometryObject;
  19. class SurfaceRegion: public GenSurfaceRegion {
  20. public:
  21. SURFACE_REGION_CTOR()
  22. void postprocess_in_ctor() {
  23. set_all_custom_attributes_to_default();
  24. }
  25. void set_all_custom_attributes_to_default() override {
  26. Region::set_all_custom_attributes_to_default();
  27. region_type = RegionType::SURFACE;
  28. region_id = REGION_ID_INVALID;
  29. node_type = RegionNodeType::LEAF_SURFACE_REGION;
  30. parent = nullptr;
  31. }
  32. // set during model initialization
  33. GeometryObject* parent;
  34. // simulation engine mapping
  35. region_id_t region_id;
  36. };
  37. } // namespace API
  38. } // namespace MCell
  39. #endif // API_SURFACE_REGION_H