DxLibEx
size.hpp File Reference
#include "dxlibex/config/no_min_max.h"
#include "dxlibex/type_traits/first_enabled.hpp"
#include "dxlibex/type_traits/enable_if.hpp"
#include "dxlibex/type_traits/is_representable.hpp"
#include "dxlibex/type_traits/is_nothrow.hpp"
#include "dxlibex/basic_types/use_big_type_when_one_byte_t.hpp"
#include "dxlibex/basic_types/stdint.hpp"
#include "dxlibex/basic_types/coordinate_operator_bool_helper.hpp"
#include "dxlibex/math.hpp"
#include "dxlibex/cstdlib.hpp"
#include "dxlibex/char_constant.hpp"
#include <iostream>
#include <utility>
#include <type_traits>
#include <algorithm>
#include <cmath>
#include <limits>
#include "dxlibex/config/defines.h"
Include dependency graph for size.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dxle::point_c< T, >
 Template class for 2D points specified by its coordinates x and y. More...
 
class  dxle::size_c< T, >
 Template class for 2D sizes specified by its coordinates width and height. More...
 

Namespaces

 dxle
 
 dxle::detail
 
 std
 

Macros

#define DXLE_TEMP_make_hash(int_t, bit, bit2)
 

Typedefs

typedef size_c< unsigned int > dxle::sizeui
 
typedef size_c< double > dxle::sized
 
typedef size_c< float > dxle::sizef
 
typedef size_c< std::size_t > dxle::size
 

Functions

template<typename CharType , typename Size_cType >
void dxle::detail::ostream_operator_helper (std::basic_ostream< CharType > &os, const CharType *str, const size_c< Size_cType > &s)
 
template<typename CharType , typename Size_cType >
void dxle::detail::istream_operator_helper (std::basic_istream< CharType > &is, size_c< Size_cType > &s)
 
size_c< T1 > T2 DXLE_CONSTEXPR auto dxle::operator+ (const size_c< T1 > &l, const size_c< T2 > &r) DXLE_NOEXCEPT_IF_EXPR(l.width+r.width) -> size_c< decltype(std::declval< std::remove_cv_t< T1 >>()+std::declval< std::remove_cv_t< T2 >>())>
 
size_c< T1 > T2 DXLE_CONSTEXPR auto dxle::operator/ (const size_c< T1 > &l, T2 r) DXLE_NOEXCEPT_IF_EXPR(l.width/r) -> size_c< decltype(std::declval< std::remove_cv_t< T1 >>()/std::declval< std::remove_cv_t< T2 >>())>
 
 std::DXLE_TEMP_make_hash (int, 8, 16)
 
 std::DXLE_TEMP_make_hash (int, 16, 32)
 
 std::DXLE_TEMP_make_hash (int, 32, 64)
 
 std::DXLE_TEMP_make_hash (uint, 8, 16)
 
 std::DXLE_TEMP_make_hash (uint, 16, 32)
 
 std::DXLE_TEMP_make_hash (uint, 32, 64)
 

Macro Definition Documentation

§ DXLE_TEMP_make_hash

#define DXLE_TEMP_make_hash (   int_t,
  bit,
  bit2 
)
Value:
template <> struct hash<dxle::size_c<int_t##bit##_t>> {\
hash() = default;\
hash(const hash&) = default;\
hash(hash&& other) :hash_run(std::move(other.hash_run)) {}\
~hash() {}\
hash& operator=(const hash& other) { hash_run = other.hash_run; return *this; }\
hash& operator=(hash&& other) { hash_run = std::move(other.hash_run); return *this; }\
size_t operator()(const dxle::size_c<int_t##bit##_t>& key) const { return hash_run((static_cast<int_t##_fast##bit2##_t>(key.width) << bit) | static_cast<int_t##_fast##bit2##_t>(key.height)); }\
private:\
std::hash<int_t##_fast##bit2##_t> hash_run;\
}
Template class for 2D sizes specified by its coordinates width and height.
Definition: point2d.hpp:36
Definition: point2d.hpp:672
Definition: cast_if.hpp:12
value_type width
Definition: size.hpp:104
value_type height
Definition: size.hpp:104

Definition at line 622 of file size.hpp.