summaryrefslogtreecommitdiff
path: root/boost/gil/extension/io/pnm/detail
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:21:30 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:21:30 +0900
commitd6a306e745acfee00e81ccaf3324a2a03516db41 (patch)
tree145a26368608982f40ebb0f4836185c44abb9ae4 /boost/gil/extension/io/pnm/detail
parent5ce2ccf2f23c6d3de4c79f216f57ca6f2a18ed16 (diff)
downloadboost-d6a306e745acfee00e81ccaf3324a2a03516db41.tar.gz
boost-d6a306e745acfee00e81ccaf3324a2a03516db41.tar.bz2
boost-d6a306e745acfee00e81ccaf3324a2a03516db41.zip
Imported Upstream version 1.69.0upstream/1.69.0
Diffstat (limited to 'boost/gil/extension/io/pnm/detail')
-rw-r--r--boost/gil/extension/io/pnm/detail/is_allowed.hpp25
-rw-r--r--boost/gil/extension/io/pnm/detail/read.hpp58
-rw-r--r--boost/gil/extension/io/pnm/detail/reader_backend.hpp39
-rw-r--r--boost/gil/extension/io/pnm/detail/scanline_read.hpp55
-rw-r--r--boost/gil/extension/io/pnm/detail/supported_types.hpp30
-rw-r--r--boost/gil/extension/io/pnm/detail/write.hpp48
-rw-r--r--boost/gil/extension/io/pnm/detail/writer_backend.hpp37
7 files changed, 107 insertions, 185 deletions
diff --git a/boost/gil/extension/io/pnm/detail/is_allowed.hpp b/boost/gil/extension/io/pnm/detail/is_allowed.hpp
index 91be3091fa..30fd9693c4 100644
--- a/boost/gil/extension/io/pnm/detail/is_allowed.hpp
+++ b/boost/gil/extension/io/pnm/detail/is_allowed.hpp
@@ -1,24 +1,13 @@
-/*
- Copyright 2009 Christian Henning
- Use, modification and distribution are 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).
-*/
-
-/*************************************************************************************************/
-
+//
+// Copyright 2009 Christian Henning
+//
+// Distributed under 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
+//
#ifndef BOOST_GIL_EXTENSION_IO_PNM_DETAIL_IS_ALLOWED_HPP
#define BOOST_GIL_EXTENSION_IO_PNM_DETAIL_IS_ALLOWED_HPP
-////////////////////////////////////////////////////////////////////////////////////////
-/// \file
-/// \brief
-/// \author Christian Henning \n
-///
-/// \date 2008 \n
-///
-////////////////////////////////////////////////////////////////////////////////////////
-
namespace boost { namespace gil { namespace detail {
template< typename View >
diff --git a/boost/gil/extension/io/pnm/detail/read.hpp b/boost/gil/extension/io/pnm/detail/read.hpp
index 5f267ada5e..52a697e70f 100644
--- a/boost/gil/extension/io/pnm/detail/read.hpp
+++ b/boost/gil/extension/io/pnm/detail/read.hpp
@@ -1,45 +1,35 @@
-/*
- Copyright 2012 Christian Henning
- Use, modification and distribution are 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).
-*/
-
-/*************************************************************************************************/
-
+//
+// Copyright 2012 Christian Henning
+//
+// Distributed under 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
+//
#ifndef BOOST_GIL_EXTENSION_IO_PNM_DETAIL_READ_HPP
#define BOOST_GIL_EXTENSION_IO_PNM_DETAIL_READ_HPP
-////////////////////////////////////////////////////////////////////////////////////////
-/// \file
-/// \brief
-/// \author Christian Henning \n
-///
-/// \date 2012 \n
-///
-////////////////////////////////////////////////////////////////////////////////////////
-
-#include <vector>
-#include <boost/bind.hpp>
-#include <boost/gil.hpp>
#include <boost/gil/extension/io/pnm/tags.hpp>
+#include <boost/gil/extension/io/pnm/detail/reader_backend.hpp>
+#include <boost/gil/extension/io/pnm/detail/is_allowed.hpp>
+#include <boost/gil.hpp> // FIXME: Include what you use!
#include <boost/gil/io/base.hpp>
-#include <boost/gil/io/conversion_policies.hpp>
-#include <boost/gil/io/row_buffer_helper.hpp>
#include <boost/gil/io/bit_operations.hpp>
-#include <boost/gil/io/reader_base.hpp>
+#include <boost/gil/io/conversion_policies.hpp>
#include <boost/gil/io/device.hpp>
+#include <boost/gil/io/reader_base.hpp>
+#include <boost/gil/io/row_buffer_helper.hpp>
#include <boost/gil/io/typedefs.hpp>
-#include <boost/gil/extension/io/pnm/detail/reader_backend.hpp>
-#include <boost/gil/extension/io/pnm/detail/is_allowed.hpp>
+#include <boost/bind.hpp>
+
+#include <vector>
namespace boost { namespace gil {
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-#pragma warning(push)
-#pragma warning(disable:4512) //assignment operator could not be generated
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(push)
+#pragma warning(disable:4512) //assignment operator could not be generated
#endif
///
@@ -119,7 +109,7 @@ public:
{
this->_scanline_length = this->_info._width;
- read_text_data< gray8_view_t >( view );
+ read_text_data< gray8_view_t >( view );
break;
}
@@ -364,7 +354,7 @@ private:
};
-namespace detail {
+namespace detail {
struct pnm_type_format_checker
{
@@ -455,9 +445,9 @@ public:
}
};
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-#pragma warning(pop)
-#endif
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(pop)
+#endif
} // gil
} // boost
diff --git a/boost/gil/extension/io/pnm/detail/reader_backend.hpp b/boost/gil/extension/io/pnm/detail/reader_backend.hpp
index 01ab7a0aaa..2497ee2878 100644
--- a/boost/gil/extension/io/pnm/detail/reader_backend.hpp
+++ b/boost/gil/extension/io/pnm/detail/reader_backend.hpp
@@ -1,31 +1,20 @@
-/*
- Copyright 2012 Christian Henning
- Use, modification and distribution are 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).
-*/
-
-/*************************************************************************************************/
-
+//
+// Copyright 2012 Christian Henning
+//
+// Distributed under 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
+//
#ifndef BOOST_GIL_EXTENSION_IO_PNM_DETAIL_READER_BACKEND_HPP
#define BOOST_GIL_EXTENSION_IO_PNM_DETAIL_READER_BACKEND_HPP
-////////////////////////////////////////////////////////////////////////////////////////
-/// \file
-/// \brief
-/// \author Christian Henning \n
-///
-/// \date 2012 \n
-///
-////////////////////////////////////////////////////////////////////////////////////////
-
#include <boost/gil/extension/io/pnm/tags.hpp>
namespace boost { namespace gil {
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-#pragma warning(push)
-#pragma warning(disable:4512) //assignment operator could not be generated
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(push)
+#pragma warning(disable:4512) //assignment operator could not be generated
#endif
///
@@ -51,7 +40,7 @@ public:
, _scanline_length( 0 )
{
- read_header();
+ read_header();
if( _settings._dim.x == 0 )
{
@@ -182,9 +171,9 @@ public:
std::size_t _scanline_length;
};
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-#pragma warning(pop)
-#endif
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(pop)
+#endif
} // namespace gil
} // namespace boost
diff --git a/boost/gil/extension/io/pnm/detail/scanline_read.hpp b/boost/gil/extension/io/pnm/detail/scanline_read.hpp
index b109528145..242d8b6097 100644
--- a/boost/gil/extension/io/pnm/detail/scanline_read.hpp
+++ b/boost/gil/extension/io/pnm/detail/scanline_read.hpp
@@ -1,41 +1,30 @@
-/*
- Copyright 2012 Christian Henning
- Use, modification and distribution are 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).
-*/
-
-/*************************************************************************************************/
-
+//
+// Copyright 2012 Christian Henning
+//
+// Distributed under 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
+//
#ifndef BOOST_GIL_EXTENSION_IO_PNM_DETAIL_SCANLINE_READ_HPP
#define BOOST_GIL_EXTENSION_IO_PNM_DETAIL_SCANLINE_READ_HPP
-////////////////////////////////////////////////////////////////////////////////////////
-/// \file
-/// \brief
-/// \author Christian Henning \n
-///
-/// \date 2012 \n
-///
-////////////////////////////////////////////////////////////////////////////////////////
-
-#include <vector>
-#include <boost/bind.hpp>
-#include <boost/function.hpp>
-
-#include <boost/gil.hpp>
+#include <boost/gil/extension/io/pnm/detail/is_allowed.hpp>
+#include <boost/gil/extension/io/pnm/detail/reader_backend.hpp>
+#include <boost/gil.hpp> // FIXME: Include what you use!
#include <boost/gil/io/base.hpp>
-#include <boost/gil/io/conversion_policies.hpp>
-#include <boost/gil/io/row_buffer_helper.hpp>
#include <boost/gil/io/bit_operations.hpp>
-#include <boost/gil/io/reader_base.hpp>
+#include <boost/gil/io/conversion_policies.hpp>
#include <boost/gil/io/device.hpp>
+#include <boost/gil/io/reader_base.hpp>
+#include <boost/gil/io/row_buffer_helper.hpp>
#include <boost/gil/io/scanline_read_iterator.hpp>
#include <boost/gil/io/typedefs.hpp>
-#include <boost/gil/extension/io/pnm/detail/reader_backend.hpp>
-#include <boost/gil/extension/io/pnm/detail/is_allowed.hpp>
+#include <boost/bind.hpp>
+#include <boost/function.hpp>
+
+#include <vector>
namespace boost { namespace gil {
@@ -93,7 +82,7 @@ private:
switch( this->_info._type )
{
// reading mono text is reading grayscale but with only two values
- case pnm_image_type::mono_asc_t::value:
+ case pnm_image_type::mono_asc_t::value:
case pnm_image_type::gray_asc_t::value:
{
this->_scanline_length = this->_info._width;
@@ -108,7 +97,7 @@ private:
{
this->_scanline_length = this->_info._width * num_channels< rgb8_view_t >::value;
- _read_function = boost::mem_fn( &this_t::read_text_row );
+ _read_function = boost::mem_fn( &this_t::read_text_row );
_skip_function = boost::mem_fn( &this_t::skip_text_row );
break;
@@ -131,8 +120,8 @@ private:
// gray8_image_t
this->_scanline_length = this->_info._width;
- _read_function = boost::mem_fn( &this_t::read_binary_byte_row );
- _skip_function = boost::mem_fn( &this_t::skip_binary_row );
+ _read_function = boost::mem_fn( &this_t::read_binary_byte_row );
+ _skip_function = boost::mem_fn( &this_t::skip_binary_row );
break;
}
@@ -142,7 +131,7 @@ private:
// rgb8_image_t
this->_scanline_length = this->_info._width * num_channels< rgb8_view_t >::value;
- _read_function = boost::mem_fn( &this_t::read_binary_byte_row );
+ _read_function = boost::mem_fn( &this_t::read_binary_byte_row );
_skip_function = boost::mem_fn( &this_t::skip_binary_row );
break;
diff --git a/boost/gil/extension/io/pnm/detail/supported_types.hpp b/boost/gil/extension/io/pnm/detail/supported_types.hpp
index 7bede91402..e7298b6020 100644
--- a/boost/gil/extension/io/pnm/detail/supported_types.hpp
+++ b/boost/gil/extension/io/pnm/detail/supported_types.hpp
@@ -1,30 +1,19 @@
-/*
- Copyright 2008 Christian Henning
- Use, modification and distribution are 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).
-*/
-
-/*************************************************************************************************/
-
+//
+// Copyright 2008 Christian Henning
+//
+// Distributed under 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
+//
#ifndef BOOST_GIL_EXTENSION_IO_PNM_DETAIL_SUPPORTED_TYPES_HPP
#define BOOST_GIL_EXTENSION_IO_PNM_DETAIL_SUPPORTED_TYPES_HPP
-////////////////////////////////////////////////////////////////////////////////////////
-/// \file
-/// \brief
-/// \author Christian Henning \n
-///
-/// \date 2008 \n
-///
-////////////////////////////////////////////////////////////////////////////////////////
+#include <boost/gil/channel.hpp>
+#include <boost/gil/color_base.hpp>
#include <boost/mpl/not.hpp>
#include <boost/type_traits/is_same.hpp>
-#include <boost/gil/channel.hpp>
-#include <boost/gil/color_base.hpp>
-
namespace boost { namespace gil { namespace detail {
// Read Support
@@ -142,5 +131,4 @@ struct is_write_supported< Pixel
} // namespace gil
} // namespace boost
-
#endif
diff --git a/boost/gil/extension/io/pnm/detail/write.hpp b/boost/gil/extension/io/pnm/detail/write.hpp
index f92307c9c8..79ee35fdc9 100644
--- a/boost/gil/extension/io/pnm/detail/write.hpp
+++ b/boost/gil/extension/io/pnm/detail/write.hpp
@@ -1,39 +1,27 @@
-/*
- Copyright 2012 Christian Henning
- Use, modification and distribution are 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).
-*/
-
-/*************************************************************************************************/
-
+//
+// Copyright 2012 Christian Henning
+//
+// Distributed under 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
+//
#ifndef BOOST_GIL_EXTENSION_IO_PNM_DETAIL_WRITE_HPP
#define BOOST_GIL_EXTENSION_IO_PNM_DETAIL_WRITE_HPP
-////////////////////////////////////////////////////////////////////////////////////////
-/// \file
-/// \brief
-/// \author Christian Henning \n
-///
-/// \date 2012 \n
-///
-////////////////////////////////////////////////////////////////////////////////////////
-
-#include <cstdlib>
-#include <string>
-
#include <boost/gil/extension/io/pnm/tags.hpp>
+#include <boost/gil/extension/io/pnm/detail/writer_backend.hpp>
#include <boost/gil/io/base.hpp>
#include <boost/gil/io/device.hpp>
-#include <boost/gil/extension/io/pnm/detail/writer_backend.hpp>
+#include <cstdlib>
+#include <string>
-namespace boost { namespace gil {
+namespace boost { namespace gil {
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-#pragma warning(push)
-#pragma warning(disable:4512) //assignment operator could not be generated
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(push)
+#pragma warning(disable:4512) //assignment operator could not be generated
#endif
namespace detail {
@@ -41,7 +29,7 @@ namespace detail {
struct pnm_write_is_supported
{
template< typename View >
- struct apply
+ struct apply
: public is_write_supported< typename get_pixel_type< View >::type
, pnm_tag
>
@@ -258,9 +246,9 @@ public:
}
};
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-#pragma warning(pop)
-#endif
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(pop)
+#endif
} // gil
} // boost
diff --git a/boost/gil/extension/io/pnm/detail/writer_backend.hpp b/boost/gil/extension/io/pnm/detail/writer_backend.hpp
index 38672e6f71..a970da1aee 100644
--- a/boost/gil/extension/io/pnm/detail/writer_backend.hpp
+++ b/boost/gil/extension/io/pnm/detail/writer_backend.hpp
@@ -1,31 +1,20 @@
-/*
- Copyright 2012 Christian Henning
- Use, modification and distribution are 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).
-*/
-
-/*************************************************************************************************/
-
+//
+// Copyright 2012 Christian Henning
+//
+// Distributed under 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
+//
#ifndef BOOST_GIL_EXTENSION_IO_PNM_DETAIL_WRITER_BACKEND_HPP
#define BOOST_GIL_EXTENSION_IO_PNM_DETAIL_WRITER_BACKEND_HPP
-////////////////////////////////////////////////////////////////////////////////////////
-/// \file
-/// \brief
-/// \author Christian Henning \n
-///
-/// \date 2012 \n
-///
-////////////////////////////////////////////////////////////////////////////////////////
-
#include <boost/gil/extension/io/pnm/tags.hpp>
namespace boost { namespace gil {
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-#pragma warning(push)
-#pragma warning(disable:4512) //assignment operator could not be generated
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(push)
+#pragma warning(disable:4512) //assignment operator could not be generated
#endif
///
@@ -56,9 +45,9 @@ public:
image_write_info< pnm_tag > _info;
};
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-#pragma warning(pop)
-#endif
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+#pragma warning(pop)
+#endif
} // namespace gil
} // namespace boost