viz_output.h 916 B

123456789101112131415161718192021222324252627282930313233343536373839
  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_VIZ_OUTPUT_H
  12. #define API_VIZ_OUTPUT_H
  13. #include "generated/gen_viz_output.h"
  14. #include "api/api_common.h"
  15. namespace MCell {
  16. namespace API {
  17. class VizOutput: public GenVizOutput {
  18. public:
  19. VIZ_OUTPUT_CTOR()
  20. void check_semantics() const override {
  21. GenVizOutput::check_semantics();
  22. if (every_n_timesteps < 0) {
  23. throw ValueError(
  24. S("The value of ") + NAME_EVERY_N_TIMESTEPS + " must not be less than 0.");
  25. }
  26. }
  27. };
  28. } // namespace API
  29. } // namespace MCell
  30. #endif // API_VIZ_OUTPUT_H