Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdo
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
cdo
Commits
3a0fe64b
Commit
3a0fe64b
authored
6 months ago
by
Oliver Heidmann
Browse files
Options
Downloads
Patches
Plain Diff
implemented close for memory stream
parent
8df46092
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!289
M300433/python interaface integration 1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/memoryStream.cc
+23
-3
23 additions, 3 deletions
src/memoryStream.cc
src/memoryStream.h
+3
-0
3 additions, 0 deletions
src/memoryStream.h
with
26 additions
and
3 deletions
src/memoryStream.cc
+
23
−
3
View file @
3a0fe64b
...
...
@@ -27,11 +27,13 @@
MemoryStream
::
MemoryStream
(
int
p_ncid
)
:
FileStream
()
{
Debug
(
FILE_STREAM
,
"creating mem stream: p_ncid = %d"
,
ncid
);
ncid
=
p_ncid
;
m_fileID
=
p_ncid
;
}
MemoryStream
::
MemoryStream
(
int
p_ncid
,
int
cdi_id
)
:
FileStream
()
{
Debug
(
FILE_STREAM
,
"creating mem stream: p_ncid = %d, cdi_id = %d"
,
ncid
,
cdi_id
);
ncid
=
p_ncid
;
m_fileID
=
cdi_id
;
}
...
...
@@ -79,11 +81,29 @@ MemoryStream::open_write(int p_filetype)
void
MemoryStream
::
close
()
{
std
::
cout
<<
"ERROR"
<<
std
::
endl
;
std
::
cout
<<
"CLOSING MEM STREAM NOT IMPLEMENTED"
<<
std
::
endl
;
Debug
(
FILE_STREAM
,
"%s fileID %d"
,
m_name
,
m_fileID
);
m_nvals
=
streamNvals
(
m_fileID
);
streamCloseNCMem
(
m_fileID
);
isopen
=
false
;
m_vlistID
=
-
1
;
if
(
m_datarangelist
.
size
())
{
m_datarangelist
.
clear
();
m_datarangelist
.
shrink_to_fit
();
}
Debug
(
FILE_STREAM
,
"called close function of MemoryStream, this will do nothing, destruction is handled by deconstructor"
);
}
int
MemoryStream
::
get_id
(){
int
MemoryStream
::
get_id
()
{
Debug
(
FILE_STREAM
,
"getting id from memory stream"
);
return
ncid
;
}
This diff is collapsed.
Click to expand it.
src/memoryStream.h
+
3
−
0
View file @
3a0fe64b
...
...
@@ -20,6 +20,9 @@ public:
int
open_write
(
int
p_filetype
=
CDI_FILETYPE_NC4
)
override
;
int
get_id
()
override
;
~
MemoryStream
(){
}
int
create_mem_output
();
// int open_write(int p_filetype) override;
// int open_append() override;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment