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

Last change on this file since 2280 was 717, checked in by rlacroix, 9 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
RevLine 
[300]1#ifndef __BUFFER_SERVER_HPP__
2#define __BUFFER_SERVER_HPP__
3
[591]4#include "xios_spl.hpp"
[342]5#include "buffer.hpp"
[382]6#include "mpi.hpp"
[509]7#include "cxios.hpp"
[300]8
[335]9namespace xios
[300]10{
11  class CServerBuffer
12  {
13    public:
[717]14      CServerBuffer(StdSize bufSize) ;
15      ~CServerBuffer() ;
[509]16
[717]17      bool isBufferFree(size_t count) ;
18      void* getBuffer(size_t count) ;
19      void freeBuffer(size_t count) ;
[509]20
[717]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  };
[300]28}
29
30#endif
Note: See TracBrowser for help on using the repository browser.