molecule_release_info.h 932 B

123456789101112131415161718192021222324252627282930313233343536
  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_MOLECULE_RELEASE_INFO_H
  12. #define API_MOLECULE_RELEASE_INFO_H
  13. #include "generated/gen_molecule_release_info.h"
  14. #include "api/api_common.h"
  15. namespace MCell {
  16. namespace API {
  17. class MoleculeReleaseInfo: public GenMoleculeReleaseInfo {
  18. public:
  19. MOLECULE_RELEASE_INFO_CTOR()
  20. void check_semantics() const override {
  21. if (location.size() != 3) {
  22. throw ValueError(S("Value of ") + NAME_LOCATION + " must be a triplet of floats.");
  23. }
  24. }
  25. };
  26. } // namespace API
  27. } // namespace MCell
  28. #endif // API_MOLECULE_RELEASE_INFO_H