LibrePCB Developers Documentation
length.h File Reference
#include "../exceptions.h"
#include "../qtcompat.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)! More...
 
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)
 
QtCompat::Hash qHash (const Length &key, QtCompat::Hash seed=0) noexcept
 
UnsignedLength operator+ (const UnsignedLength &lhs, const UnsignedLength &rhs) noexcept
 
UnsignedLength & operator+= (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)
 
QtCompat::Hash qHash (const UnsignedLength &key, QtCompat::Hash 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
 
PositiveLength & operator+= (PositiveLength &lhs, const PositiveLength &rhs) noexcept
 
PositiveLength & operator+= (PositiveLength &lhs, const UnsignedLength &rhs) noexcept
 
UnsignedLength & operator+= (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)
 
QtCompat::Hash qHash (const PositiveLength &key, QtCompat::Hash seed=0) noexcept
 
QDebug operator<< (QDebug stream, const Point3D &obj)