Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
CTA-LAPP
PHOENIX_LIBS
PhoenixHDF5
Commits
55314389
Commit
55314389
authored
Dec 03, 2020
by
Pierre Aubert
Browse files
Add read/write method with string as filename
parent
cf4d736b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
share/Highlighting/CMakeLists.txt
share/Highlighting/CMakeLists.txt
+2
-2
src/BackEnd/backend.cpp
src/BackEnd/backend.cpp
+18
-0
No files found.
share/Highlighting/CMakeLists.txt
View file @
55314389
project
(
P
LIBS_9
)
project
(
P
hoenix
)
cmake_minimum_required
(
VERSION 3.0
)
install
(
FILES p
data
.xml DESTINATION $ENV{HOME}/.local/share/org.kde.syntax-highlighting/syntax/
)
install
(
FILES p
h5
.xml DESTINATION $ENV{HOME}/.local/share/org.kde.syntax-highlighting/syntax/
)
src/BackEnd/backend.cpp
View file @
55314389
...
...
@@ -228,9 +228,11 @@ std::string ph5_backendTableHeader(PTable & table){
body
+=
"
\t\t
void resize(size_t nbRow);
\n
"
;
body
+=
"
\t\t
void clear();
\n\n
"
;
body
+=
"
\t\t
void read(const std::string & fileName);
\n
"
;
body
+=
"
\t\t
void read(const H5::H5File & file);
\n
"
;
body
+=
"
\t\t
void read(const H5::Group & group);
\n\n
"
;
body
+=
"
\t\t
void write(const std::string & fileName) const;
\n
"
;
body
+=
"
\t\t
void write(H5::H5File & file) const;
\n
"
;
body
+=
"
\t\t
void 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
+=
"
\t
H5::H5File file(fileName, H5F_ACC_RDONLY);
\n
"
;
body
+=
"
\t
read(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
+=
"
\t
H5::H5File file(fileName, H5F_ACC_TRUNC);
\n
"
;
body
+=
"
\t
write(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
"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment