1 // Copyright (c) 2001-2011 Hartmut Kaiser 2 // 3 // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 6 #if !defined(BOOST_SPIRIT_KARMA_DEFAULT_WIDTH_APR_07_2009_0912PM) 7 #define BOOST_SPIRIT_KARMA_DEFAULT_WIDTH_APR_07_2009_0912PM 8 9 #if defined(_MSC_VER) 10 #pragma once 11 #endif 12 13 /////////////////////////////////////////////////////////////////////////////// 14 // 15 // The BOOST_KARMA_DEFAULT_FIELD_LENGTH specifies the default field length 16 // to be used for padding. 17 // 18 /////////////////////////////////////////////////////////////////////////////// 19 #if !defined(BOOST_KARMA_DEFAULT_FIELD_LENGTH) 20 #define BOOST_KARMA_DEFAULT_FIELD_LENGTH 10 21 #endif 22 23 /////////////////////////////////////////////////////////////////////////////// 24 // 25 // The BOOST_KARMA_DEFAULT_FIELD_MAXWIDTH specifies the default maximal field 26 // length to be used for the maxwidth directive. 27 // 28 /////////////////////////////////////////////////////////////////////////////// 29 #if !defined(BOOST_KARMA_DEFAULT_FIELD_MAXWIDTH) 30 #define BOOST_KARMA_DEFAULT_FIELD_MAXWIDTH 10 31 #endif 32 33 /////////////////////////////////////////////////////////////////////////////// 34 // 35 // The BOOST_KARMA_DEFAULT_COLUMNS specifies the default number of columns to 36 // be used with the columns directive. 37 // 38 /////////////////////////////////////////////////////////////////////////////// 39 #if !defined(BOOST_KARMA_DEFAULT_COLUMNS) 40 #define BOOST_KARMA_DEFAULT_COLUMNS 5 41 #endif 42 43 /////////////////////////////////////////////////////////////////////////////// 44 namespace boost { namespace spirit { namespace karma { namespace detail 45 { 46 /////////////////////////////////////////////////////////////////////////// 47 struct default_width 48 { operator intboost::spirit::karma::detail::default_width49 operator int() const 50 { 51 return BOOST_KARMA_DEFAULT_FIELD_LENGTH; 52 } 53 }; 54 55 /////////////////////////////////////////////////////////////////////////// 56 struct default_max_width 57 { operator intboost::spirit::karma::detail::default_max_width58 operator int() const 59 { 60 return BOOST_KARMA_DEFAULT_FIELD_MAXWIDTH; 61 } 62 }; 63 64 /////////////////////////////////////////////////////////////////////////// 65 struct default_columns 66 { operator intboost::spirit::karma::detail::default_columns67 operator int() const 68 { 69 return BOOST_KARMA_DEFAULT_COLUMNS; 70 } 71 }; 72 73 }}}} 74 75 #endif 76