stage.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
  2. /*
  3. * stage.h
  4. * Copyright (C) 2016 Fran??ois Gautrais <francois@gautrais.eu>
  5. *
  6. * histodex is free software: you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the
  8. * Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * histodex is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. * See the GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef _STAGE_H_
  20. #define _STAGE_H_
  21. #include <iostream>
  22. #include <json/json.h>
  23. #include "data.h"
  24. class Stage : public Data
  25. {
  26. public:
  27. Stage();
  28. Stage(Json::Value v);
  29. virtual ~Stage();
  30. const std::string& getResource();
  31. void setResource(const std::string& r);
  32. int getStage();
  33. void setStage(int stage);
  34. int getNRes();
  35. void setNRes(int res);
  36. Json::Value getJson(bool b=false);
  37. void set(Json::Value& v);
  38. void setTransition(bool b);
  39. bool getTransition();
  40. static Stage& cast(Data& d);
  41. protected:
  42. int m_stage;
  43. int m_nRes;
  44. std::string m_resource;
  45. bool m_transition;
  46. private:
  47. };
  48. #endif // _STAGE_H_