QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Functions | Variables
Output manipulators

Functions

detail::short_date_holder short_date (const Date &)
 output dates in short format (mm/dd/yyyy) More...
 
detail::long_date_holder long_date (const Date &)
 output dates in long format (Month ddth, yyyy) More...
 
detail::iso_date_holder iso_date (const Date &)
 output dates in ISO format (yyyy-mm-dd) More...
 
detail::formatted_date_holder formatted_date (const Date &, const std::string &fmt)
 output dates in user defined format using boost date functionality More...
 
detail::long_period_holder long_period (const Period &)
 output periods in long format (e.g. "2 weeks") More...
 
detail::short_period_holder short_period (const Period &)
 output periods in short format (e.g. "2w") More...
 
detail::ordinal_holder ordinal (Size)
 outputs naturals as 1st, 2nd, 3rd... More...
 
detail::percent_holder percent (Real)
 output reals as percentages More...
 
detail::percent_holder rate (Rate)
 output rates and spreads as percentages More...
 
detail::percent_holder volatility (Volatility)
 output volatilities as percentages More...
 
template<class Container >
detail::sequence_holder< typename Container::const_iterator > sequence (const Container &c)
 output STL-compliant containers as space-separated sequences More...
 

Variables

detail::long_weekday_holder long_weekday (Weekday)
 output weekdays in long format More...
 
detail::short_weekday_holder short_weekday (Weekday)
 output weekdays in short format (three letters) More...
 
detail::shortest_weekday_holder shortest_weekday (Weekday)
 output weekdays in shortest format (two letters) More...
 
template<typename T >
detail::null_checker< T > checknull (T)
 check for nulls before output More...
 
template<typename T >
detail::power_of_two_holder< T > power_of_two (T)
 output integers as powers of two More...
 

Detailed Description

Helper functions for creating formatted output.

Function Documentation

◆ short_date()

detail::short_date_holder short_date ( const Date d)

output dates in short format (mm/dd/yyyy)

Definition at line 983 of file date.cpp.

◆ long_date()

detail::long_date_holder long_date ( const Date d)

output dates in long format (Month ddth, yyyy)

Definition at line 987 of file date.cpp.

+ Here is the caller graph for this function:

◆ iso_date()

detail::iso_date_holder iso_date ( const Date d)

output dates in ISO format (yyyy-mm-dd)

Definition at line 991 of file date.cpp.

+ Here is the caller graph for this function:

◆ formatted_date()

detail::formatted_date_holder formatted_date ( const Date d,
const std::string &  f 
)

output dates in user defined format using boost date functionality

Definition at line 995 of file date.cpp.

◆ long_period()

detail::long_period_holder long_period ( const Period p)

output periods in long format (e.g. "2 weeks")

Definition at line 442 of file period.cpp.

◆ short_period()

detail::short_period_holder short_period ( const Period p)

output periods in short format (e.g. "2w")

Definition at line 446 of file period.cpp.

+ Here is the caller graph for this function:

◆ ordinal()

detail::ordinal_holder ordinal ( Size  n)

outputs naturals as 1st, 2nd, 3rd...

Definition at line 116 of file dataformatters.hpp.

+ Here is the caller graph for this function:

◆ percent()

detail::percent_holder percent ( Real  x)

output reals as percentages

Definition at line 125 of file dataformatters.hpp.

◆ rate()

output rates and spreads as percentages

Definition at line 129 of file dataformatters.hpp.

+ Here is the caller graph for this function:

◆ volatility()

output volatilities as percentages

Definition at line 133 of file dataformatters.hpp.

◆ sequence()

detail::sequence_holder< typename Container::const_iterator > sequence ( const Container &  c)

output STL-compliant containers as space-separated sequences

Definition at line 139 of file dataformatters.hpp.

+ Here is the caller graph for this function:

Variable Documentation

◆ long_weekday

detail::long_weekday_holder long_weekday ( Weekday  d)

output weekdays in long format

Definition at line 108 of file weekday.cpp.

◆ short_weekday

detail::short_weekday_holder short_weekday ( Weekday  d)

output weekdays in short format (three letters)

Definition at line 112 of file weekday.cpp.

◆ shortest_weekday

detail::shortest_weekday_holder shortest_weekday ( Weekday  d)

output weekdays in shortest format (two letters)

Definition at line 116 of file weekday.cpp.

◆ checknull

detail::null_checker< T > checknull ( x)

check for nulls before output

Definition at line 112 of file dataformatters.hpp.

◆ power_of_two

detail::power_of_two_holder< T > power_of_two ( n)

output integers as powers of two

Definition at line 121 of file dataformatters.hpp.