SAGA C++ API 1.6
iovec.cpp
Go to the documentation of this file.
00001 //  Copyright (c) 2005-2009 Hartmut Kaiser
00002 // 
00003 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
00004 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00005 
00006 // include dependent spec sections
00007 #include <saga/saga/filesystem.hpp>
00008 #include <saga/impl/filesystem.hpp>
00009 
00011 namespace saga
00012 {
00013     namespace filesystem {
00015     const_iovec::const_iovec(void const* data, saga::ssize_t size, 
00016             saga::ssize_t len_in)
00017       : saga::const_buffer(new saga::impl::const_iovec(data, size, len_in))
00018     {
00019     }
00020 
00021     const_iovec::~const_iovec()
00022     {
00023     }
00024 
00025     saga::impl::const_iovec* const_iovec::get_impl (void) const
00026     { 
00027       typedef saga::object base_type;
00028       return static_cast <saga::impl::const_iovec*> (this->base_type::get_impl ());
00029     }
00030 
00031     TR1::shared_ptr <saga::impl::const_iovec> const_iovec::get_impl_sp (void) const
00032     {
00033         typedef saga::object base_type;
00034         return TR1::static_pointer_cast <saga::impl::const_iovec> (
00035             this->base_type::get_impl_sp());
00036     }
00037 
00038     saga::ssize_t const_iovec::get_len_in() const
00039     {
00040         return get_impl()->get_len_in();
00041     }
00042 
00043     saga::ssize_t const_iovec::get_len_out() const
00044     {
00045         return get_impl()->get_len_out();
00046     }
00047 
00049     iovec::iovec(void* data, saga::ssize_t size, saga::ssize_t len_in,
00050             buffer_deleter cb)
00051       : saga::mutable_buffer(new saga::impl::iovec(data, size, len_in, cb))
00052     {
00053     }
00054     
00055     iovec::~iovec()
00056     {
00057     }
00058 
00059     saga::impl::iovec* iovec::get_impl (void) const
00060     { 
00061       typedef saga::object base_type;
00062       return static_cast <saga::impl::iovec*> (this->base_type::get_impl ());
00063     }
00064 
00065     TR1::shared_ptr <saga::impl::iovec> iovec::get_impl_sp (void) const
00066     {
00067         typedef saga::object base_type;
00068         return TR1::static_pointer_cast <saga::impl::iovec> (
00069             this->base_type::get_impl_sp());
00070     }
00071 
00072     void iovec::set_len_in(saga::ssize_t len_in)
00073     {
00074         get_impl()->set_len_in(len_in);
00075     }
00076 
00077     saga::ssize_t iovec::get_len_in() const
00078     {
00079         return get_impl()->get_len_in();
00080     }
00081 
00082     saga::ssize_t iovec::get_len_out() const
00083     {
00084         return get_impl()->get_len_out();
00085     }
00086 }
00088 }   // namespace saga
00089 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines