libpniio
|
rational type for TIFF IFD entries More...
#include <rational.hpp>
Public Member Functions | |
rational () | |
default constructor More... | |
rational (const rational &o) | |
copy constructor More... | |
rational (const T &, const T &) | |
standard constructor More... | |
~rational () | |
destructor More... | |
template<typename U > | |
operator U () | |
conversion operator More... | |
virtual rational< T > & | operator= (const rational< T > &r) |
copy assignment operator More... | |
void | numerator (const T &v) |
set the numerator More... | |
T | numerator () const |
get the numerator More... | |
void | denominator (T &v) |
set the denominator More... | |
T | denominator () const |
get the denominator More... | |
Protected Attributes | |
T | _numerator |
numerator of the rational number More... | |
T | _denominator |
denominator of the rational number More... | |
IFD entries in TIFF files can consist of a rational number. This class implements such a type as a template.
pni::io::tiff::rational< T >::rational | ( | ) |
pni::io::tiff::rational< T >::rational | ( | const rational< T > & | o | ) |
|
explicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
This operator converts the rational number to a single scalar value. It will be typically used to convert from a rational number to a floating point type.
|
virtual |
|
protected |
|
protected |