Fire Core  8.0.0.alpha
GIS framework per tutti gli usi
 Tutto Classi Namespace Funzioni Variabili Ridefinizioni di tipo (typedef) Tipi enumerati (enum) Valori del tipo enumerato Friend
Buffer.hpp
1 // Copyright © 2015 GEOSYSTEMS SRL
2 // All Rights Reserved.
3 
4 #ifndef FIRE_DATA_BUFFER_HPP_INCLUDED
5 #define FIRE_DATA_BUFFER_HPP_INCLUDED
6 
7 #include <boost/shared_ptr.hpp>
8 #include <boost/scoped_array.hpp>
9 #include <fire/gear/threading/types.hpp>
10 
11 #include <exception>
12 #include <cstddef>
13 
14 #include "fire/gis/export.hpp"
15 
16 namespace fire {
17 namespace source {
18 namespace vector {
19 
20 namespace shared {
21 class BufferSh;
22 } // namespace shared
23 
27 class FIRE_GIS_DLL Buffer {
28  public:
30 
31  public:
32  Buffer();
33  Buffer(Buffer const & source);
34  Buffer(unsigned char* buff, size_t const & size);
35  virtual ~Buffer();
36 
37  void reset(unsigned char * buff, const size_t &size);
38  unsigned char const * getData() const;
39  unsigned char * getData();
40  size_t getSize() const;
41 
42  private:
43  Buffer & operator=(Buffer const & source);
44 
45  size_t _sz;
46  //std::auto_ptr< unsigned char > _data;
47  boost::scoped_array< unsigned char > _data;
48 
49  mutable boost::mutex _mtx;
50 };
51 } // namespace vector
52 } // namespace source
53 } // namespace fire
54 
55 #endif
Definition: BufferSh.hpp:20
Oggetto che incapsula un array di byte con la sua lunghezza.
Definition: Buffer.hpp:27