XIOS  1.0
Xml I/O Server
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Définitions de type Énumérations Valeurs énumérées Amis Macros
buffer.hpp
Aller à la documentation de ce fichier.
1 #ifndef __BUFFER_HPP__
2 #define __BUFFER_HPP__
3 
4 
5 #include "xios_spl.hpp"
6 
7 namespace 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
bool get_ptr_template(T *&data, size_t n)
bool get_ptr(T *&data, size_t n)
void realloc(size_t size)
Definition: buffer.cpp:19
size_t remain(void)
Definition: buffer.cpp:36
size_t size
Definition: buffer.hpp:67
#define xios(arg)
char * read
Definition: buffer.hpp:63
bool put(const T &data)
char * write
Definition: buffer.hpp:64
CBuffer(size_t size)
Definition: buffer.cpp:13
bool get_template(T &data)
size_t count
Definition: buffer.hpp:65
bool put_ptr(const T *&data_ptr, size_t n)
char * buffer
Definition: buffer.hpp:62
bool put_ptr_template(const T *&data, size_t n)
bool put_template(const T &data)
Definition: buffer_impl.hpp:79