view release on metacpan or search on metacpan
include/boost/blank.hpp view on Meta::CPAN
inline bool operator==(const blank&, const blank&)
{
return true;
}
inline bool operator<(const blank&, const blank&)
{
return false;
}
// streaming support
//
BOOST_TEMPLATED_STREAM_TEMPLATE(E,T)
inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
BOOST_TEMPLATED_STREAM(ostream, E,T)& out
, const blank&
)
{
// (output nothing)
return out;
}
include/boost/date_time/compiler_config.hpp view on Meta::CPAN
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x0564)
#include <locale>
namespace std {
using stlport::tolower;
using stlport::ctype;
using stlport::use_facet;
}
#endif
// workaround for errors associated with output for date classes
// modifications and input streaming for time classes.
// Compilers affected are:
// gcc295, msvc (neither with STLPort), any borland
//
#if (((defined(__GNUC__) && (__GNUC__ < 3)) || \
(defined(_MSC_VER) && (_MSC_VER <= 1200)) ) && \
!defined(_STLP_OWN_IOSTREAMS) ) || \
defined(__BORLANDC__)
#define BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS
#endif
include/boost/date_time/date_duration.hpp view on Meta::CPAN
date_duration(special_values sv) :
days_(duration_rep::from_special(sv))
{}
// copy constructor required for addable<> & subtractable<>
//! Construct from another date_duration (Copy Constructor)
date_duration(const date_duration<duration_rep_traits>& other) :
days_(other.days_)
{}
//! returns days_ as it's instantiated type - used for streaming
duration_rep get_rep()const
{
return days_;
}
bool is_special()const
{
return days_.is_special();
}
//! returns days as value, not object.
duration_rep_type days() const
include/boost/date_time/date_generators.hpp view on Meta::CPAN
return (month_ == rhs.month_) && (day_ == rhs.day_);
}
bool operator<(const partial_date& rhs) const
{
if (month_ < rhs.month_) return true;
if (month_ > rhs.month_) return false;
//months are equal
return (day_ < rhs.day_);
}
// added for streaming purposes
month_type month() const
{
return month_;
}
day_type day() const
{
return day_;
}
//! Returns string suitable for use in POSIX time zone string
include/boost/date_time/date_generators.hpp view on Meta::CPAN
while (week < wn_) {
d = d + one_week;
week++;
}
// remove wrapping to next month behavior
if(d.month() != month_) {
d = d - one_week;
}
return d;
}
// added for streaming
month_type month() const
{
return month_;
}
week_num nth_week() const
{
return wn_;
}
day_of_week_type day_of_week() const
{
include/boost/date_time/date_generators.hpp view on Meta::CPAN
//! Return a concrete date when provided with a year specific year.
date_type get_date(year_type year) const
{
date_type d(year, month_,1);
duration_type one_day(1);
while (dow_ != d.day_of_week()) {
d = d + one_day;
}
return d;
}
// added for streaming
month_type month() const
{
return month_;
}
day_of_week_type day_of_week() const
{
return dow_;
}
//! Returns string suitable for use in POSIX time zone string
/*! Returns a string formatted as "M4.1.0" ==> 1st Sunday in April. */
include/boost/date_time/date_generators.hpp view on Meta::CPAN
//! Return a concrete date when provided with a year specific year.
date_type get_date(year_type year) const
{
date_type d(year, month_, calendar_type::end_of_month_day(year,month_));
duration_type one_day(1);
while (dow_ != d.day_of_week()) {
d = d - one_day;
}
return d;
}
// added for streaming
month_type month() const
{
return month_;
}
day_of_week_type day_of_week() const
{
return dow_;
}
//! Returns string suitable for use in POSIX time zone string
/*! Returns a string formatted as "M4.5.0" ==> last Sunday in April. */
include/boost/date_time/date_generators.hpp view on Meta::CPAN
//! Return next kday given.
date_type get_date(date_type start_day) const
{
duration_type one_day(1);
date_type d = start_day + one_day;
while (dow_ != d.day_of_week()) {
d = d + one_day;
}
return d;
}
// added for streaming
day_of_week_type day_of_week() const
{
return dow_;
}
private:
day_of_week_type dow_;
};
//! Calculate something like "First Sunday before Jan 1,2002
/*! Date generator that takes a date and finds kday after
include/boost/date_time/date_generators.hpp view on Meta::CPAN
//! Return next kday given.
date_type get_date(date_type start_day) const
{
duration_type one_day(1);
date_type d = start_day - one_day;
while (dow_ != d.day_of_week()) {
d = d - one_day;
}
return d;
}
// added for streaming
day_of_week_type day_of_week() const
{
return dow_;
}
private:
day_of_week_type dow_;
};
//! Calculates the number of days until the next weekday
/*! Calculates the number of days until the next weekday.
include/boost/date_time/gregorian/greg_facet.hpp view on Meta::CPAN
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os, const date& d)
{
typedef boost::date_time::date_names_put<greg_facet_config, charT> facet_def;
typedef boost::date_time::ostream_date_formatter<date, facet_def, charT> greg_ostream_formatter;
greg_ostream_formatter::date_put(d, os);
return os;
}
//! operator<< for gregorian::greg_month typically streaming: Jan, Feb, Mar...
/*! Uses the date facet to determine output string as well as selection of long or short strings.
* Default if no facet is installed is to output a 2 wide numeric value for the month
* eg: 01 == Jan, 02 == Feb, ... 12 == Dec.
*/
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os, const greg_month& m)
{
typedef boost::date_time::date_names_put<greg_facet_config, charT> facet_def;
include/boost/date_time/gregorian/greg_facet.hpp view on Meta::CPAN
}
else { //default to numeric
charT fill_char = '0';
os << std::setw(2) << std::setfill(fill_char) << m.as_number();
}
return os;
}
//! operator<< for gregorian::greg_weekday typically streaming: Sun, Mon, Tue, ...
/*! Uses the date facet to determine output string as well as selection of long or short string.
* Default if no facet is installed is to output a 3 char english string for the
* day of the week.
*/
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os, const greg_weekday& wd)
{
typedef boost::date_time::date_names_put<greg_facet_config, charT> facet_def;
include/boost/date_time/posix_time/posix_time.hpp view on Meta::CPAN
#include "boost/date_time/posix_time/date_duration_operators.hpp"
#endif
// output functions
#if defined(BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS)
#include "boost/date_time/posix_time/time_formatters_limited.hpp"
#else
#include "boost/date_time/posix_time/time_formatters.hpp"
#endif // BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS
// streaming operators
#if defined(USE_DATE_TIME_PRE_1_33_FACET_IO)
#include "boost/date_time/posix_time/posix_time_legacy_io.hpp"
#else
#include "boost/date_time/posix_time/posix_time_io.hpp"
#endif // USE_DATE_TIME_PRE_1_33_FACET_IO
#include "boost/date_time/posix_time/time_parsers.hpp"
#include "boost/date_time/posix_time/conversion.hpp"
include/boost/date_time/posix_time/posix_time_legacy_io.hpp view on Meta::CPAN
template <class charT, class traits>
inline
std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os, const time_period& tp)
{
typedef boost::date_time::ostream_time_period_formatter<time_period, charT> period_formatter;
period_formatter::period_put(tp, os);
return os;
}
#endif // USE_DATE_TIME_PRE_1_33_FACET_IO
/******** input streaming ********/
template<class charT>
inline
std::basic_istream<charT>& operator>>(std::basic_istream<charT>& is, time_duration& td)
{
// need to create a std::string and parse it
std::basic_string<charT> inp_s;
std::stringstream out_ss;
is >> inp_s;
typename std::basic_string<charT>::iterator b = inp_s.begin();
// need to use both iterators because there is no requirement
include/boost/logic/tribool_io.hpp view on Meta::CPAN
template<>
inline std::basic_string<wchar_t> default_true_name<wchar_t>()
{ return L"true"; }
# endif
#endif
/**
* \brief Returns a string containing the default name for the indeterminate
* value of a tribool with the given character type T.
*
* This routine is used by the input and output streaming operators
* for tribool when there is no locale support or the stream's locale
* does not contain the indeterminate_name facet.
*/
template<typename T> std::basic_string<T> get_default_indeterminate_name();
/// Returns the character string "indeterminate".
template<>
inline std::basic_string<char> get_default_indeterminate_name<char>()
{ return "indeterminate"; }
include/boost/spirit/tree/tree_to_xml.hpp view on Meta::CPAN
///////////////////////////////////////////////////////////////////////////////
//
// Dump a parse tree as a xml stream
//
// The functions 'tree_to_xml' can be used to output a parse tree as a xml
// stream into the given ostream. The parameters have the following
// meaning:
//
// mandatory parameters:
// ostrm The output stream used for streaming the parse tree.
// tree The parse tree to output.
//
// optional parameters:
// input_line The input line from which the parse tree was
// generated (if given, it is used to output a comment
// containing this line).
// id_to_name A map, which is used for converting the rule id's contained
// in the parse tree to readable strings. Here a auxiliary
// associative container can be used, which maps a rule_id to
// a std::string (i.e. a std::map<rule_id, std::string>).