SOCI Logo Get SOCI at SourceForge.net. Fast, secure and Free Open Source software downloads

blob.cpp

Go to the documentation of this file.
00001 //
00002 // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
00003 // Distributed under the Boost Software License, Version 1.0.
00004 // (See accompanying file LICENSE_1_0.txt or copy at
00005 // http://www.boost.org/LICENSE_1_0.txt)
00006 //
00007 
00008 #define SOCI_SOURCE
00009 #include "blob.h"
00010 #include "session.h"
00011 
00012 #include <cstddef>
00013 
00014 using namespace soci;
00015 
00016 blob::blob(session & s)
00017 {
00018     backEnd_ = s.make_blob_backend();
00019 }
00020 
00021 blob::~blob()
00022 {
00023     delete backEnd_;
00024 }
00025 
00026 std::size_t blob::get_len()
00027 {
00028     return backEnd_->get_len();
00029 }
00030 
00031 std::size_t blob::read(std::size_t offset, char *buf, std::size_t toRead)
00032 {
00033     return backEnd_->read(offset, buf, toRead);
00034 }
00035 
00036 std::size_t blob::write(
00037     std::size_t offset, char const * buf, std::size_t toWrite)
00038 {
00039     return backEnd_->write(offset, buf, toWrite);
00040 }
00041 
00042 std::size_t blob::append(char const * buf, std::size_t toWrite)
00043 {
00044     return backEnd_->append(buf, toWrite);
00045 }
00046 
00047 void blob::trim(std::size_t newLen)
00048 {
00049     backEnd_->trim(newLen);
00050 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
SourceForge Logo

Generated on Sun Oct 3 2010 17:42:16 for EXTRAS-SOCI by Doxygen 1.7.1