Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 55314389 authored by Pierre Aubert's avatar Pierre Aubert
Browse files

Add read/write method with string as filename

parent cf4d736b
project(PLIBS_9)
project(Phoenix)
cmake_minimum_required(VERSION 3.0)
install(FILES pdata.xml DESTINATION $ENV{HOME}/.local/share/org.kde.syntax-highlighting/syntax/)
install(FILES ph5.xml DESTINATION $ENV{HOME}/.local/share/org.kde.syntax-highlighting/syntax/)
......@@ -228,9 +228,11 @@ std::string ph5_backendTableHeader(PTable & table){
body += "\t\tvoid resize(size_t nbRow);\n";
body += "\t\tvoid clear();\n\n";
body += "\t\tvoid read(const std::string & fileName);\n";
body += "\t\tvoid read(const H5::H5File & file);\n";
body += "\t\tvoid read(const H5::Group & group);\n\n";
body += "\t\tvoid write(const std::string & fileName) const;\n";
body += "\t\tvoid write(H5::H5File & file) const;\n";
body += "\t\tvoid write(H5::Group & group) const;\n\n";
......@@ -343,6 +345,14 @@ std::string ph5_backendTableSourceClear(PTable & table){
*/
std::string ph5_backendTableSourceRead(const PTable & table){
std::string body(""), name(table.getName());
body += "///Read the table " + name + " from given file\n";
body += "/**\t@param fileName : name of the HDF5 file to be used\n";
body += "*/\n";
body += "void " + name + "::read(const std::string & fileName){\n";
body += "\tH5::H5File file(fileName, H5F_ACC_RDONLY);\n";
body += "\tread(file);\n";
body += "}\n\n";
body += "///Read the table " + name + " from given file\n";
body += "/**\t@param file : HDF5 file to be used\n";
body += "*/\n";
......@@ -367,6 +377,14 @@ std::string ph5_backendTableSourceRead(const PTable & table){
*/
std::string ph5_backendTableSourceWrite(const PTable & table){
std::string body(""), name(table.getName());
body += "///Create and write the table " + name + " in given file\n";
body += "/**\t@param fileName : name of the HDF5 file to be used\n";
body += "*/\n";
body += "void " + name + "::write(const std::string & fileName) const{\n";
body += "\tH5::H5File file(fileName, H5F_ACC_TRUNC);\n";
body += "\twrite(file);\n";
body += "}\n\n";
body += "///Create and write the table " + name + " in given file\n";
body += "/**\t@param file : HDF5 file to be used\n";
body += "*/\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment