LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Private Attributes | Friends | List of all members
ndarray::FormatOptions Class Reference

Options for controlling stream output of ExpressionBase. More...

#include <formatting.h>

Public Member Functions

 FormatOptions (int width=8, int precision=6, std::ios_base::fmtflags flags=std::ios_base::fmtflags(0), std::string const &delimiter=", ", std::string const &open="[", std::string const &close="]")
 Standard constructor. More...
 
template<typename Derived >
void apply (std::ostream &os, ExpressionBase< Derived > const &expr)
 Format the given expression into the given output stream. More...
 

Private Attributes

int _width
 
int _precision
 
std::ios_base::fmtflags _flags
 
std::string _delimiter
 
std::string _open
 
std::string _close
 

Friends

template<typename Derived , int N>
class detail::Formatter
 

Detailed Description

Options for controlling stream output of ExpressionBase.

Definition at line 46 of file formatting.h.

Constructor & Destructor Documentation

ndarray::FormatOptions::FormatOptions ( int  width = 8,
int  precision = 6,
std::ios_base::fmtflags  flags = std::ios_base::fmtflags(0),
std::string const &  delimiter = ", ",
std::string const &  open = "[",
std::string const &  close = "]" 
)
inlineexplicit

Standard constructor.

Definition at line 56 of file formatting.h.

63  :
64  _width(width),
65  _precision(precision),
66  _flags(flags),
67  _delimiter(delimiter),
68  _open(open),
69  _close(close)
70  {}
std::ios_base::fmtflags _flags
Definition: formatting.h:49
std::string _delimiter
Definition: formatting.h:50
std::string _close
Definition: formatting.h:52
void ImageT ImageT int float saturatedPixelValue int const width
Definition: saturated.cc:44

Member Function Documentation

template<typename Derived >
void ndarray::FormatOptions::apply ( std::ostream &  os,
ExpressionBase< Derived > const &  expr 
)
inline

Format the given expression into the given output stream.

Definition at line 74 of file formatting.h.

74  {
75  detail::Formatter<Derived>::apply(*this,os,expr,0);
76  }
static void apply(FormatOptions const &options, std::ostream &os, ExpressionBase< Derived > const &expr, int level)
Definition: formatting.h:98

Friends And Related Function Documentation

template<typename Derived , int N>
friend class detail::Formatter
friend

Definition at line 78 of file formatting.h.

Member Data Documentation

std::string ndarray::FormatOptions::_close
private

Definition at line 52 of file formatting.h.

std::string ndarray::FormatOptions::_delimiter
private

Definition at line 50 of file formatting.h.

std::ios_base::fmtflags ndarray::FormatOptions::_flags
private

Definition at line 49 of file formatting.h.

std::string ndarray::FormatOptions::_open
private

Definition at line 51 of file formatting.h.

int ndarray::FormatOptions::_precision
private

Definition at line 48 of file formatting.h.

int ndarray::FormatOptions::_width
private

Definition at line 47 of file formatting.h.


The documentation for this class was generated from the following file: