source: XIOS/dev/dev_olga/src/buffer.hpp @ 1620

Last change on this file since 1620 was 591, checked in by rlacroix, 9 years ago

Remove leftovers from the XMLIO age.

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
File size: 1.4 KB
Line 
1#ifndef __BUFFER_HPP__
2#define __BUFFER_HPP__
3
4
5#include "xios_spl.hpp"
6
7namespace xios
8{
9 
10    class CBuffer
11    {
12   
13      public:
14     
15      CBuffer(size_t size) ;
16      CBuffer(void* buffer,size_t size) ;
17
18      void realloc(size_t size) ;
19      void realloc(void* buffer,size_t size) ;
20     
21      template<class T>
22      bool put(const T& data) ;
23
24      template<class T>
25      bool put(const T* data, size_t n) ;
26
27      template<class T>
28      bool put_ptr(const T*& data_ptr, size_t n) ;
29     
30      template<class T>
31      bool get(T& data) ;
32
33      template<class T>
34      bool get(T* data, size_t n) ;
35
36      template<class T>
37      bool get_ptr(T*& data, size_t n) ;
38
39     
40 
41      template<class T>
42      bool put_template(const T& data) ;
43
44      template<class T>
45      bool put_template(const T* data, size_t n) ;
46
47      template<class T>
48      bool put_ptr_template(const T*& data, size_t n) ;
49     
50      template<class T>
51      bool get_template(T& data) ;
52
53      template<class T>
54      bool get_template(T* data, size_t n) ;
55
56      template<class T>
57      bool get_ptr_template(T*& data, size_t n) ;
58     
59      size_t remain(void) ;
60                           
61      ~CBuffer() ;
62       char* buffer ;
63       char* read ;
64       char* write ;
65       size_t count ;
66       bool own ; 
67       size_t size ;   
68    } ;
69   
70   
71 
72 
73}
74
75//#include "buffer_impl.hpp"
76
77
78#endif
Note: See TracBrowser for help on using the repository browser.