diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-03-28 15:46:49 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-03-28 15:46:49 (GMT) |
commit | f53a1ef582494458301b97bf6e546be52d7ff7e8 (patch) | |
tree | 7571b5cbcbd8a8f1dd1c966c9045b6cb69f0e295 /3rdParty/Boost/src/tools/bcp/fileview.hpp | |
parent | 638345680d72ca6acaf123f2c8c1c391f696e371 (diff) | |
download | swift-contrib-f53a1ef582494458301b97bf6e546be52d7ff7e8.zip swift-contrib-f53a1ef582494458301b97bf6e546be52d7ff7e8.tar.bz2 |
Moving submodule contents back.
Diffstat (limited to '3rdParty/Boost/src/tools/bcp/fileview.hpp')
-rw-r--r-- | 3rdParty/Boost/src/tools/bcp/fileview.hpp | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/tools/bcp/fileview.hpp b/3rdParty/Boost/src/tools/bcp/fileview.hpp new file mode 100644 index 0000000..ede4232 --- /dev/null +++ b/3rdParty/Boost/src/tools/bcp/fileview.hpp @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2003 Dr John Maddock + * Use, modification and distribution is subject to the + * Boost Software License, Version 1.0. (See accompanying file + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + * + */ + +#include <boost/shared_ptr.hpp> +#include <boost/filesystem/path.hpp> + +class fileview +{ +public: + // types: + typedef const char& reference; + typedef reference const_reference; + typedef const char* iterator; // See _lib.container.requirements_ + typedef iterator const_iterator; // See _lib.container.requirements_ + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef char value_type; + typedef const char* pointer; + typedef pointer const_pointer; +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + typedef std::reverse_iterator<iterator> reverse_iterator; + typedef std::reverse_iterator<const_iterator> const_reverse_iterator; +#endif + + // construct: + fileview(); + fileview(const boost::filesystem::path& p); + ~fileview(); + fileview(const fileview& that); + fileview& operator=(const fileview& that); + void close(); + void open(const boost::filesystem::path& p); + + // iterators: + const_iterator begin() const; + const_iterator end() const; +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + const_reverse_iterator rbegin() const; + const_reverse_iterator rend() const; +#endif + + // capacity: + size_type size() const; + size_type max_size() const; + bool empty() const; + + // element access: + const_reference operator[](size_type n) const; + const_reference at(size_type n) const; + const_reference front() const; + const_reference back() const; + void swap(fileview& that); + +private: + void cow(); + struct implementation; + boost::shared_ptr<implementation> pimpl; +}; + + |