ge211
Basic_dimensions< T > Struct Template Reference

Detailed Description

template<class T>
struct ge211::geometry::Basic_dimensions< T >

Represents the dimensions of an object, or more generally, the displacement between two Basic_positions.

Note that much of the library uses geometry::Dimensions, which is a type alias for Basic_dimensions<int>.

Definition at line 73 of file ge211_forward.h.

Public Types

using Coordinate = T
 The coordinate type for the dimensions. More...
 

Public Member Functions

template<class U >
Basic_dimensions< U > into () const noexcept(is_nothrow_convertible< Coordinate, U >())
 Converts a Basic_dimensions to another coordinate type. More...
 

Public Attributes

Coordinate width
 The width of the object.
 
Coordinate height
 The height of the object.
 

Member Typedef Documentation

◆ Coordinate

using Coordinate = T

The coordinate type for the dimensions.

This is an alias of type parameter T.

Definition at line 22 of file ge211_geometry.h.

Member Function Documentation

◆ into()

Basic_dimensions<U> into ( ) const
inlinenoexcept

Converts a Basic_dimensions to another coordinate type.

For example:

Basic_dimensions<int> d1{3, 4};
Basic_dimensions<double> d2 = d1.into<double>();

Definition at line 35 of file ge211_geometry.h.


The documentation for this struct was generated from the following files: