Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00056 #ifndef __FLUIDXWRITER_HPP__
00057 #define __FLUIDXWRITER_HPP__
00058
00059 #include <string>
00060
00061 #include <openfluid/dllexport.hpp>
00062 #include <openfluid/base/GeneratorDescriptor.hpp>
00063 #include <openfluid/core/InstantiationInfo.hpp>
00064
00065 namespace openfluid {
00066 namespace base {
00067 class RunDescriptor;
00068 class OutputDescriptor;
00069 }
00070 namespace core {
00071 class CoreRepository;
00072 }
00073 namespace machine {
00074 class ModelInstance;
00075 }
00076 }
00077
00078
00079 namespace openfluid { namespace io {
00080
00081 class IOListener;
00082
00083
00084 class DLLEXPORT FluidXWriter
00085 {
00086 private:
00087
00088 std::string m_ModelStr;
00089 std::string m_RunStr;
00090 std::string m_DomainStr;
00091 std::string m_OutputStr;
00092
00093 std::string m_IndentStr;
00094
00095 openfluid::io::IOListener* mp_Listener;
00096
00097 void prepareOutputDir(std::string DirPath);
00098
00099 std::string getGeneratorMethodAsStr(openfluid::base::GeneratorDescriptor::GeneratorMethod Method) const;
00100
00101 std::string getParamsAsStr(const openfluid::core::FuncParamsMap_t& Params) const;
00102
00103 openfluid::core::InstantiationInfo::Type m_InstType;
00104
00105 public:
00106
00107
00108 FluidXWriter(openfluid::io::IOListener* Listener);
00109
00110 ~FluidXWriter();
00111
00112 void setModelToWrite(openfluid::machine::ModelInstance& MInstance);
00113
00114 void setRunConfigurationToWrite(openfluid::base::RunDescriptor& RDescriptor);
00115
00116 void setDomainToWrite(const openfluid::core::CoreRepository& CoreData);
00117
00118 void setOutputConfigurationToWrite(openfluid::base::OutputDescriptor& ODescriptor);
00119
00120 void setInstantiationType(const openfluid::core::InstantiationInfo::Type& InstType)
00121 { m_InstType = InstType; };
00122
00123 void WriteToManyFiles(std::string DirPath);
00124
00125 void WriteToSingleFile(std::string FilePath);
00126
00127 };
00128
00129 } }
00130
00131
00132 #endif
00133