#include <portable_binary_oarchive.hpp>
◆ detail_common_oarchive
◆ portable_binary_oarchive() [1/2]
| boost::archive::portable_binary_oarchive::portable_binary_oarchive |
( |
std::ostream & | os, |
|
|
unsigned | flags = endian_little ) |
|
inline |
Definition at line 174 of file portable_binary_oarchive.hpp.
174 :
175 primitive_base_t(
176 * os.rdbuf(),
177 0 != (flags & boost::archive::no_codecvt)
178 ),
179 archive_base_t(flags),
181 {
183 }
void init(unsigned int flags)
◆ portable_binary_oarchive() [2/2]
| boost::archive::portable_binary_oarchive::portable_binary_oarchive |
( |
std::basic_streambuf< std::ostream::char_type, std::ostream::traits_type > & | bsb, |
|
|
unsigned int | flags ) |
|
inline |
Definition at line 185 of file portable_binary_oarchive.hpp.
191 :
192 primitive_base_t(
193 bsb,
194 0 != (flags & boost::archive::no_codecvt)
195 ),
196 archive_base_t(flags),
198 {
200 }
◆ init()
| void boost::archive::portable_binary_oarchive::init |
( |
unsigned int | flags | ) |
|
|
inline |
Definition at line 273 of file portable_binary_oarchive.hpp.
273 {
275 boost::serialization::throw_exception(
276 portable_binary_oarchive_exception()
277 );
278 }
279 if(0 == (flags & boost::archive::no_header)){
280
281 const std::string file_signature(
282 boost::archive::BOOST_ARCHIVE_SIGNATURE()
283 );
284 * this << file_signature;
285
286 const boost::archive::library_version_type v{};
287
288
289
290
291
292
293 * this << v;
294 }
295 save(
static_cast<unsigned char>(
m_flags >> CHAR_BIT));
296}
◆ save() [1/7]
| void boost::archive::portable_binary_oarchive::save |
( |
const char & | t | ) |
|
|
inline |
◆ save() [2/7]
| void boost::archive::portable_binary_oarchive::save |
( |
const double & | t | ) |
|
|
inline |
◆ save() [3/7]
| void boost::archive::portable_binary_oarchive::save |
( |
const float & | t | ) |
|
|
inline |
◆ save() [4/7]
| void boost::archive::portable_binary_oarchive::save |
( |
const std::string & | t | ) |
|
|
inline |
◆ save() [5/7]
| void boost::archive::portable_binary_oarchive::save |
( |
const std::wstring & | t | ) |
|
|
inline |
◆ save() [6/7]
| void boost::archive::portable_binary_oarchive::save |
( |
const T & | t | ) |
|
|
inline |
◆ save() [7/7]
| void boost::archive::portable_binary_oarchive::save |
( |
const unsigned char & | t | ) |
|
|
inline |
◆ save_impl()
| void boost::archive::portable_binary_oarchive::save_impl |
( |
const boost::intmax_t | l, |
|
|
const char | maxsize ) |
|
inline |
Definition at line 229 of file portable_binary_oarchive.hpp.
232 {
233 signed char size = 0;
234
235 if(l == 0){
236 this->primitive_base_t::save(size);
237 return;
238 }
239
240 boost::intmax_t ll;
241 bool negative = (l < 0);
242 if(negative)
243 ll = -l;
244 else
245 ll = l;
246
247 do{
248 ll >>= CHAR_BIT;
249 ++size;
250 }while(ll != 0);
251
252 this->primitive_base_t::save(
253 static_cast<signed char>(negative ? -size : size)
254 );
255
256 if(negative)
257 ll = -l;
258 else
259 ll = l;
260 char * cptr = reinterpret_cast<char *>(& ll);
261#if BOOST_ENDIAN_BIG_BYTE
262 cptr += (sizeof(boost::intmax_t) - size);
265#else
268#endif
269 this->primitive_base_t::save_binary(cptr, size);
270}
void reverse_bytes(signed char size, char *address)
◆ save_override() [1/3]
| void boost::archive::portable_binary_oarchive::save_override |
( |
const boost::archive::class_id_optional_type & | , |
|
|
int | ) |
|
inline |
◆ save_override() [2/3]
| void boost::archive::portable_binary_oarchive::save_override |
( |
const boost::archive::class_name_type & | t, |
|
|
int | ) |
|
inline |
◆ save_override() [3/3]
| void boost::archive::portable_binary_oarchive::save_override |
( |
T & | t, |
|
|
int | ) |
|
inline |
◆ m_flags
| unsigned int boost::archive::portable_binary_oarchive::m_flags |
The documentation for this class was generated from the following file: