32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
37 const char* window_name,
38 const MPI_Comm *comm){
43 COM::Window* param_window = NULL;
45 param_window = rbase->get_window_object(whandle);
48 "Parameter window does not exist");
51 std::ofstream param_file(file_name);
53 "Specified parameter file can't be opened for writing.");
56 std::vector<Attribute*> atts;
57 param_window->attributes(atts);
61 for(uint
i =0,
ni = atts.size();
i<
ni; ++
i){
62 if(atts[
i]->location()==
'w'
64 && atts[
i]->size_of_components() == 1){
66 std::string
option = atts[
i]->name();
67 std::string value (
"");
68 value.assign((
const char*)atts[
i]->pointer(),
69 atts[
i]->size_of_items());
71 param_file << option <<
" = ";
73 if(value.find(
" ") != std::string::npos)
74 param_file <<
"\"" << value <<
"\"\n";
76 param_file << value <<
"\n";
Contains the wrapper routines for C++ binding of Roccom API.
void write_parameter_file(const char *file_name, const char *window_name, const MPI_Comm *comm=NULL)
Write out the parameters defined in the fiven window into a parameter file.
const char * option(const char *const name, const int argc, const char *const *const argv, const char *defaut, const char *const usage=0)
#define COM_assertion_msg(EX, msg)
Rocout creates a series of Roccom windows by reading in a list of files.
int COM_get_window_handle(const char *wname)
void int int REAL REAL REAL *z blockDim dim * ni
COM_END_NAME_SPACE COM::Roccom_base * COM_get_roccom()