|
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_2d< T > |
| Class that allows to store and calculate size in 2D, with width and height. The template parameter T allows to select any scalar_unit or numeric type to be the type of width and height (they always have the same type in the same instance). The width and height can be any scalar_unit, usually length, but imaginary spaces with custom dimensions are also allowed. Initialization string example: "1 m * 2 m". More... | |
| class | scifir::size_2d< float > |
| Specialization class of size_2d<T> that allows to store and calculate size in 2D, with width and height as float types. Initialization string example: "1 * 2". 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_2d< T > &x) |
| Returns a string representation of size_2d<T>. | |
| string | scifir::to_string (const size_2d< float > &x) |
| Returns a string representation of size_2d<float>. | |
| template<typename T > | |
| bool | operator== (const scifir::size_2d< T > &x, const scifir::size_2d< T > &y) |
| Returns true if the width and height of x and y are both equal. | |
| template<typename T > | |
| bool | operator!= (const scifir::size_2d< T > &x, const scifir::size_2d< T > &y) |
| Returns true if the width and height of x and y are any of them different. | |
| template<typename T > | |
| bool | operator== (const scifir::size_2d< T > &x, const string &init_size_2d) |
| Compares size_2d<T> x with the size_2d<T> initialized with the initialization string of size_2d<T> init_size_2d, returns true if they are equal. | |
| template<typename T > | |
| bool | operator!= (const scifir::size_2d< T > &x, const string &init_size_2d) |
| Compares size_2d<T> x with the size_2d<T> initialized with the initialization string of size_2d<T> init_size_2d, returns true if they are different. | |
| template<typename T > | |
| bool | operator== (const string &init_size_2d, const scifir::size_2d< T > &x) |
| Compares size_2d<T> x with the size_2d<T> initialized with the initialization string of size_2d<T> init_size_2d, returns true if they are equal. | |
| template<typename T > | |
| bool | operator!= (const string &init_size_2d, const scifir::size_2d< T > &x) |
| Compares size_2d<T> x with the size_2d<T> initialized with the initialization string of size_2d<T> init_size_2d, returns true if they are different. | |
| template<typename T > | |
| void | operator+= (string &x, const scifir::size_2d< T > &y) |
| Concatenates the string x with the string representation of size_2d<T> y. | |
| template<typename T > | |
| string | operator+ (const string &x, const scifir::size_2d< T > &y) |
| Creates a new string as the concatenation of the string x with the string representation of size_2d<T> y. | |
| template<typename T > | |
| string | operator+ (const scifir::size_2d< T > &x, const string &y) |
| Creates a new string as the concatenation of the string x with the string representation of size_2d<T> y. | |
| template<typename T > | |
| ostream & | operator<< (ostream &os, const scifir::size_2d< T > &x) |
| Adds the string representation of the size_2d<T> x to an output stream os. | |
| template<typename T > | |
| istream & | operator>> (istream &is, scifir::size_2d< T > &x) |
| Allows that an istream initializes by string a size_2d<T> x. | |
| bool operator!= | ( | const scifir::size_2d< T > & | x, |
| const scifir::size_2d< T > & | y | ||
| ) |
Returns true if the width and height of x and y are any of them different.
Definition at line 234 of file size_2d.hpp.
| bool operator!= | ( | const scifir::size_2d< T > & | x, |
| const string & | init_size_2d | ||
| ) |
Compares size_2d<T> x with the size_2d<T> initialized with the initialization string of size_2d<T> init_size_2d, returns true if they are different.
Definition at line 247 of file size_2d.hpp.
| bool operator!= | ( | const string & | init_size_2d, |
| const scifir::size_2d< T > & | x | ||
| ) |
Compares size_2d<T> x with the size_2d<T> initialized with the initialization string of size_2d<T> init_size_2d, returns true if they are different.
Definition at line 260 of file size_2d.hpp.
| string operator+ | ( | const scifir::size_2d< T > & | x, |
| const string & | y | ||
| ) |
Creates a new string as the concatenation of the string x with the string representation of size_2d<T> y.
Definition at line 278 of file size_2d.hpp.
| string operator+ | ( | const string & | x, |
| const scifir::size_2d< T > & | y | ||
| ) |
Creates a new string as the concatenation of the string x with the string representation of size_2d<T> y.
Definition at line 272 of file size_2d.hpp.
| void operator+= | ( | string & | x, |
| const scifir::size_2d< T > & | y | ||
| ) |
Concatenates the string x with the string representation of size_2d<T> y.
Definition at line 266 of file size_2d.hpp.
| ostream & operator<< | ( | ostream & | os, |
| const scifir::size_2d< T > & | x | ||
| ) |
Adds the string representation of the size_2d<T> x to an output stream os.
Definition at line 284 of file size_2d.hpp.
| bool operator== | ( | const scifir::size_2d< T > & | x, |
| const scifir::size_2d< T > & | y | ||
| ) |
Returns true if the width and height of x and y are both equal.
Definition at line 221 of file size_2d.hpp.
| bool operator== | ( | const scifir::size_2d< T > & | x, |
| const string & | init_size_2d | ||
| ) |
Compares size_2d<T> x with the size_2d<T> initialized with the initialization string of size_2d<T> init_size_2d, returns true if they are equal.
Definition at line 240 of file size_2d.hpp.
| bool operator== | ( | const string & | init_size_2d, |
| const scifir::size_2d< T > & | x | ||
| ) |
Compares size_2d<T> x with the size_2d<T> initialized with the initialization string of size_2d<T> init_size_2d, returns true if they are equal.
Definition at line 253 of file size_2d.hpp.
| istream & operator>> | ( | istream & | is, |
| scifir::size_2d< T > & | x | ||
| ) |
Allows that an istream initializes by string a size_2d<T> x.
Definition at line 290 of file size_2d.hpp.