mbdr.hpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /**************************************************************
  2. *
  3. * mbdr is a wrapper to extract information from binary mcell data files
  4. *
  5. * (c) 2008 Markus Dittrich
  6. *
  7. * This program is free software; you can redistribute it
  8. * and/or modify it under the terms of the GNU General Public
  9. * License Version 3 as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License Version 3 for more details.
  15. *
  16. * You should have received a copy of the GNU General Public
  17. * License along with this program; if not, write to the Free
  18. * Software Foundation, Inc., 59 Temple Place - Suite 330,
  19. * Boston, MA 02111-1307, USA.
  20. *
  21. **************************************************************/
  22. /** STL headers */
  23. #include <fstream>
  24. #include <string>
  25. #include <vector>
  26. /* forward declarations */
  27. class file_object;
  28. /* main routine for writing a data set to stdout or disk */
  29. template<typename T> void write_data(
  30. const std::vector<std::vector<double> >& data,
  31. const std::vector<uint16_t>& data_types,
  32. const std::vector<T>& times,
  33. std::string file_name = "");
  34. /* return a vector with the time points or iterations numbers
  35. * for each iteration based on the time step */
  36. std::vector<double> setup_time_list(const IO& file_object);
  37. std::vector<int> setup_iteration_list(const IO& file_object);
  38. /* punch usage information */
  39. void usage();
  40. /* punch file info */
  41. void display_file_info(const IO& file_object);
  42. /* display block names */
  43. void display_block_names(const IO& file_object);
  44. /* display data by ID */
  45. void display_data_by_id(const IO& file_object,
  46. std::string selectionString, bool print_times, bool write_file);
  47. /* display data by name */
  48. void display_data_by_name(const IO& file_object,
  49. std::string selectionString, bool print_times, bool write_file);
  50. /* display data by name */
  51. void display_data_by_regex(const IO& file_object,
  52. std::string selectionString, bool print_times, bool write_file);