libyui  3.3.2
YBothDim< T > Class Template Reference

Template class for two-dimensional entities, such as. More...

#include <YBothDim.h>

Collaboration diagram for YBothDim< T >:

Public Member Functions

 YBothDim (T hor, T vert)
 Constructor with explicit initialization for both values.
 
 YBothDim ()
 Default constructor (calls T default constructor for both values)
 
T & operator[] (YUIDimension dim)
 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)
 
const T & operator[] (YUIDimension dim) const
 Same as above for const objects.
 

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).

Definition at line 41 of file YBothDim.h.


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