view release on metacpan or search on metacpan
include/boost/blank.hpp
include/boost/blank_fwd.hpp
include/boost/call_traits.hpp
include/boost/cast.hpp
include/boost/checked_delete.hpp
include/boost/compatibility/cpp_c_headers/cassert
include/boost/compatibility/cpp_c_headers/cctype
include/boost/compatibility/cpp_c_headers/cerrno
include/boost/compatibility/cpp_c_headers/cfloat
include/boost/compatibility/cpp_c_headers/climits
include/boost/compatibility/cpp_c_headers/clocale
include/boost/compatibility/cpp_c_headers/cmath
include/boost/compatibility/cpp_c_headers/csetjmp
include/boost/compatibility/cpp_c_headers/csignal
include/boost/compatibility/cpp_c_headers/cstdarg
include/boost/compatibility/cpp_c_headers/cstddef
include/boost/compatibility/cpp_c_headers/cstdio
include/boost/compatibility/cpp_c_headers/cstdlib
include/boost/compatibility/cpp_c_headers/cstring
include/boost/compatibility/cpp_c_headers/ctime
include/boost/compatibility/cpp_c_headers/cwchar
include/boost/date_time/constrained_value.hpp
include/boost/date_time/date.hpp
include/boost/date_time/date_clock_device.hpp
include/boost/date_time/date_defs.hpp
include/boost/date_time/date_duration.hpp
include/boost/date_time/date_duration_types.hpp
include/boost/date_time/date_facet.hpp
include/boost/date_time/date_format_simple.hpp
include/boost/date_time/date_formatting.hpp
include/boost/date_time/date_formatting_limited.hpp
include/boost/date_time/date_formatting_locales.hpp
include/boost/date_time/date_generator_formatter.hpp
include/boost/date_time/date_generator_parser.hpp
include/boost/date_time/date_generators.hpp
include/boost/date_time/date_iterator.hpp
include/boost/date_time/date_names_put.hpp
include/boost/date_time/date_parsing.hpp
include/boost/date_time/dst_rules.hpp
include/boost/date_time/dst_transition_generators.hpp
include/boost/date_time/filetime_functions.hpp
include/boost/date_time/format_date_parser.hpp
include/boost/date_time/local_time/dst_transition_day_rules.hpp
include/boost/date_time/local_time/local_date_time.hpp
include/boost/date_time/local_time/local_time.hpp
include/boost/date_time/local_time/local_time_io.hpp
include/boost/date_time/local_time/local_time_types.hpp
include/boost/date_time/local_time/posix_time_zone.hpp
include/boost/date_time/local_time/time_zone.hpp
include/boost/date_time/local_time/tz_database.hpp
include/boost/date_time/local_time_adjustor.hpp
include/boost/date_time/local_timezone_defs.hpp
include/boost/date_time/locale_config.hpp
include/boost/date_time/microsec_time_clock.hpp
include/boost/date_time/parse_format_base.hpp
include/boost/date_time/period.hpp
include/boost/date_time/period_formatter.hpp
include/boost/date_time/period_parser.hpp
include/boost/date_time/posix_time/conversion.hpp
include/boost/date_time/posix_time/date_duration_operators.hpp
include/boost/date_time/posix_time/posix_time.hpp
include/boost/date_time/posix_time/posix_time_config.hpp
include/boost/date_time/posix_time/posix_time_duration.hpp
include/boost/algorithm/string/case_conv.hpp view on Meta::CPAN
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#ifndef BOOST_STRING_CASE_CONV_HPP
#define BOOST_STRING_CASE_CONV_HPP
#include <boost/algorithm/string/config.hpp>
#include <algorithm>
#include <locale>
#include <boost/iterator/transform_iterator.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/value_type.hpp>
#include <boost/algorithm/string/detail/case_conv.hpp>
/*! \file
Defines sequence case-conversion algorithms.
Algorithms convert each element in the input sequence to the
desired case using provided locales.
*/
namespace boost {
namespace algorithm {
// to_lower -----------------------------------------------//
//! Convert to lower case
/*!
Each element of the input sequence is converted to lower
case. The result is a copy of the input converted to lower case.
It is returned as a sequence or copied to the output iterator.
\param Output An output iterator to which the result will be copied
\param Input An input range
\param Loc A locale used for conversion
\return
An output iterator pointing just after the last inserted character or
a copy of the input
\note The second variant of this function provides the strong exception-safety guarantee
*/
template<typename OutputIteratorT, typename RangeT>
inline OutputIteratorT
to_lower_copy(
OutputIteratorT Output,
const RangeT& Input,
const std::locale& Loc=std::locale())
{
return std::transform(
begin(Input),
end(Input),
Output,
::boost::algorithm::detail::to_lowerF<
typename range_value<RangeT>::type >(Loc));
}
//! Convert to lower case
/*!
\overload
*/
template<typename SequenceT>
inline SequenceT to_lower_copy(
const SequenceT& Input,
const std::locale& Loc=std::locale())
{
return SequenceT(
make_transform_iterator(
begin(Input),
::boost::algorithm::detail::to_lowerF<
typename range_value<SequenceT>::type >(Loc)),
make_transform_iterator(
end(Input),
::boost::algorithm::detail::to_lowerF<
typename range_value<SequenceT>::type >(Loc)));
}
//! Convert to lower case
/*!
Each element of the input sequence is converted to lower
case. The input sequence is modified in-place.
\param Input A range
\param Loc a locale used for conversion
*/
template<typename WritableRangeT>
inline void to_lower(
WritableRangeT& Input,
const std::locale& Loc=std::locale())
{
std::transform(
begin(Input),
end(Input),
begin(Input),
::boost::algorithm::detail::to_lowerF<
typename range_value<WritableRangeT>::type >(Loc));
}
// to_upper -----------------------------------------------//
//! Convert to upper case
/*!
Each element of the input sequence is converted to upper
case. The result is a copy of the input converted to upper case.
It is returned as a sequence or copied to the output iterator
\param Output An output iterator to which the result will be copied
\param Input An input range
\param Loc A locale used for conversion
\return
An output iterator pointing just after the last inserted character or
a copy of the input
\note The second variant of this function provides the strong exception-safety guarantee
*/
template<typename OutputIteratorT, typename RangeT>
inline OutputIteratorT
to_upper_copy(
OutputIteratorT Output,
const RangeT& Input,
const std::locale& Loc=std::locale())
{
return std::transform(
begin(Input),
end(Input),
Output,
::boost::algorithm::detail::to_upperF<
typename range_value<RangeT>::type >(Loc));
}
//! Convert to upper case
/*!
\overload
*/
template<typename SequenceT>
inline SequenceT to_upper_copy(
const SequenceT& Input,
const std::locale& Loc=std::locale())
{
return SequenceT(
make_transform_iterator(
begin(Input),
::boost::algorithm::detail::to_upperF<
typename range_value<SequenceT>::type >(Loc)),
make_transform_iterator(
end(Input),
::boost::algorithm::detail::to_upperF<
typename range_value<SequenceT>::type >(Loc)));
}
//! Convert to upper case
/*!
Each element of the input sequence is converted to upper
case. The input sequence is modified in-place.
\param Input An input range
\param Loc a locale used for conversion
*/
template<typename WritableRangeT>
inline void to_upper(
WritableRangeT& Input,
const std::locale& Loc=std::locale())
{
std::transform(
begin(Input),
end(Input),
begin(Input),
::boost::algorithm::detail::to_upperF<
typename range_value<WritableRangeT>::type >(Loc));
}
} // namespace algorithm
include/boost/algorithm/string/classification.hpp view on Meta::CPAN
// 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)
// See http://www.boost.org for updates, documentation, and revision history.
#ifndef BOOST_STRING_CLASSIFICATION_HPP
#define BOOST_STRING_CLASSIFICATION_HPP
#include <algorithm>
#include <locale>
#include <boost/range/value_type.hpp>
#include <boost/algorithm/string/detail/classification.hpp>
#include <boost/algorithm/string/predicate_facade.hpp>
/*! \file
Classification predicates are included in the library to give
some more convenience when using algorithms like \c trim() and \c all().
They wrap functionality of STL classification functions ( e.g. \c std::isspace() )
into generic functors.
*/
include/boost/algorithm/string/classification.hpp view on Meta::CPAN
namespace algorithm {
// classification functor generator -------------------------------------//
//! is_classified predicate
/*!
Construct the \c is_classified predicate. This predicate holds if the input is
of specified \c std::ctype category.
\param Type A \c std::ctype category
\param Loc A locale used for classification
\return An instance of the \c is_classified predicate
*/
inline detail::is_classifiedF
is_classified(std::ctype_base::mask Type, const std::locale& Loc=std::locale())
{
return detail::is_classifiedF(Type, Loc);
}
//! is_space predicate
/*!
Construct the \c is_classified predicate for the \c ctype_base::space category.
\param Loc A locale used for classification
\return An instance of the \c is_classified predicate
*/
inline detail::is_classifiedF
is_space(const std::locale& Loc=std::locale())
{
return detail::is_classifiedF(std::ctype_base::space, Loc);
}
//! is_alnum predicate
/*!
Construct the \c is_classified predicate for the \c ctype_base::alnum category.
\param Loc A locale used for classification
\return An instance of the \c is_classified predicate
*/
inline detail::is_classifiedF
is_alnum(const std::locale& Loc=std::locale())
{
return detail::is_classifiedF(std::ctype_base::alnum, Loc);
}
//! is_alpha predicate
/*!
Construct the \c is_classified predicate for the \c ctype_base::alpha category.
\param Loc A locale used for classification
\return An instance of the \c is_classified predicate
*/
inline detail::is_classifiedF
is_alpha(const std::locale& Loc=std::locale())
{
return detail::is_classifiedF(std::ctype_base::alpha, Loc);
}
//! is_cntrl predicate
/*!
Construct the \c is_classified predicate for the \c ctype_base::cntrl category.
\param Loc A locale used for classification
\return An instance of the \c is_classified predicate
*/
inline detail::is_classifiedF
is_cntrl(const std::locale& Loc=std::locale())
{
return detail::is_classifiedF(std::ctype_base::cntrl, Loc);
}
//! is_digit predicate
/*!
Construct the \c is_classified predicate for the \c ctype_base::digit category.
\param Loc A locale used for classification
\return An instance of the \c is_classified predicate
*/
inline detail::is_classifiedF
is_digit(const std::locale& Loc=std::locale())
{
return detail::is_classifiedF(std::ctype_base::digit, Loc);
}
//! is_graph predicate
/*!
Construct the \c is_classified predicate for the \c ctype_base::graph category.
\param Loc A locale used for classification
\return An instance of the \c is_classified predicate
*/
inline detail::is_classifiedF
is_graph(const std::locale& Loc=std::locale())
{
return detail::is_classifiedF(std::ctype_base::graph, Loc);
}
//! is_lower predicate
/*!
Construct the \c is_classified predicate for the \c ctype_base::lower category.
\param Loc A locale used for classification
\return An instance of \c is_classified predicate
*/
inline detail::is_classifiedF
is_lower(const std::locale& Loc=std::locale())
{
return detail::is_classifiedF(std::ctype_base::lower, Loc);
}
//! is_print predicate
/*!
Construct the \c is_classified predicate for the \c ctype_base::print category.
\param Loc A locale used for classification
\return An instance of the \c is_classified predicate
*/
inline detail::is_classifiedF
is_print(const std::locale& Loc=std::locale())
{
return detail::is_classifiedF(std::ctype_base::print, Loc);
}
//! is_punct predicate
/*!
Construct the \c is_classified predicate for the \c ctype_base::punct category.
\param Loc A locale used for classification
\return An instance of the \c is_classified predicate
*/
inline detail::is_classifiedF
is_punct(const std::locale& Loc=std::locale())
{
return detail::is_classifiedF(std::ctype_base::punct, Loc);
}
//! is_upper predicate
/*!
Construct the \c is_classified predicate for the \c ctype_base::upper category.
\param Loc A locale used for classification
\return An instance of the \c is_classified predicate
*/
inline detail::is_classifiedF
is_upper(const std::locale& Loc=std::locale())
{
return detail::is_classifiedF(std::ctype_base::upper, Loc);
}
//! is_xdigit predicate
/*!
Construct the \c is_classified predicate for the \c ctype_base::xdigit category.
\param Loc A locale used for classification
\return An instance of the \c is_classified predicate
*/
inline detail::is_classifiedF
is_xdigit(const std::locale& Loc=std::locale())
{
return detail::is_classifiedF(std::ctype_base::xdigit, Loc);
}
//! is_any_of predicate
/*!
Construct the \c is_any_of predicate. The predicate holds if the input
is included in the specified set of characters.
\param Set A set of characters to be recognized
include/boost/algorithm/string/compare.hpp view on Meta::CPAN
// 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)
// See http://www.boost.org for updates, documentation, and revision history.
#ifndef BOOST_STRING_COMPARE_HPP
#define BOOST_STRING_COMPARE_HPP
#include <boost/algorithm/string/config.hpp>
#include <locale>
/*! \file
Defines element comparison predicates. Many algorithms in this library can
take an additional argument with a predicate used to compare elements.
This makes it possible, for instance, to have case insensitive versions
of the algorithms.
*/
namespace boost {
namespace algorithm {
include/boost/algorithm/string/compare.hpp view on Meta::CPAN
template< typename T1, typename T2 >
bool operator ()( const T1& Arg1, const T2& Arg2 ) const
{
return Arg1==Arg2;
}
};
//! case insensitive version of is_equal
/*!
Case insensitive comparison predicate. Comparison is done using
specified locales.
*/
struct is_iequal
{
//! Constructor
/*!
\param Loc locales used for comparison
*/
is_iequal( const std::locale& Loc=std::locale() ) :
m_Loc( Loc ) {}
//! Function operator
/*!
Compare two operands. Case is ignored.
*/
template< typename T1, typename T2 >
bool operator ()( const T1& Arg1, const T2& Arg2 ) const
{
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
return std::toupper(Arg1)==std::toupper(Arg2);
#else
return std::toupper(Arg1,m_Loc)==std::toupper(Arg2,m_Loc);
#endif
}
private:
std::locale m_Loc;
};
} // namespace algorithm
// pull names to the boost namespace
using algorithm::is_equal;
using algorithm::is_iequal;
} // namespace boost
include/boost/algorithm/string/detail/case_conv.hpp view on Meta::CPAN
// 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)
// See http://www.boost.org for updates, documentation, and revision history.
#ifndef BOOST_STRING_CASE_CONV_DETAIL_HPP
#define BOOST_STRING_CASE_CONV_DETAIL_HPP
#include <boost/algorithm/string/config.hpp>
#include <locale>
#include <functional>
namespace boost {
namespace algorithm {
namespace detail {
// case conversion functors -----------------------------------------------//
// a tolower functor
template<typename CharT>
struct to_lowerF : public std::unary_function<CharT, CharT>
{
// Constructor
to_lowerF( const std::locale& Loc ) : m_Loc( Loc ) {}
// Operation
CharT operator ()( CharT Ch ) const
{
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
return std::tolower( Ch);
#else
return std::tolower( Ch, m_Loc );
#endif
}
private:
const std::locale& m_Loc;
};
// a toupper functor
template<typename CharT>
struct to_upperF : public std::unary_function<CharT, CharT>
{
// Constructor
to_upperF( const std::locale& Loc ) : m_Loc( Loc ) {}
// Operation
CharT operator ()( CharT Ch ) const
{
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
return std::toupper( Ch);
#else
return std::toupper( Ch, m_Loc );
#endif
}
private:
const std::locale& m_Loc;
};
} // namespace detail
} // namespace algorithm
} // namespace boost
#endif // BOOST_STRING_CASE_CONV_DETAIL_HPP
include/boost/algorithm/string/detail/classification.hpp view on Meta::CPAN
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#ifndef BOOST_STRING_CLASSIFICATION_DETAIL_HPP
#define BOOST_STRING_CLASSIFICATION_DETAIL_HPP
#include <boost/algorithm/string/config.hpp>
#include <algorithm>
#include <functional>
#include <locale>
#include <set>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/algorithm/string/predicate_facade.hpp>
#include <boost/type_traits/remove_const.hpp>
namespace boost {
namespace algorithm {
include/boost/algorithm/string/detail/classification.hpp view on Meta::CPAN
// classification functors -----------------------------------------------//
// is_classified functor
struct is_classifiedF :
public predicate_facade<is_classifiedF>
{
// Boost.Lambda support
template <class Args> struct sig { typedef bool type; };
// Constructor from a locale
is_classifiedF(std::ctype_base::mask Type, std::locale const & Loc = std::locale()) :
m_Type(Type), m_Locale(Loc) {}
// Operation
template<typename CharT>
bool operator()( CharT Ch ) const
{
return std::use_facet< std::ctype<CharT> >(m_Locale).is( m_Type, Ch );
}
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL)
template<>
bool operator()( char const Ch ) const
{
return std::use_facet< std::ctype<char> >(m_Locale).is( m_Type, Ch );
}
#endif
private:
const std::ctype_base::mask m_Type;
const std::locale m_Locale;
};
// is_any_of functor
/*
returns true if the value is from the specified set
*/
template<typename CharT>
struct is_any_ofF :
public predicate_facade<is_any_ofF<CharT> >
{
include/boost/algorithm/string/erase.hpp view on Meta::CPAN
//! Erase first algorithm ( case insensitive )
/*!
Remove the first occurrence of the substring from the input.
The result is a modified copy of the input. It is returned as a sequence
or copied to the output iterator.
Searching is case insensitive.
\param Output An output iterator to which the result will be copied
\param Input An input string
\param Search A substring to be searched for
\param Loc A locale used for case insensitive comparison
\return An output iterator pointing just after the last inserted character or
a modified copy of the input
\note The second variant of this function provides the strong exception-safety guarantee
*/
template<
typename OutputIteratorT,
typename Range1T,
typename Range2T>
inline OutputIteratorT ierase_first_copy(
OutputIteratorT Output,
const Range1T& Input,
const Range2T& Search,
const std::locale& Loc=std::locale() )
{
return find_format_copy(
Output,
Input,
first_finder(Search, is_iequal(Loc)),
empty_formatter(Input) );
}
//! Erase first algorithm ( case insensitive )
/*!
\overload
*/
template<typename SequenceT, typename RangeT>
inline SequenceT ierase_first_copy(
const SequenceT& Input,
const RangeT& Search,
const std::locale& Loc=std::locale() )
{
return find_format_copy(
Input,
first_finder(Search, is_iequal(Loc)),
empty_formatter(Input) );
}
//! Erase first algorithm ( case insensitive )
/*!
Remove the first occurrence of the substring from the input.
The input sequence is modified in-place. Searching is case insensitive.
\param Input An input string
\param Search A substring to be searched for
\param Loc A locale used for case insensitive comparison
*/
template<typename SequenceT, typename RangeT>
inline void ierase_first(
SequenceT& Input,
const RangeT& Search,
const std::locale& Loc=std::locale() )
{
find_format(
Input,
first_finder(Search, is_iequal(Loc)),
empty_formatter(Input) );
}
// erase_last --------------------------------------------------------//
//! Erase last algorithm
include/boost/algorithm/string/erase.hpp view on Meta::CPAN
//! Erase last algorithm ( case insensitive )
/*!
Remove the last occurrence of the substring from the input.
The result is a modified copy of the input. It is returned as a sequence
or copied to the output iterator.
Searching is case insensitive.
\param Output An output iterator to which the result will be copied
\param Input An input string
\param Search A substring to be searched for
\param Loc A locale used for case insensitive comparison
\return An output iterator pointing just after the last inserted character or
a modified copy of the input
\note The second variant of this function provides the strong exception-safety guarantee
*/
template<
typename OutputIteratorT,
typename Range1T,
typename Range2T>
inline OutputIteratorT ierase_last_copy(
OutputIteratorT Output,
const Range1T& Input,
const Range2T& Search,
const std::locale& Loc=std::locale() )
{
return find_format_copy(
Output,
Input,
last_finder(Search, is_iequal(Loc)),
empty_formatter(Input) );
}
//! Erase last algorithm ( case insensitive )
/*!
\overload
*/
template<typename SequenceT, typename RangeT>
inline SequenceT ierase_last_copy(
const SequenceT& Input,
const RangeT& Search,
const std::locale& Loc=std::locale() )
{
return find_format_copy(
Input,
last_finder(Search, is_iequal(Loc)),
empty_formatter(Input) );
}
//! Erase last algorithm ( case insensitive )
/*!
Remove the last occurrence of the substring from the input.
The input sequence is modified in-place. Searching is case insensitive.
\param Input An input string
\param Search A substring to be searched for
\param Loc A locale used for case insensitive comparison
*/
template<typename SequenceT, typename RangeT>
inline void ierase_last(
SequenceT& Input,
const RangeT& Search,
const std::locale& Loc=std::locale() )
{
find_format(
Input,
last_finder(Search, is_iequal(Loc)),
empty_formatter(Input) );
}
// erase_nth --------------------------------------------------------------------//
//! Erase nth algorithm
include/boost/algorithm/string/erase.hpp view on Meta::CPAN
/*!
Remove the Nth occurrence of the substring in the input.
The result is a modified copy of the input. It is returned as a sequence
or copied to the output iterator.
Searching is case insensitive.
\param Output An output iterator to which the result will be copied
\param Input An input string
\param Search A substring to be searched for.
\param Nth An index of the match to be replaced. The index is 0-based.
\param Loc A locale used for case insensitive comparison
\return An output iterator pointing just after the last inserted character or
a modified copy of the input
\note The second variant of this function provides the strong exception-safety guarantee
*/
template<
typename OutputIteratorT,
typename Range1T,
typename Range2T>
inline OutputIteratorT ierase_nth_copy(
OutputIteratorT Output,
const Range1T& Input,
const Range2T& Search,
unsigned int Nth,
const std::locale& Loc=std::locale() )
{
return find_format_copy(
Output,
Input,
nth_finder(Search, Nth, is_iequal(Loc)),
empty_formatter(Input) );
}
//! Erase nth algorithm
/*!
\overload
*/
template<typename SequenceT, typename RangeT>
inline SequenceT ierase_nth_copy(
const SequenceT& Input,
const RangeT& Search,
unsigned int Nth,
const std::locale& Loc=std::locale() )
{
return find_format_copy(
Input,
nth_finder(Search, Nth, is_iequal(Loc)),
empty_formatter(Input) );
}
//! Erase nth algorithm
/*!
Remove the Nth occurrence of the substring in the input.
The input sequence is modified in-place. Searching is case insensitive.
\param Input An input string
\param Search A substring to be searched for.
\param Nth An index of the match to be replaced. The index is 0-based.
\param Loc A locale used for case insensitive comparison
*/
template<typename SequenceT, typename RangeT>
inline void ierase_nth(
SequenceT& Input,
const RangeT& Search,
unsigned int Nth,
const std::locale& Loc=std::locale() )
{
find_format(
Input,
nth_finder(Search, Nth, is_iequal(Loc)),
empty_formatter(Input) );
}
// erase_all --------------------------------------------------------//
include/boost/algorithm/string/erase.hpp view on Meta::CPAN
//! Erase all algorithm ( case insensitive )
/*!
Remove all the occurrences of the string from the input.
The result is a modified copy of the input. It is returned as a sequence
or copied to the output iterator.
Searching is case insensitive.
\param Output An output iterator to which the result will be copied
\param Input An input string
\param Search A substring to be searched for
\param Loc A locale used for case insensitive comparison
\return An output iterator pointing just after the last inserted character or
a modified copy of the input
\note The second variant of this function provides the strong exception-safety guarantee
*/
template<
typename OutputIteratorT,
typename Range1T,
typename Range2T>
inline OutputIteratorT ierase_all_copy(
OutputIteratorT Output,
const Range1T& Input,
const Range2T& Search,
const std::locale& Loc=std::locale() )
{
return find_format_all_copy(
Output,
Input,
first_finder(Search, is_iequal(Loc)),
empty_formatter(Input) );
}
//! Erase all algorithm ( case insensitive )
/*!
\overload
*/
template<typename SequenceT, typename RangeT>
inline SequenceT ierase_all_copy(
const SequenceT& Input,
const RangeT& Search,
const std::locale& Loc=std::locale() )
{
return find_format_all_copy(
Input,
first_finder(Search, is_iequal(Loc)),
empty_formatter(Input) );
}
//! Erase all algorithm ( case insensitive )
/*!
Remove all the occurrences of the string from the input.
The input sequence is modified in-place. Searching is case insensitive.
\param Input An input string
\param Search A substring to be searched for.
\param Loc A locale used for case insensitive comparison
*/
template<typename SequenceT, typename RangeT>
inline void ierase_all(
SequenceT& Input,
const RangeT& Search,
const std::locale& Loc=std::locale() )
{
find_format_all(
Input,
first_finder(Search, is_iequal(Loc)),
empty_formatter(Input) );
}
// erase_head --------------------------------------------------------------------//
//! Erase head algorithm
include/boost/algorithm/string/find.hpp view on Meta::CPAN
begin(Input),end(Input));
}
//! Find first algorithm ( case insensitive )
/*!
Search for the first occurence of the substring in the input.
Searching is case insensitive.
\param Input A string which will be searched.
\param Search A substring to be searched for.
\param Loc A locale used for case insensitive comparison
\return
An \c iterator_range delimiting the match.
Returned iterator is either \c Range1T::iterator or
\c Range1T::const_iterator, depending on the constness of
the input parameter.
\note This function provides the strong exception-safety guarantee
*/
template<typename Range1T, typename Range2T>
inline iterator_range<
BOOST_STRING_TYPENAME range_result_iterator<Range1T>::type>
ifind_first(
Range1T& Input,
const Range2T& Search,
const std::locale& Loc=std::locale())
{
return first_finder(Search,is_iequal(Loc))(
begin(Input),end(Input));
}
// find_last -----------------------------------------------//
//! Find last algorithm
/*!
Search for the last occurence of the substring in the input.
include/boost/algorithm/string/find.hpp view on Meta::CPAN
begin(Input),end(Input));
}
//! Find last algorithm ( case insensitive )
/*!
Search for the last match a string in the input.
Searching is case insensitive.
\param Input A string which will be searched.
\param Search A substring to be searched for.
\param Loc A locale used for case insensitive comparison
\return
An \c iterator_range delimiting the match.
Returned iterator is either \c Range1T::iterator or
\c Range1T::const_iterator, depending on the constness of
the input parameter.
\note This function provides the strong exception-safety guarantee
*/
template<typename Range1T, typename Range2T>
inline iterator_range<
BOOST_STRING_TYPENAME range_result_iterator<Range1T>::type>
ifind_last(
Range1T& Input,
const Range2T& Search,
const std::locale& Loc=std::locale())
{
return last_finder(Search, is_iequal(Loc))(
begin(Input),end(Input));
}
// find_nth ----------------------------------------------------------------------//
//! Find n-th algorithm
/*!
Search for the n-th (zero-indexed) occurence of the substring in the
include/boost/algorithm/string/find.hpp view on Meta::CPAN
}
//! Find n-th algorithm ( case insensitive ).
/*!
Search for the n-th (zero-indexed) occurence of the substring in the
input. Searching is case insensitive.
\param Input A string which will be searched.
\param Search A substring to be searched for.
\param Nth An index (zero-indexed) of the match to be found.
\param Loc A locale used for case insensitive comparison
\return
An \c iterator_range delimiting the match.
Returned iterator is either \c Range1T::iterator or
\c Range1T::const_iterator, depending on the constness of
the input parameter.
\note This function provides the strong exception-safety guarantee
*/
template<typename Range1T, typename Range2T>
inline iterator_range<
BOOST_STRING_TYPENAME range_result_iterator<Range1T>::type>
ifind_nth(
Range1T& Input,
const Range2T& Search,
unsigned int Nth,
const std::locale& Loc=std::locale())
{
return nth_finder(Search,Nth,is_iequal(Loc))(
begin(Input),end(Input));
}
// find_head ----------------------------------------------------------------------//
//! Find head algorithm
/*!
Get the head of the input. Head is a prefix of the string of the
include/boost/algorithm/string/predicate.hpp view on Meta::CPAN
}
//! 'Starts with' predicate ( case insensitive )
/*!
This predicate holds when the test string is a prefix of the Input.
In other words, if the input starts with the test.
Elements are compared case insensitively.
\param Input An input sequence
\param Test A test sequence
\param Loc A locale used for case insensitive comparison
\return The result of the test
\note This function provides the strong exception-safety guarantee
*/
template<typename Range1T, typename Range2T>
inline bool istarts_with(
const Range1T& Input,
const Range2T& Test,
const std::locale& Loc=std::locale())
{
return starts_with(Input, Test, is_iequal(Loc));
}
// ends_with predicate -----------------------------------------------//
//! 'Ends with' predicate
/*!
This predicate holds when the test string is a suffix of the Input.
include/boost/algorithm/string/predicate.hpp view on Meta::CPAN
}
//! 'Ends with' predicate ( case insensitive )
/*!
This predicate holds when the test container is a suffix of the Input.
In other words, if the input ends with the test.
Elements are compared case insensitively.
\param Input An input sequence
\param Test A test sequence
\param Loc A locale used for case insensitive comparison
\return The result of the test
\note This function provides the strong exception-safety guarantee
*/
template<typename Range1T, typename Range2T>
inline bool iends_with(
const Range1T& Input,
const Range2T& Test,
const std::locale& Loc=std::locale())
{
return ends_with(Input, Test, is_iequal(Loc));
}
// contains predicate -----------------------------------------------//
//! 'Contains' predicate
/*!
This predicate holds when the test container is contained in the Input.
When the optional predicate is specified, it is used for character-wise
include/boost/algorithm/string/predicate.hpp view on Meta::CPAN
return contains(Input, Test, is_equal());
}
//! 'Contains' predicate ( case insensitive )
/*!
This predicate holds when the test container is contained in the Input.
Elements are compared case insensitively.
\param Input An input sequence
\param Test A test sequence
\param Loc A locale used for case insensitive comparison
\return The result of the test
\note This function provides the strong exception-safety guarantee
*/
template<typename Range1T, typename Range2T>
inline bool icontains(
const Range1T& Input,
const Range2T& Test,
const std::locale& Loc=std::locale())
{
return contains(Input, Test, is_iequal(Loc));
}
// equals predicate -----------------------------------------------//
//! 'Equals' predicate
/*!
This predicate holds when the test container is equal to the
input container i.e. all elements in both containers are same.
include/boost/algorithm/string/predicate.hpp view on Meta::CPAN
}
//! 'Equals' predicate ( casa insensitive )
/*!
This predicate holds when the test container is equal to the
input container i.e. all elements in both containers are same.
Elements are compared case insensitively.
\param Input An input sequence
\param Test A test sequence
\param Loc A locale used for case insensitive comparison
\return The result of the test
\note This is a two-way version of \c std::equal algorithm
\note This function provides the strong exception-safety guarantee
*/
template<typename Range1T, typename Range2T>
inline bool iequals(
const Range1T& Input,
const Range2T& Test,
const std::locale& Loc=std::locale())
{
return equals(Input, Test, is_iequal(Loc));
}
// all predicate -----------------------------------------------//
//! 'All' predicate
/*!
This predicate holds it all its elements satisfy a given
condition, represented by the predicate.
include/boost/algorithm/string/replace.hpp view on Meta::CPAN
Replace the first match of the search substring in the input
with the format string.
The result is a modified copy of the input. It is returned as a sequence
or copied to the output iterator.
Searching is case insensitive.
\param Output An output iterator to which the result will be copied
\param Input An input string
\param Search A substring to be searched for
\param Format A substitute string
\param Loc A locale used for case insensitive comparison
\return An output iterator pointing just after the last inserted character or
a modified copy of the input
\note The second variant of this function provides the strong exception-safety guarantee
*/
template<
typename OutputIteratorT,
typename Range1T,
typename Range2T,
typename Range3T>
inline OutputIteratorT ireplace_first_copy(
OutputIteratorT Output,
const Range1T& Input,
const Range2T& Search,
const Range3T& Format,
const std::locale& Loc=std::locale() )
{
return find_format_copy(
Output,
Input,
first_finder(Search, is_iequal(Loc)),
const_formatter(Format) );
}
//! Replace first algorithm ( case insensitive )
/*!
\overload
*/
template<typename SequenceT, typename Range2T, typename Range1T>
inline SequenceT ireplace_first_copy(
const SequenceT& Input,
const Range2T& Search,
const Range1T& Format,
const std::locale& Loc=std::locale() )
{
return find_format_copy(
Input,
first_finder(Search, is_iequal(Loc)),
const_formatter(Format) );
}
//! Replace first algorithm ( case insensitive )
/*!
Replace the first match of the search substring in the input
with the format string. Input sequence is modified in-place.
Searching is case insensitive.
\param Input An input string
\param Search A substring to be searched for
\param Format A substitute string
\param Loc A locale used for case insensitive comparison
*/
template<typename SequenceT, typename Range1T, typename Range2T>
inline void ireplace_first(
SequenceT& Input,
const Range1T& Search,
const Range2T& Format,
const std::locale& Loc=std::locale() )
{
find_format(
Input,
first_finder(Search, is_iequal(Loc)),
const_formatter(Format) );
}
// replace_last --------------------------------------------------------------------//
//! Replace last algorithm
include/boost/algorithm/string/replace.hpp view on Meta::CPAN
Replace the last match of the search string in the input
with the format string.
The result is a modified copy of the input. It is returned as a sequence
or copied to the output iterator.
Searching is case insensitive.
\param Output An output iterator to which the result will be copied
\param Input An input string
\param Search A substring to be searched for
\param Format A substitute string
\param Loc A locale used for case insensitive comparison
\return An output iterator pointing just after the last inserted character or
a modified copy of the input
\note The second variant of this function provides the strong exception-safety guarantee
*/
template<
typename OutputIteratorT,
typename Range1T,
typename Range2T,
typename Range3T>
inline OutputIteratorT ireplace_last_copy(
OutputIteratorT Output,
const Range1T& Input,
const Range2T& Search,
const Range3T& Format,
const std::locale& Loc=std::locale() )
{
return find_format_copy(
Output,
Input,
last_finder(Search, is_iequal(Loc)),
const_formatter(Format) );
}
//! Replace last algorithm ( case insensitive )
/*!
\overload
*/
template<typename SequenceT, typename Range1T, typename Range2T>
inline SequenceT ireplace_last_copy(
const SequenceT& Input,
const Range1T& Search,
const Range2T& Format,
const std::locale& Loc=std::locale() )
{
return find_format_copy(
Input,
last_finder(Search, is_iequal(Loc)),
const_formatter(Format) );
}
//! Replace last algorithm ( case insensitive )
/*!
Replace the last match of the search string in the input
with the format string.The input sequence is modified in-place.
Searching is case insensitive.
\param Input An input string
\param Search A substring to be searched for
\param Format A substitute string
\param Loc A locale used for case insensitive comparison
\return A reference to the modified input
*/
template<typename SequenceT, typename Range1T, typename Range2T>
inline void ireplace_last(
SequenceT& Input,
const Range1T& Search,
const Range2T& Format,
const std::locale& Loc=std::locale() )
{
find_format(
Input,
last_finder(Search, is_iequal(Loc)),
const_formatter(Format) );
}
// replace_nth --------------------------------------------------------------------//
//! Replace nth algorithm
include/boost/algorithm/string/replace.hpp view on Meta::CPAN
with the format string.
The result is a modified copy of the input. It is returned as a sequence
or copied to the output iterator.
Searching is case insensitive.
\param Output An output iterator to which the result will be copied
\param Input An input string
\param Search A substring to be searched for
\param Nth An index of the match to be replaced. The index is 0-based.
\param Format A substitute string
\param Loc A locale used for case insensitive comparison
\return An output iterator pointing just after the last inserted character or
a modified copy of the input
\note The second variant of this function provides the strong exception-safety guarantee
*/
template<
typename OutputIteratorT,
typename Range1T,
typename Range2T,
typename Range3T>
inline OutputIteratorT ireplace_nth_copy(
OutputIteratorT Output,
const Range1T& Input,
const Range2T& Search,
unsigned int Nth,
const Range3T& Format,
const std::locale& Loc=std::locale() )
{
return find_format_copy(
Output,
Input,
nth_finder(Search, Nth, is_iequal(Loc) ),
const_formatter(Format) );
}
//! Replace nth algorithm ( case insensitive )
/*!
\overload
*/
template<typename SequenceT, typename Range1T, typename Range2T>
inline SequenceT ireplace_nth_copy(
const SequenceT& Input,
const Range1T& Search,
unsigned int Nth,
const Range2T& Format,
const std::locale& Loc=std::locale() )
{
return find_format_copy(
Input,
nth_finder(Search, Nth, is_iequal(Loc)),
const_formatter(Format) );
}
//! Replace nth algorithm ( case insensitive )
/*!
Replace an Nth (zero-indexed) match of the search string in the input
with the format string. Input sequence is modified in-place.
Searching is case insensitive.
\param Input An input string
\param Search A substring to be searched for
\param Nth An index of the match to be replaced. The index is 0-based.
\param Format A substitute string
\param Loc A locale used for case insensitive comparison
*/
template<typename SequenceT, typename Range1T, typename Range2T>
inline void ireplace_nth(
SequenceT& Input,
const Range1T& Search,
unsigned int Nth,
const Range2T& Format,
const std::locale& Loc=std::locale() )
{
find_format(
Input,
nth_finder(Search, Nth, is_iequal(Loc)),
const_formatter(Format) );
}
// replace_all --------------------------------------------------------------------//
//! Replace all algorithm
include/boost/algorithm/string/replace.hpp view on Meta::CPAN
Replace all occurrences of the search string in the input
with the format string.
The result is a modified copy of the input. It is returned as a sequence
or copied to the output iterator.
Searching is case insensitive.
\param Output An output iterator to which the result will be copied
\param Input An input string
\param Search A substring to be searched for
\param Format A substitute string
\param Loc A locale used for case insensitive comparison
\return An output iterator pointing just after the last inserted character or
a modified copy of the input
\note The second variant of this function provides the strong exception-safety guarantee
*/
template<
typename OutputIteratorT,
typename Range1T,
typename Range2T,
typename Range3T>
inline OutputIteratorT ireplace_all_copy(
OutputIteratorT Output,
const Range1T& Input,
const Range2T& Search,
const Range3T& Format,
const std::locale& Loc=std::locale() )
{
return find_format_all_copy(
Output,
Input,
first_finder(Search, is_iequal(Loc)),
const_formatter(Format) );
}
//! Replace all algorithm ( case insensitive )
/*!
\overload
*/
template<typename SequenceT, typename Range1T, typename Range2T>
inline SequenceT ireplace_all_copy(
const SequenceT& Input,
const Range1T& Search,
const Range2T& Format,
const std::locale& Loc=std::locale() )
{
return find_format_all_copy(
Input,
first_finder(Search, is_iequal(Loc)),
const_formatter(Format) );
}
//! Replace all algorithm ( case insensitive )
/*!
Replace all occurrences of the search string in the input
with the format string.The input sequence is modified in-place.
Searching is case insensitive.
\param Input An input string
\param Search A substring to be searched for
\param Format A substitute string
\param Loc A locale used for case insensitive comparison
*/
template<typename SequenceT, typename Range1T, typename Range2T>
inline void ireplace_all(
SequenceT& Input,
const Range1T& Search,
const Range2T& Format,
const std::locale& Loc=std::locale() )
{
find_format_all(
Input,
first_finder(Search, is_iequal(Loc)),
const_formatter(Format) );
}
// replace_head --------------------------------------------------------------------//
//! Replace head algorithm
include/boost/algorithm/string/split.hpp view on Meta::CPAN
of the matches (in a compatible structure like std::string) or
a reference to it (e.g. using the iterator range class).
Examples of such a container are \c std::vector<std::string>
or \c std::list<boost::iterator_range<std::string::iterator>>
Searching is case insensitive.
\param Result A container that can hold copies of references to the substrings
\param Input A container which will be searched.
\param Search A substring to be searched for.
\param Loc A locale used for case insensitive comparison
\return A reference the result
\note Prior content of the result will be overwritten.
\note This function provides the strong exception-safety guarantee
*/
template< typename SequenceSequenceT, typename Range1T, typename Range2T >
inline SequenceSequenceT& ifind_all(
SequenceSequenceT& Result,
Range1T& Input,
const Range2T& Search,
const std::locale& Loc=std::locale() )
{
return iter_find(
Result,
Input,
first_finder(Search, is_iequal(Loc) ) );
}
// tokenize -------------------------------------------------------------//
include/boost/algorithm/string/trim.hpp view on Meta::CPAN
#define BOOST_STRING_TRIM_HPP
#include <boost/algorithm/string/config.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/const_iterator.hpp>
#include <boost/algorithm/string/detail/trim.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <locale>
/*! \file
Defines trim algorithms.
Trim algorithms are used to remove trailing and leading spaces from a
sequence (string). Space is recognized using given locales.
Parametric (\c _if) variants use a predicate (functor) to select which characters
are to be trimmed..
Functions take a selection predicate as a parameter, which is used to determine
whether a character is a space. Common predicates are provided in classification.hpp header.
*/
namespace boost {
namespace algorithm {
include/boost/algorithm/string/trim.hpp view on Meta::CPAN
IsSpace ),
end(Input));
}
//! Left trim - parametric
/*!
Remove all leading spaces from the input.
The result is a trimmed copy of the input.
\param Input An input sequence
\param Loc a locale used for 'space' classification
\return A trimmed copy of the input
\note This function provides the strong exception-safety guarantee
*/
template<typename SequenceT>
inline SequenceT trim_left_copy(const SequenceT& Input, const std::locale& Loc=std::locale())
{
return
trim_left_copy_if(
Input,
is_space(Loc));
}
//! Left trim
/*!
Remove all leading spaces from the input. The supplied predicate is
include/boost/algorithm/string/trim.hpp view on Meta::CPAN
end(Input),
IsSpace));
}
//! Left trim
/*!
Remove all leading spaces from the input.
The Input sequence is modified in-place.
\param Input An input sequence
\param Loc A locale used for 'space' classification
*/
template<typename SequenceT>
inline void trim_left(SequenceT& Input, const std::locale& Loc=std::locale())
{
trim_left_if(
Input,
is_space(Loc));
}
// right trim -----------------------------------------------//
//! Right trim - parametric
/*!
include/boost/algorithm/string/trim.hpp view on Meta::CPAN
IsSpace)
);
}
//! Right trim
/*!
Remove all trailing spaces from the input.
The result is a trimmed copy of the input
\param Input An input sequence
\param Loc A locale used for 'space' classification
\return A trimmed copy of the input
\note This function provides the strong exception-safety guarantee
*/
template<typename SequenceT>
inline SequenceT trim_right_copy(const SequenceT& Input, const std::locale& Loc=std::locale())
{
return
trim_right_copy_if(
Input,
is_space(Loc));
}
//! Right trim - parametric
/*!
include/boost/algorithm/string/trim.hpp view on Meta::CPAN
);
}
//! Right trim
/*!
Remove all trailing spaces from the input.
The input sequence is modified in-place.
\param Input An input sequence
\param Loc A locale used for 'space' classification
*/
template<typename SequenceT>
inline void trim_right(SequenceT& Input, const std::locale& Loc=std::locale())
{
trim_right_if(
Input,
is_space(Loc) );
}
// both side trim -----------------------------------------------//
//! Trim - parametric
/*!
include/boost/algorithm/string/trim.hpp view on Meta::CPAN
TrimEnd
);
}
//! Trim
/*!
Remove all leading and trailing spaces from the input.
The result is a trimmed copy of the input
\param Input An input sequence
\param Loc A locale used for 'space' classification
\return A trimmed copy of the input
\note This function provides the strong exception-safety guarantee
*/
template<typename SequenceT>
inline SequenceT trim_copy( const SequenceT& Input, const std::locale& Loc=std::locale() )
{
return
trim_copy_if(
Input,
is_space(Loc) );
}
//! Trim
/*!
Remove all leading and trailing spaces from the input.
include/boost/algorithm/string/trim.hpp view on Meta::CPAN
trim_right_if( Input, IsSpace );
trim_left_if( Input, IsSpace );
}
//! Trim
/*!
Remove all leading and trailing spaces from the input.
The input sequence is modified in-place.
\param Input An input sequence
\param Loc A locale used for 'space' classification
*/
template<typename SequenceT>
inline void trim(SequenceT& Input, const std::locale& Loc=std::locale())
{
trim_if(
Input,
is_space( Loc ) );
}
} // namespace algorithm
// pull names to the boost namespace
using algorithm::trim_left;
include/boost/archive/add_facet.hpp view on Meta::CPAN
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// add_facet.hpp
// (C) Copyright 2003 Robert Ramey - http://www.rrsd.com .
// 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)
// See http://www.boost.org for updates, documentation, and revision history.
#include <locale>
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
// does STLport uses native STL for locales?
#if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) \
&& defined(_STLP_NO_OWN_IOSTREAMS)
// and this native STL lib is old Dinkumware (has not defined _CPPLIB_VER)
# if (defined(_YVALS) && !defined(__IBMCPP__)) || !defined(_CPPLIB_VER)
# define BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT
# endif
#endif
namespace boost {
namespace archive {
template<class Facet>
inline std::locale *
add_facet(const std::locale &l, Facet * f){
return
#if defined BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT
// std namespace used for native locale
new std::locale(std::_Addfac(l, f));
#elif BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) // old Dinkumwar
// std namespace used for native locale
new std::locale(std::_Addfac(l, f));
#else
// standard compatible
new std::locale(l, f);
#endif
}
} // namespace archive
} // namespace boost
#undef BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT
#endif // BOOST_ARCHIVE_ADD_FACET_HPP
include/boost/archive/basic_binary_iprimitive.hpp view on Meta::CPAN
protected:
#else
public:
#endif
// return a pointer to the most derived class
Archive * This(){
return static_cast<Archive *>(this);
}
// native streams are always handled as bytes
IStream &is;
boost::scoped_ptr<std::locale> archive_locale;
io::basic_ios_locale_saver<
BOOST_DEDUCED_TYPENAME IStream::char_type, BOOST_DEDUCED_TYPENAME IStream::traits_type
> locale_saver;
// main template for serilization of primitive types
template<class T>
void load(T & t){
load_binary(& t, sizeof(T));
}
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
load(std::string &s);
#ifndef BOOST_NO_STD_WSTRING
include/boost/archive/basic_binary_oprimitive.hpp view on Meta::CPAN
// archives stored as native binary - this should be the fastest way
// to archive the state of a group of obects. It makes no attempt to
// convert to any canonical form.
// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE
// ON PLATFORM APART FROM THE ONE THEY ARE CREATE ON
#include <iosfwd>
#include <cassert>
#include <locale>
#include <cstddef> // size_t
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::size_t;
} // namespace std
#endif
#include <boost/cstdint.hpp>
include/boost/archive/basic_binary_oprimitive.hpp view on Meta::CPAN
protected:
#else
public:
#endif
// return a pointer to the most derived class
Archive * This(){
return static_cast<Archive *>(this);
}
// native binary streams are handled as bytes
OStream &os;
boost::scoped_ptr<std::locale> archive_locale;
io::basic_ios_locale_saver<
BOOST_DEDUCED_TYPENAME OStream::char_type,
BOOST_DEDUCED_TYPENAME OStream::traits_type
> locale_saver;
// default saving of primitives.
template<class T>
void save(const T & t)
{
save_binary(& t, sizeof(T));
}
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
save(const std::string &s);
include/boost/archive/basic_text_iprimitive.hpp view on Meta::CPAN
// archives stored as text - note these ar templated on the basic
// stream templates to accommodate wide (and other?) kind of characters
//
// note the fact that on libraries without wide characters, ostream is
// is not a specialization of basic_ostream which in fact is not defined
// in such cases. So we can't use basic_ostream<IStream::char_type> but rather
// use two template parameters
#include <cassert>
#include <locale>
#include <cstddef> // size_t
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::size_t;
#if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT)
using ::locale;
#endif
} // namespace std
#endif
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
#include <boost/archive/dinkumware.hpp>
#endif
#include <boost/throw_exception.hpp>
include/boost/archive/basic_text_iprimitive.hpp view on Meta::CPAN
class basic_text_iprimitive
{
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
protected:
#else
public:
#endif
IStream &is;
io::ios_flags_saver flags_saver;
io::ios_precision_saver precision_saver;
boost::scoped_ptr<std::locale> archive_locale;
io::basic_ios_locale_saver<
BOOST_DEDUCED_TYPENAME IStream::char_type, BOOST_DEDUCED_TYPENAME IStream::traits_type
> locale_saver;
template<class T>
void load(T & t)
{
if(is.fail())
boost::throw_exception(archive_exception(archive_exception::stream_error));
is >> t;
}
void load(unsigned char & t)
{
if(is.fail())
include/boost/archive/basic_text_oprimitive.hpp view on Meta::CPAN
// in such cases. So we can't use basic_ostream<OStream::char_type> but rather
// use two template parameters
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
#include <boost/archive/dinkumware.hpp>
#endif
#include <iomanip>
#include <locale>
#include <cstddef> // size_t
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::size_t;
#if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT)
using ::locale;
#endif
} // namespace std
#endif
#include <boost/limits.hpp>
#include <boost/io/ios_state.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/throw_exception.hpp>
#include <boost/archive/archive_exception.hpp>
include/boost/archive/basic_text_oprimitive.hpp view on Meta::CPAN
class basic_text_oprimitive
{
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
protected:
#else
public:
#endif
OStream &os;
io::ios_flags_saver flags_saver;
io::ios_precision_saver precision_saver;
boost::scoped_ptr<std::locale> archive_locale;
io::basic_ios_locale_saver<
BOOST_DEDUCED_TYPENAME OStream::char_type, BOOST_DEDUCED_TYPENAME OStream::traits_type
> locale_saver;
// default saving of primitives.
template<class T>
void save(const T &t){
if(os.fail())
boost::throw_exception(archive_exception(archive_exception::stream_error));
os << t;
}
/////////////////////////////////////////////////////////
include/boost/archive/codecvt_null.hpp view on Meta::CPAN
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// codecvt_null.hpp:
// (C) Copyright 2004 Robert Ramey - http://www.rrsd.com .
// 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)
// See http://www.boost.org for updates, documentation, and revision history.
#include <locale>
#include <cstddef>
#include <boost/config.hpp>
namespace std{
#if defined(__LIBCOMO__)
using ::mbstate_t;
#elif defined(BOOST_DINKUMWARE_STDLIB)
using ::mbstate_t;
#elif defined(__SGI_STL_PORT)
include/boost/archive/codecvt_null.hpp view on Meta::CPAN
template<class Ch>
class codecvt_null;
template<>
class codecvt_null<char> : public std::codecvt<char, char, std::mbstate_t>
{
virtual bool do_always_noconv() const throw() {
return true;
}
public:
explicit codecvt_null(std::size_t no_locale_manage = 0) :
std::codecvt<char, char, std::mbstate_t>(no_locale_manage)
{}
};
template<>
class codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t>
{
virtual std::codecvt_base::result
do_out(
std::mbstate_t & state,
const wchar_t * first1,
include/boost/archive/codecvt_null.hpp view on Meta::CPAN
// this befuddles the msvc 6 compiler so we can't use it
#if ! ((defined _MSC_VER) && (_MSC_VER <= 1300)) \
&& ! defined(__BORLANDC__)
#if defined(__SGI_STL_PORT)
#if defined(_STLPORT_VERSION) && (_STLPORT_VERSION < 0x500)
namespace std {
#if 0
template <>
locale::locale(
const locale& __loc,
boost::archive::codecvt_null<char> * __f
){
_M_impl = 0;
// _M_impl = this->_S_copy_impl(__loc._M_impl, __f != 0);
new(this) locale(__loc._M_impl, __f != 0);
if (__f != 0)
this->_M_insert(__f, boost::archive::codecvt_null<char> ::id);
}
template <>
locale::locale(
const locale& __loc,
boost::archive::codecvt_null<wchar_t> * __f
){
_M_impl = 0;
// _M_impl = this->_S_copy_impl(__loc._M_impl, __f != 0);
new(this) locale(__loc._M_impl, __f != 0);
if (__f != 0)
this->_M_insert(__f, boost::archive::codecvt_null<wchar_t> ::id);
}
#endif
} // namespace std
#endif
#endif
#endif
include/boost/archive/impl/basic_binary_iprimitive.ipp view on Meta::CPAN
}
#endif
template<class Archive, class IStream>
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_binary_iprimitive<Archive, IStream>::basic_binary_iprimitive(
IStream &is_,
bool no_codecvt
) :
is(is_),
archive_locale(NULL),
locale_saver(is)
{
if(! no_codecvt){
archive_locale.reset(
boost::archive::add_facet(
std::locale::classic(),
new codecvt_null<BOOST_DEDUCED_TYPENAME IStream::char_type>
)
);
is.imbue(* archive_locale);
}
}
// scoped_ptr requires that archive_locale be a complete type at time of
// destruction so define destructor here rather than in the header
template<class Archive, class IStream>
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_binary_iprimitive<Archive, IStream>::~basic_binary_iprimitive(){
}
} // namespace archive
} // namespace boost
include/boost/archive/impl/basic_binary_oprimitive.ipp view on Meta::CPAN
#endif
#endif
template<class Archive, class OStream>
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_binary_oprimitive<Archive, OStream>::basic_binary_oprimitive(
OStream &os_,
bool no_codecvt
) :
os(os_),
archive_locale(NULL),
locale_saver(os)
{
if(! no_codecvt){
archive_locale.reset(
add_facet(
std::locale::classic(),
new codecvt_null<BOOST_DEDUCED_TYPENAME OStream::char_type>
)
);
os.imbue(* archive_locale);
}
}
// scoped_ptr requires that g be a complete type at time of
// destruction so define destructor here rather than in the header
template<class Archive, class OStream>
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_binary_oprimitive<Archive, OStream>::~basic_binary_oprimitive(){
BOOST_TRY {
os.flush();
include/boost/archive/impl/basic_text_iprimitive.ipp view on Meta::CPAN
template<class IStream>
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_text_iprimitive<IStream>::basic_text_iprimitive(
IStream &is_,
bool no_codecvt
) :
is(is_),
flags_saver(is_),
precision_saver(is_),
archive_locale(NULL),
locale_saver(is_)
{
if(! no_codecvt){
archive_locale.reset(
add_facet(
std::locale::classic(),
new codecvt_null<BOOST_DEDUCED_TYPENAME IStream::char_type>
)
);
is.imbue(* archive_locale);
}
is >> std::noboolalpha;
}
template<class IStream>
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_text_iprimitive<IStream>::~basic_text_iprimitive(){
}
} // namespace archive
include/boost/archive/impl/basic_text_oprimitive.ipp view on Meta::CPAN
template<class OStream>
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_text_oprimitive<OStream>::basic_text_oprimitive(
OStream & os_,
bool no_codecvt
) :
os(os_),
flags_saver(os_),
precision_saver(os_),
archive_locale(NULL),
locale_saver(os_)
{
if(! no_codecvt){
archive_locale.reset(
add_facet(
std::locale::classic(),
new codecvt_null<BOOST_DEDUCED_TYPENAME OStream::char_type>
)
);
os.imbue(* archive_locale);
}
os << std::noboolalpha;
}
template<class OStream>
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_text_oprimitive<OStream>::~basic_text_oprimitive(){
BOOST_TRY{
os.flush();
}
include/boost/archive/impl/text_oarchive_impl.ipp view on Meta::CPAN
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// 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)
// See http://www.boost.org for updates, documentation, and revision history.
#include <string>
#include <boost/config.hpp>
#include <locale>
#include <cstddef> // size_t
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::size_t;
} // namespace std
#endif
#ifndef BOOST_NO_CWCHAR
include/boost/archive/impl/xml_wiarchive_impl.ipp view on Meta::CPAN
unsigned int flags
) :
basic_text_iprimitive<std::wistream>(
is_,
true // don't change the codecvt - use the one below
),
basic_xml_iarchive<Archive>(flags),
gimpl(new xml_wgrammar())
{
if(0 == (flags & no_codecvt)){
archive_locale.reset(
add_facet(
std::locale::classic(),
new detail::utf8_codecvt_facet
)
);
is.imbue(* archive_locale);
}
if(0 == (flags & no_header))
this->init();
}
template<class Archive>
BOOST_WARCHIVE_DECL(BOOST_PP_EMPTY())
xml_wiarchive_impl<Archive>::~xml_wiarchive_impl(){
if(0 == (this->get_flags() & no_header)){
BOOST_TRY{
include/boost/archive/impl/xml_woarchive_impl.ipp view on Meta::CPAN
// 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)
#include <boost/config.hpp>
#ifndef BOOST_NO_STD_WSTREAMBUF
#include <ostream>
#include <string>
#include <algorithm>
#include <locale>
#include <boost/config.hpp> // msvc 6.0 needs this to suppress warnings
// for BOOST_DEDUCED_TYPENAME
#include <cstring> // strlen
#include <cstdlib> // mbtowc
#include <cwchar> // wcslen
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::strlen;
include/boost/archive/impl/xml_woarchive_impl.ipp view on Meta::CPAN
os_,
true // don't change the codecvt - use the one below
),
basic_xml_oarchive<Archive>(flags)
{
// Standard behavior is that imbue can be called
// a) before output is invoked or
// b) after flush has been called. This prevents one-to-many
// transforms (such as one to many transforms from getting
// mixed up. Unfortunately, STLPort doesn't respect b) above
// so the restoration of the original archive locale done by
// the locale_saver doesn't get processed,
// before the current one is destroyed.
// so the codecvt doesn't get replaced with the orginal
// so closing the stream invokes codecvt::do_unshift
// so it crashes because the corresponding locale that contained
// the codecvt isn't around any more.
// we can hack around this by using a static codecvt that never
// gets destroyed.
if(0 == (flags & no_codecvt)){
detail::utf8_codecvt_facet *pfacet;
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
static detail::utf8_codecvt_facet facet(static_cast<size_t>(1));
pfacet = & facet;
#else
pfacet = new detail::utf8_codecvt_facet;
#endif
archive_locale.reset(add_facet(std::locale::classic(), pfacet));
os.imbue(* archive_locale);
}
if(0 == (flags & no_header))
this->init();
}
} // namespace archive
} // namespace boost
#endif //BOOST_NO_STD_WSTREAMBUF
include/boost/archive/iterators/mb_from_wchar.hpp view on Meta::CPAN
#include <boost/pfto.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
namespace boost {
namespace archive {
namespace iterators {
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// class used by text archives to translate wide strings and to char
// strings of the currently selected locale
template<class Base> // the input iterator
class mb_from_wchar
: public boost::iterator_adaptor<
mb_from_wchar<Base>,
Base,
wchar_t,
single_pass_traversal_tag,
char
>
{
include/boost/archive/iterators/transform_width.hpp view on Meta::CPAN
#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/iterator/iterator_traits.hpp>
namespace boost {
namespace archive {
namespace iterators {
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// class used by text archives to translate char strings to wchar_t
// strings of the currently selected locale
template<
class Base,
int BitsOut,
int BitsIn,
class CharType = BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type // output character
>
class transform_width :
public boost::iterator_adaptor<
transform_width<Base, BitsOut, BitsIn, CharType>,
Base,
include/boost/archive/iterators/unescape.hpp view on Meta::CPAN
#include <boost/iterator/iterator_adaptor.hpp>
//#include <boost/iterator/iterator_traits.hpp>
#include <boost/pointee.hpp>
namespace boost {
namespace archive {
namespace iterators {
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// class used by text archives to translate char strings to wchar_t
// strings of the currently selected locale
template<class Derived, class Base>
class unescape
: public boost::iterator_adaptor<
unescape<Derived, Base>,
Base,
BOOST_DEDUCED_TYPENAME pointee<Base>::type,
single_pass_traversal_tag,
BOOST_DEDUCED_TYPENAME pointee<Base>::type
>
{
include/boost/archive/iterators/wchar_from_mb.hpp view on Meta::CPAN
#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/archive/iterators/dataflow_exception.hpp>
namespace boost {
namespace archive {
namespace iterators {
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// class used by text archives to translate char strings to wchar_t
// strings of the currently selected locale
template<class Base>
class wchar_from_mb
: public boost::iterator_adaptor<
wchar_from_mb<Base>,
Base,
wchar_t,
single_pass_traversal_tag,
wchar_t
>
{
include/boost/compatibility/cpp_c_headers/clocale view on Meta::CPAN
// This file is automatically generated. Do not edit.
// ['../../libs/compatibility/generate_cpp_c_headers.py']
// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST')
#ifndef __CLOCALE_HEADER
#define __CLOCALE_HEADER
#include <locale.h>
namespace std {
using ::lconv;
using ::localeconv;
using ::setlocale;
}
#endif // CLOCALE_HEADER