libyui
 
Loading...
Searching...
No Matches
YBothDim< T > Class Template Reference

#include <YBothDim.h>

Public Member Functions

 YBothDim (T hor, T vert)
 
 YBothDim ()
 
T & operator[] (YUIDimension dim)
 
const T & operator[] (YUIDimension dim) const
 

Public Attributes

vert
 
hor
 

Detailed Description

template<typename T>
class YBothDim< T >

Template class for two-dimensional entities, such as

  • width, height
  • x_pos, y_pos
  • hStretchable, vStretchable

Precondition: type T needs to have a default constructor (which all simple types like int, long, bool have).

Constructor & Destructor Documentation

◆ YBothDim() [1/2]

template<typename T>
YBothDim< T >::YBothDim ( T hor,
T vert )
inline

Constructor with explicit initialization for both values

◆ YBothDim() [2/2]

template<typename T>
YBothDim< T >::YBothDim ( )
inline

Default constructor (calls T default constructor for both values)

Member Function Documentation

◆ operator[]() [1/2]

template<typename T>
T & YBothDim< T >::operator[] ( YUIDimension dim)
inline

operator[] for alternative access via myVar[ YD_HORIZ ] Please note that this returns a non-const reference, so this can be used as an lvalue (e.g., in assignments)

◆ operator[]() [2/2]

template<typename T>
const T & YBothDim< T >::operator[] ( YUIDimension dim) const
inline

Same as above for const objects


The documentation for this class was generated from the following file: