YAMI4 C++
raw_buffer_data_source.h
1 // Copyright Maciej Sobczak 2008-2019.
2 // This file is part of YAMI4.
3 //
4 // YAMI4 is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // YAMI4 is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with YAMI4. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef YAMICPP_RAW_BUFFER_DATA_SOURCE_H_INCLUDED
18 #define YAMICPP_RAW_BUFFER_DATA_SOURCE_H_INCLUDED
19 
20 #include "serializable.h"
21 #include <yami4-core/dll.h>
22 #include <yami4-core/raw_buffer_data_source.h>
23 #include <vector>
24 
25 namespace yami
26 {
27 
36 {
37 public:
38 
54  raw_buffer_data_source(const char * * buffers,
55  const std::size_t * buffer_sizes,
56  std::size_t num_of_buffers);
57 
63  raw_buffer_data_source(const char * buffer, std::size_t buffer_size);
64 
70  raw_buffer_data_source(const std::vector<char> & buffer);
71 
76  virtual std::size_t serialize_buffer_size() const;
77 
92  virtual void serialize(char * * buffers, std::size_t * buffer_sizes,
93  std::size_t num_of_buffers) const;
94 
96  virtual const core::serializable & get_core_object() const;
97 
98 private:
99 
101  void operator=(const raw_buffer_data_source &);
102 
103  const core::raw_buffer_data_source buffer_wrapper_;
104 };
105 
106 } // namespace yami
107 
108 #endif // YAMICPP_RAW_BUFFER_DATA_SOURCE_H_INCLUDED
Serializable wrapper for the raw binary data.
Definition: raw_buffer_data_source.h:35
Namespace devoted to everything related to YAMI4.
Definition: activity_statistics_monitor.cpp:27
Common interface for serializable data source.
Definition: serializable.h:32