source: XIOS/trunk/src/buffer_server.hpp @ 717

Last change on this file since 717 was 717, checked in by rlacroix, 6 years ago

Fix: The "buffer_factor_size" was applied twice to the server buffers.

Also reduce the visibility of the member variables of CServerBuffer.

  • 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: 562 bytes
Line 
1#ifndef __BUFFER_SERVER_HPP__
2#define __BUFFER_SERVER_HPP__
3
4#include "xios_spl.hpp"
5#include "buffer.hpp"
6#include "mpi.hpp"
7#include "cxios.hpp"
8
9namespace xios
10{
11  class CServerBuffer
12  {
13    public:
14      CServerBuffer(StdSize bufSize) ;
15      ~CServerBuffer() ;
16
17      bool isBufferFree(size_t count) ;
18      void* getBuffer(size_t count) ;
19      void freeBuffer(size_t count) ;
20
21    private:
22      char* buffer;
23      size_t first;   // first occupied element
24      size_t current; // first free element
25      size_t end;
26      size_t size;
27  };
28}
29
30#endif
Note: See TracBrowser for help on using the repository browser.