Last change
on this file since 1716 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_IN_HPP__ |
---|
| 2 | #define __BUFFER_IN_HPP__ |
---|
| 3 | |
---|
| 4 | |
---|
[591] | 5 | #include "xios_spl.hpp" |
---|
[300] | 6 | |
---|
[335] | 7 | namespace xios |
---|
[300] | 8 | { |
---|
| 9 | |
---|
| 10 | class CBufferIn |
---|
| 11 | { |
---|
| 12 | |
---|
| 13 | public: |
---|
| 14 | |
---|
| 15 | CBufferIn(size_t size) ; |
---|
| 16 | CBufferIn(void) ; |
---|
| 17 | CBufferIn(void* buffer,size_t size) ; |
---|
| 18 | |
---|
| 19 | void realloc(size_t size) ; |
---|
| 20 | void realloc(void* buffer,size_t size) ; |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | template<class T> |
---|
| 24 | bool advance(size_t n) ; |
---|
| 25 | |
---|
| 26 | bool advance(size_t n) ; |
---|
| 27 | |
---|
| 28 | template<class T> |
---|
| 29 | bool get(T& data) ; |
---|
| 30 | |
---|
| 31 | template<class T> |
---|
| 32 | bool get(T* data, size_t n) ; |
---|
| 33 | |
---|
| 34 | template<class T> |
---|
| 35 | bool advance_template(size_t n) ; |
---|
| 36 | |
---|
| 37 | template<class T> |
---|
| 38 | bool get_template(T& data) ; |
---|
| 39 | |
---|
| 40 | template<class T> |
---|
| 41 | bool get_template(T* data, size_t n) ; |
---|
| 42 | |
---|
| 43 | void* ptr(void) ; |
---|
[695] | 44 | void* start(void) {return begin ; } |
---|
[300] | 45 | |
---|
[695] | 46 | |
---|
[300] | 47 | size_t remain(void) ; |
---|
| 48 | size_t count(void) ; |
---|
[695] | 49 | // size_t size(void) ; |
---|
| 50 | size_t bufferSize() ; |
---|
[300] | 51 | ~CBufferIn() ; |
---|
| 52 | |
---|
| 53 | char* begin ; |
---|
| 54 | char* end ; |
---|
| 55 | char* current ; |
---|
| 56 | size_t count_ ; |
---|
| 57 | size_t size_ ; |
---|
| 58 | bool own ; |
---|
| 59 | } ; |
---|
| 60 | |
---|
| 61 | } |
---|
| 62 | |
---|
[352] | 63 | //#include "buffer_in_impl.hpp" |
---|
[300] | 64 | |
---|
| 65 | |
---|
| 66 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.