Warning, file /sdk/codevis/thirdparty/soci/src/core/blob.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 //
0002 // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
0003 // Distributed under the Boost Software License, Version 1.0.
0004 // (See accompanying file LICENSE_1_0.txt or copy at
0005 // http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 
0008 #define SOCI_SOURCE
0009 #include "soci/blob.h"
0010 #include "soci/session.h"
0011 #include "soci/soci-platform.h"
0012 
0013 #include <cstddef>
0014 
0015 using namespace soci;
0016 
0017 blob::blob(session & s)
0018     : backEnd_{s.make_blob_backend()}
0019 {
0020 }
0021 
0022 blob::~blob() = default;
0023 
0024 std::size_t blob::get_len()
0025 {
0026     return backEnd_->get_len();
0027 }
0028 
0029 std::size_t blob::read(std::size_t offset, char *buf, std::size_t toRead)
0030 {
0031     SOCI_ALLOW_DEPRECATED_BEGIN
0032     return backEnd_->read(offset, buf, toRead);
0033     SOCI_ALLOW_DEPRECATED_END
0034 }
0035 
0036 std::size_t blob::read_from_start(char * buf, std::size_t toRead,
0037     std::size_t offset)
0038 {
0039     return backEnd_->read_from_start(buf, toRead, offset);
0040 }
0041 
0042 std::size_t blob::write(
0043     std::size_t offset, char const * buf, std::size_t toWrite)
0044 {
0045     SOCI_ALLOW_DEPRECATED_BEGIN
0046     return backEnd_->write(offset, buf, toWrite);
0047     SOCI_ALLOW_DEPRECATED_END
0048 }
0049 
0050 std::size_t blob::write_from_start(const char * buf, std::size_t toWrite,
0051     std::size_t offset)
0052 {
0053     return backEnd_->write_from_start(buf, toWrite, offset);
0054 }
0055 
0056 std::size_t blob::append(char const * buf, std::size_t toWrite)
0057 {
0058     return backEnd_->append(buf, toWrite);
0059 }
0060 
0061 void blob::trim(std::size_t newLen)
0062 {
0063     backEnd_->trim(newLen);
0064 }