source: CONFIG/publications/ICOLMDZORINCA_CO2_Transport_GMD_2023/XIOS/src/buffer_out.hpp @ 6607

Last change on this file since 6607 was 6607, checked in by acosce, 10 months ago

XIOS used for ICOLMDZORINCA_CO2_Transport_GMD_2023

File size: 1.2 KB
Line 
1#ifndef __BUFFER_OUT_HPP__
2#define __BUFFER_OUT_HPP__
3
4
5#include "xios_spl.hpp"
6
7namespace xios
8{
9 
10    class CBufferOut
11    {
12   
13      public:
14     
15      CBufferOut(size_t size) ;
16      CBufferOut(void) ;
17      CBufferOut(void* buffer,size_t size) ;
18
19      void realloc(size_t size) ;
20      void realloc(void* buffer,size_t size) ;
21     
22      template<class T>
23      bool put(const T& data) ;
24
25      template<class T>
26      bool put(const T* data, size_t n) ;
27
28   
29      template<class T>
30      bool advance(size_t n) ;
31
32      bool advance(size_t n) ;
33     
34       
35 
36      template<class T>
37      bool put_template(const T& data) ;
38
39      template<class T>
40      bool put_template(const T* data, size_t n) ;
41
42      template<class T>
43      bool advance_template(size_t n) ;
44     
45      void* ptr(void) ;
46      void* start(void) {return begin ; }
47           
48      size_t remain(void) ;
49      size_t count(void) ;
50      size_t bufferSize(void) ;
51                           
52      ~CBufferOut() ;
53       char* begin ;
54       char* current ;
55       char* end;
56       size_t count_ ;
57       size_t size_ ;
58       bool own ; 
59    } ;
60   
61
62}
63
64//#include "buffer_out_impl.hpp"
65
66
67#endif
Note: See TracBrowser for help on using the repository browser.