source:
vendors/XIOS/current/src/buffer.hpp
@
3428
Last change on this file since 3428 was 3428, checked in by rblod, 12 years ago | |
---|---|
File size: 1.4 KB |
Rev | Line | |
---|---|---|
[3428] | 1 | #ifndef __BUFFER_HPP__ |
2 | #define __BUFFER_HPP__ | |
3 | ||
4 | ||
5 | #include "xmlioserver_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 |
Note: See TracBrowser
for help on using the repository browser.