From 8286ac511144e4f17d34eac9affb97e50646344a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:25:44 +0200 Subject: Imported Upstream version 4.0.0 --- .../backend-elements/indentation/clip.hxx | 173 --------------------- 1 file changed, 173 deletions(-) delete mode 100644 libbackend-elements/backend-elements/indentation/clip.hxx (limited to 'libbackend-elements/backend-elements/indentation/clip.hxx') diff --git a/libbackend-elements/backend-elements/indentation/clip.hxx b/libbackend-elements/backend-elements/indentation/clip.hxx deleted file mode 100644 index 068ed0d..0000000 --- a/libbackend-elements/backend-elements/indentation/clip.hxx +++ /dev/null @@ -1,173 +0,0 @@ -// file : backend-elements/indentation/clip.hxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2005-2010 Boris Kolpackov -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef BACKEND_ELEMENTS_INDENTATION_CLIP_HXX -#define BACKEND_ELEMENTS_INDENTATION_CLIP_HXX - -#include - -#include - -#include - -namespace BackendElements -{ - namespace Indentation - { - template - class ToStreambufAdapter: public std::basic_streambuf, - public NonCopyable - { - public: - typedef - typename std::basic_streambuf::traits_type - Traits; - - typedef - typename std::basic_streambuf::char_type - AsChar; - - typedef - typename std::basic_streambuf::int_type - AsInt; - - public: - ToStreambufAdapter (Buffer& buffer) - : buffer_ (buffer) - { - } - - virtual AsInt - overflow (AsInt ch) - { - return buffer_.put (Traits::to_char_type (ch)); - } - - virtual Int - sync () - { - return 0; - } - - private: - Buffer& buffer_; - }; - - - template - class FromStreambufAdapter: public Buffer - { - public: - typedef - typename Buffer::Traits - Traits; - - typedef - typename Buffer::AsChar - AsChar; - - typedef - typename Buffer::AsInt - AsInt; - - typedef - typename Buffer::Write - Write; - - public: - FromStreambufAdapter (std::basic_streambuf& b) - : buffer_ (b) - { - } - - virtual AsInt - put (AsChar ch) - { - return buffer_.sputc (ch); - } - - virtual Void - unbuffer () - { - try - { - if (buffer_.pubsync () == 0) return; - } - catch (std::ios_base::failure const&) - { - } - - throw Write (); - } - - private: - std::basic_streambuf& buffer_; - }; - - - template