savestate.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ///////////////////////////////////////////////////////////////////////////////////////
  2. /// \file savestate.h
  3. /// \brief Help functions for serialization
  4. ///
  5. /// Contains a couple of functions for creating the serializer and deserializer
  6. /// objects. Takes care of for instance creating/finding a directory for the state
  7. /// files, corresponding to a base directory and a date.
  8. ///
  9. /// $Date$
  10. ///
  11. ///////////////////////////////////////////////////////////////////////////////////////
  12. #ifndef LPJ_GUESS_SAVESTATE_H
  13. #define LPJ_GUESS_SAVESTATE_H
  14. #include "guess.h"
  15. #include "guessserializer.h"
  16. /// ecev3 - copied from RCA branch. We assume that the state is always saved on Dec 31.
  17. /// Creates a serializer object for a given base directory and date
  18. /** It is up to the receiver to make sure that the object gets deleted. */
  19. GuessSerializer* create_serializer(xtring state_dir,
  20. xtring state_name,
  21. int calendar_year,
  22. //int month,
  23. //int dayofmonth,
  24. int instance,
  25. int num_processes);
  26. /// Creates a deserializer object for a given base directory and date
  27. /** Returns a null pointer if the directory for the state files doesn't
  28. * exist.
  29. * It is up to the receiver to make sure that the object gets deleted. */
  30. GuessDeserializer* create_deserializer(xtring state_dir,
  31. xtring state_name,
  32. int calendar_year
  33. //int month,
  34. //int dayofmonth
  35. );
  36. #endif // LPJ_GUESS_SAVESTATE_H