Last change
on this file since 1571 was
695,
checked in by ymipsl, 9 years ago
|
Bug fix in buffer_in.cpp
Change attribut "size" by "bufferSize"
YM
|
-
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.2 KB
|
Rev | Line | |
---|
[300] | 1 | #ifndef __BUFFER_OUT_HPP__ |
---|
| 2 | #define __BUFFER_OUT_HPP__ |
---|
| 3 | |
---|
| 4 | |
---|
[591] | 5 | #include "xios_spl.hpp" |
---|
[300] | 6 | |
---|
[335] | 7 | namespace xios |
---|
[300] | 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) ; |
---|
[695] | 46 | void* start(void) {return begin ; } |
---|
[300] | 47 | |
---|
| 48 | size_t remain(void) ; |
---|
| 49 | size_t count(void) ; |
---|
[695] | 50 | size_t bufferSize(void) ; |
---|
[300] | 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 | |
---|
[352] | 64 | //#include "buffer_out_impl.hpp" |
---|
[300] | 65 | |
---|
| 66 | |
---|
| 67 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.