scifir-units 2.0.0
scifir-units is a library of units of measurement, angles, coordinates, fields, and related data, all lightweight, that help in the development of scientific software and scientific machines
|
#include "../derived_units/space_units.hpp"
#include "../util/types.hpp"
#include "boost/algorithm/string.hpp"
#include <string>
Go to the source code of this file.
Classes | |
class | scifir::size_3d< T > |
Class that allows to store and calculate size in 3D, with width, height and depth. The template parameter T allows to select any scalar_unit or numeric type to be the type of the width, the height and the depth (they always have the same type in the same instance). The width, height and depth can be any scalar_unit, usually length, but imaginary spaces with custom dimensions are also allowed. Initialization string example: "1 m * 2 m * 4 m". More... | |
class | scifir::size_3d< float > |
Specialization class of size_3d<T> that allows to store and calculate size in 3D, with width, height and depth as float types. Initialization string example: "1 * 2 * 4". More... | |
Namespaces | |
namespace | scifir |
The namespace scifir contains all scifir-units, excepting the string literals, which are outside. | |
Functions | |
template<typename T > | |
string | scifir::to_string (const size_3d< T > &x) |
Returns a string representation of size_3d<T>. | |
string | scifir::to_string (const size_3d< float > &x) |
Returns a string representation of size_3d<float>. | |
template<typename T > | |
bool | operator== (const scifir::size_3d< T > &x, const scifir::size_3d< T > &y) |
Returns true if the width, height and depth of x and y are both equal. | |
template<typename T > | |
bool | operator!= (const scifir::size_3d< T > &x, const scifir::size_3d< T > &y) |
Returns true if the width, height and depth of x and y are any of them different. | |
template<typename T > | |
bool | operator== (const scifir::size_3d< T > &x, const string &init_size_3d) |
Compares size_3d<T> x with the size_3d<T> initialized with the initialization string of size_3d<T> init_size_3d, returns true if they are equal. | |
template<typename T > | |
bool | operator!= (const scifir::size_3d< T > &x, const string &init_size_3d) |
Compares size_3d<T> x with the size_3d<T> initialized with the initialization string of size_3d<T> init_size_3d, returns true if they are different. | |
template<typename T > | |
bool | operator== (const string &init_size_3d, const scifir::size_3d< T > &x) |
Compares size_3d<T> x with the size_3d<T> initialized with the initialization string of size_3d<T> init_size_3d, returns true if they are equal. | |
template<typename T > | |
bool | operator!= (const string &init_size_3d, const scifir::size_3d< T > &x) |
Compares size_3d<T> x with the size_3d<T> initialized with the initialization string of size_3d<T> init_size_3d, returns true if they are different. | |
template<typename T > | |
void | operator+= (string &x, const scifir::size_3d< T > &y) |
Concatenates the string x with the string representation of size_3d<T> y. | |
template<typename T > | |
string | operator+ (const string &x, const scifir::size_3d< T > &y) |
Creates a new string as the concatenation of the string x with the string representation of size_3d<T> y. | |
template<typename T > | |
string | operator+ (const scifir::size_3d< T > &x, const string &y) |
Creates a new string as the concatenation of the string x with the string representation of size_3d<T> y. | |
template<typename T > | |
ostream & | operator<< (ostream &os, const scifir::size_3d< T > &x) |
Adds the string representation of the size_3d<T> x to an output stream os. | |
template<typename T > | |
istream & | operator>> (istream &is, scifir::size_3d< T > &x) |
Allows that an istream initializes by string a size_3d<T> x. | |
bool operator!= | ( | const scifir::size_3d< T > & | x, |
const scifir::size_3d< T > & | y | ||
) |
Returns true if the width, height and depth of x and y are any of them different.
Definition at line 248 of file size_3d.hpp.
bool operator!= | ( | const scifir::size_3d< T > & | x, |
const string & | init_size_3d | ||
) |
Compares size_3d<T> x with the size_3d<T> initialized with the initialization string of size_3d<T> init_size_3d, returns true if they are different.
Definition at line 261 of file size_3d.hpp.
bool operator!= | ( | const string & | init_size_3d, |
const scifir::size_3d< T > & | x | ||
) |
Compares size_3d<T> x with the size_3d<T> initialized with the initialization string of size_3d<T> init_size_3d, returns true if they are different.
Definition at line 274 of file size_3d.hpp.
string operator+ | ( | const scifir::size_3d< T > & | x, |
const string & | y | ||
) |
Creates a new string as the concatenation of the string x with the string representation of size_3d<T> y.
Definition at line 292 of file size_3d.hpp.
string operator+ | ( | const string & | x, |
const scifir::size_3d< T > & | y | ||
) |
Creates a new string as the concatenation of the string x with the string representation of size_3d<T> y.
Definition at line 286 of file size_3d.hpp.
void operator+= | ( | string & | x, |
const scifir::size_3d< T > & | y | ||
) |
Concatenates the string x with the string representation of size_3d<T> y.
Definition at line 280 of file size_3d.hpp.
ostream & operator<< | ( | ostream & | os, |
const scifir::size_3d< T > & | x | ||
) |
Adds the string representation of the size_3d<T> x to an output stream os.
Definition at line 298 of file size_3d.hpp.
bool operator== | ( | const scifir::size_3d< T > & | x, |
const scifir::size_3d< T > & | y | ||
) |
Returns true if the width, height and depth of x and y are both equal.
Definition at line 235 of file size_3d.hpp.
bool operator== | ( | const scifir::size_3d< T > & | x, |
const string & | init_size_3d | ||
) |
Compares size_3d<T> x with the size_3d<T> initialized with the initialization string of size_3d<T> init_size_3d, returns true if they are equal.
Definition at line 254 of file size_3d.hpp.
bool operator== | ( | const string & | init_size_3d, |
const scifir::size_3d< T > & | x | ||
) |
Compares size_3d<T> x with the size_3d<T> initialized with the initialization string of size_3d<T> init_size_3d, returns true if they are equal.
Definition at line 267 of file size_3d.hpp.
istream & operator>> | ( | istream & | is, |
scifir::size_3d< T > & | x | ||
) |
Allows that an istream initializes by string a size_3d<T> x.
Definition at line 304 of file size_3d.hpp.