LibrePCB Developers Documentation
Loading...
Searching...
No Matches
length.h File Reference
#include "../exceptions.h"
#include <type_safe/constrained_type.hpp>
#include <QtCore>
+ Include dependency graph for length.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Length
 The Length class is used to represent a length (for example 12.75 millimeters) More...
 
struct  UnsignedLengthVerifier
 
struct  UnsignedLengthConstraint
 
struct  PositiveLengthVerifier
 
struct  PositiveLengthConstraint
 

Namespaces

namespace  librepcb
 

Typedefs

typedef qint64 LengthBase_t
 This type is the ONLY base type to store all lengths (always in nanometers)!
 
using UnsignedLength = type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier >
 
using PositiveLength = type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier >
 
using Point3D = std::tuple< Length, Length, Length >
 

Functions

QDataStream & operator<< (QDataStream &stream, const Length &length)
 
QDebug operator<< (QDebug stream, const Length &length)
 
std::size_t qHash (const Length &key, std::size_t seed=0) noexcept
 
UnsignedLength operator+ (const UnsignedLength &lhs, const UnsignedLength &rhs) noexcept
 
UnsignedLengthoperator+= (UnsignedLength &lhs, const UnsignedLength &rhs) noexcept
 
Length operator* (const UnsignedLength &lhs, LengthBase_t rhs) noexcept
 
Length operator/ (const UnsignedLength &lhs, LengthBase_t rhs) noexcept
 
Length operator+ (const Length &lhs, const UnsignedLength &rhs) noexcept
 
Length operator+ (const UnsignedLength &lhs, const Length &rhs) noexcept
 
Length operator- (const Length &lhs, const UnsignedLength &rhs) noexcept
 
Length operator- (const UnsignedLength &lhs, const Length &rhs) noexcept
 
Length operator- (const UnsignedLength &lhs) noexcept
 
bool operator> (const UnsignedLength &lhs, const Length &rhs) noexcept
 
bool operator> (const UnsignedLength &lhs, LengthBase_t rhs) noexcept
 
bool operator>= (const UnsignedLength &lhs, const Length &rhs) noexcept
 
bool operator>= (const UnsignedLength &lhs, LengthBase_t rhs) noexcept
 
bool operator< (const UnsignedLength &lhs, const Length &rhs) noexcept
 
bool operator< (const UnsignedLength &lhs, LengthBase_t rhs) noexcept
 
bool operator<= (const UnsignedLength &lhs, const Length &rhs) noexcept
 
bool operator<= (const UnsignedLength &lhs, LengthBase_t rhs) noexcept
 
bool operator== (const UnsignedLength &lhs, const Length &rhs) noexcept
 
bool operator== (const UnsignedLength &lhs, LengthBase_t rhs) noexcept
 
bool operator!= (const UnsignedLength &lhs, const Length &rhs) noexcept
 
bool operator!= (const UnsignedLength &lhs, LengthBase_t rhs) noexcept
 
QDataStream & operator<< (QDataStream &stream, const UnsignedLength &length)
 
QDebug operator<< (QDebug stream, const UnsignedLength &length)
 
std::size_t qHash (const UnsignedLength &key, std::size_t seed=0) noexcept
 
UnsignedLength positiveToUnsigned (const PositiveLength &l) noexcept
 
PositiveLength operator+ (const PositiveLength &lhs, const PositiveLength &rhs) noexcept
 
PositiveLength operator+ (const PositiveLength &lhs, const UnsignedLength &rhs) noexcept
 
PositiveLength operator+ (const UnsignedLength &lhs, const PositiveLength &rhs) noexcept
 
PositiveLengthoperator+= (PositiveLength &lhs, const PositiveLength &rhs) noexcept
 
PositiveLengthoperator+= (PositiveLength &lhs, const UnsignedLength &rhs) noexcept
 
UnsignedLengthoperator+= (UnsignedLength &lhs, const PositiveLength &rhs) noexcept
 
Length operator* (const PositiveLength &lhs, LengthBase_t rhs) noexcept
 
Length operator/ (const PositiveLength &lhs, LengthBase_t rhs) noexcept
 
Length operator+ (const Length &lhs, const PositiveLength &rhs) noexcept
 
Length operator+ (const PositiveLength &lhs, const Length &rhs) noexcept
 
Length operator- (const Length &lhs, const PositiveLength &rhs) noexcept
 
Length operator- (const PositiveLength &lhs, const Length &rhs) noexcept
 
Length operator- (const UnsignedLength &lhs, const PositiveLength &rhs) noexcept
 
Length operator- (const PositiveLength &lhs, const UnsignedLength &rhs) noexcept
 
Length operator- (const PositiveLength &lhs) noexcept
 
bool operator> (const UnsignedLength &lhs, const PositiveLength &rhs) noexcept
 
bool operator> (const PositiveLength &lhs, const UnsignedLength &rhs) noexcept
 
bool operator> (const PositiveLength &lhs, const Length &rhs) noexcept
 
bool operator> (const PositiveLength &lhs, LengthBase_t rhs) noexcept
 
bool operator>= (const UnsignedLength &lhs, const PositiveLength &rhs) noexcept
 
bool operator>= (const PositiveLength &lhs, const UnsignedLength &rhs) noexcept
 
bool operator>= (const PositiveLength &lhs, const Length &rhs) noexcept
 
bool operator>= (const PositiveLength &lhs, LengthBase_t rhs) noexcept
 
bool operator< (const UnsignedLength &lhs, const PositiveLength &rhs) noexcept
 
bool operator< (const PositiveLength &lhs, const UnsignedLength &rhs) noexcept
 
bool operator< (const PositiveLength &lhs, const Length &rhs) noexcept
 
bool operator< (const PositiveLength &lhs, LengthBase_t rhs) noexcept
 
bool operator<= (const UnsignedLength &lhs, const PositiveLength &rhs) noexcept
 
bool operator<= (const PositiveLength &lhs, const UnsignedLength &rhs) noexcept
 
bool operator<= (const PositiveLength &lhs, const Length &rhs) noexcept
 
bool operator<= (const PositiveLength &lhs, LengthBase_t rhs) noexcept
 
bool operator== (const UnsignedLength &lhs, const PositiveLength &rhs) noexcept
 
bool operator== (const PositiveLength &lhs, const UnsignedLength &rhs) noexcept
 
bool operator== (const PositiveLength &lhs, const Length &rhs) noexcept
 
bool operator== (const PositiveLength &lhs, LengthBase_t rhs) noexcept
 
bool operator!= (const UnsignedLength &lhs, const PositiveLength &rhs) noexcept
 
bool operator!= (const PositiveLength &lhs, const UnsignedLength &rhs) noexcept
 
bool operator!= (const PositiveLength &lhs, const Length &rhs) noexcept
 
bool operator!= (const PositiveLength &lhs, LengthBase_t rhs) noexcept
 
QDataStream & operator<< (QDataStream &stream, const PositiveLength &length)
 
QDebug operator<< (QDebug stream, const PositiveLength &length)
 
std::size_t qHash (const PositiveLength &key, std::size_t seed=0) noexcept
 
QDebug operator<< (QDebug stream, const Point3D &obj)