SAGA C++ API 1.6
iovec.hpp
Go to the documentation of this file.
00001 //  Copyright (c) 2005-2009 Hartmut Kaiser
00002 //  Copyright (c) 2007 Ole Weidner (oweidner@cct.lsu.edu)
00003 // 
00004 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
00005 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 #ifndef SAGA_PACKAGES_DATA_FILESYSTEM_IOVEC_HPP
00008 #define SAGA_PACKAGES_DATA_FILESYSTEM_IOVEC_HPP
00009 
00010 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
00011 #pragma once
00012 #endif 
00013 
00014 #include <saga/saga/packages/filesystem/config.hpp>
00015 
00016 // include dependent spec sections
00017 #include <saga/saga/buffer.hpp>
00018 
00019 // suppress warnings about dependent classes not being exported from the dll
00020 #if defined(BOOST_MSVC)
00021 #pragma warning(push)
00022 #pragma warning(disable: 4251 4231 4275 4660)
00023 #endif
00024 
00026 namespace saga
00027 {
00028     namespace filesystem {
00033     class SAGA_FILESYSTEM_PACKAGE_EXPORT const_iovec 
00034         : public saga::const_buffer
00035     {
00036     protected:
00038 
00039         TR1::shared_ptr <saga::impl::const_iovec> get_impl_sp(void) const;
00040         saga::impl::const_iovec* get_impl (void) const;
00041         friend class saga::impl::const_iovec;
00043 
00044     public:
00049         const_iovec(void const* data, saga::ssize_t size, 
00050             saga::ssize_t len_in = -1);
00051             
00056         ~const_iovec();
00057 
00062         saga::ssize_t get_len_in() const;
00063         
00068         saga::ssize_t get_len_out() const;
00069 
00070     };  // const_iovec
00071 
00080     class SAGA_FILESYSTEM_PACKAGE_EXPORT iovec 
00081         : public saga::mutable_buffer
00082     {
00083     protected:
00085 
00086         TR1::shared_ptr <saga::impl::iovec> get_impl_sp (void) const;
00087         saga::impl::iovec* get_impl (void) const;
00088         friend class saga::impl::iovec;
00090 
00091     public:
00096         iovec(void* data = 0, saga::ssize_t size = -1, 
00097             saga::ssize_t len_in = -1, 
00098             buffer_deleter cb = default_buffer_deleter);
00099             
00104         ~iovec();
00105 
00110         void set_len_in(saga::ssize_t len_in);
00111         
00116         saga::ssize_t get_len_in() const;
00117         
00122         saga::ssize_t get_len_out() const;
00123 
00124     };  // iovec
00125 }
00127 }   // namespace saga
00128 
00129 // re-enable warnings about dependent classes not being exported from the dll
00130 #if defined(BOOST_MSVC)
00131 #pragma warning(pop)
00132 #endif
00133 
00134 #endif // !defined(SAGA_PACKAGES_DATA_FILESYSTEM_IOVEC_HPP)
00135 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines