LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ratio.h File Reference
#include "../fileio/sexpression.h"
#include <type_safe/constrained_type.hpp>
#include <QtCore>
+ Include dependency graph for ratio.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Ratio
 The Ratio class is used to represent a ratio number (e.g. 13.37%) More...
 
struct  UnsignedRatioVerifier
 
struct  UnsignedRatioConstraint
 

Namespaces

 librepcb
 

Typedefs

using UnsignedRatio = type_safe::constrained_type< Ratio, UnsignedRatioConstraint, UnsignedRatioVerifier >
 

Functions

template<>
SExpression serializeToSExpression (const Ratio &obj)
 
template<>
Ratio deserializeFromSExpression (const SExpression &sexpr, bool throwIfEmpty)
 
QDataStream & operator<< (QDataStream &stream, const Ratio &ratio)
 
QDebug operator<< (QDebug stream, const Ratio &ratio)
 
uint qHash (const Ratio &key, uint seed=0) noexcept
 
template<>
SExpression serializeToSExpression (const UnsignedRatio &obj)
 
template<>
UnsignedRatio deserializeFromSExpression (const SExpression &sexpr, bool throwIfEmpty)
 
QDataStream & operator<< (QDataStream &stream, const UnsignedRatio &ratio)
 
QDebug operator<< (QDebug stream, const UnsignedRatio &ratio)
 
uint qHash (const UnsignedRatio &key, uint seed=0) noexcept