esvg::Dimension1D Class Reference

#include <Dimension.hpp>

Public Member Functions

 Dimension1D ()
 
 Dimension1D (float _size, enum esvg::distance _type=esvg::distance_pixel)
 
 Dimension1D (const std::string &_config)
 
 ~Dimension1D ()
 
 operator std::string () const
 
const float & getValue () const
 
enum distance getType () const
 
void set (float _size, enum distance _type)
 
void set (std::string _config)
 
float getPixel (float _upperSize) const
 
const Dimension1Doperator= (const Dimension1D &_obj)
 
bool operator== (const Dimension1D &_obj) const
 
bool operator!= (const Dimension1D &_obj) const
 

Detailed Description

in the dimention class we store the data as the more usefull unit (pixel) but one case need to be dynamic the %, then when requested in % the register the % value

Constructor & Destructor Documentation

§ Dimension1D() [1/3]

esvg::Dimension1D::Dimension1D ( )

Constructor (default :0,0 mode pixel)

§ Dimension1D() [2/3]

esvg::Dimension1D::Dimension1D ( float  _size,
enum esvg::distance  _type = esvg::distance_pixel 
)

Constructor.

Parameters
[in]_sizeRequested dimention
[in]_typeUnit of the Dimention

§ Dimension1D() [3/3]

esvg::Dimension1D::Dimension1D ( const std::string &  _config)
inline

Constructor.

Parameters
[in]_configdimension configuration.

§ ~Dimension1D()

esvg::Dimension1D::~Dimension1D ( )

Destructor.

Member Function Documentation

§ getPixel()

float esvg::Dimension1D::getPixel ( float  _upperSize) const

get the current dimention in pixel

Parameters
[in]_upperSizeSize in pixel of the upper value
Returns
dimention in Pixel

§ getType()

enum distance esvg::Dimension1D::getType ( ) const
inline

get the dimension type

Returns
the type

§ getValue()

const float& esvg::Dimension1D::getValue ( ) const
inline

get the current dimention.

Returns
dimention requested.

§ operator std::string()

esvg::Dimension1D::operator std::string ( ) const

string cast :

§ set() [1/2]

void esvg::Dimension1D::set ( float  _size,
enum distance  _type 
)

set the current dimention in requested type

Parameters
[in]_sizeDimention to set
[in]_typeType of unit requested.

§ set() [2/2]

void esvg::Dimension1D::set ( std::string  _config)

set the current dimention in requested type

Parameters
[in]_configdimension configuration.

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