Classes | Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
STOFFVec2< T > Class Template Reference

small class which defines a vector with 2 elements More...

`#include <libstaroffice_internal.hxx>`

## Classes
struct | PosSizeLtX
| internal struct used to create sorted map, sorted by X More...
struct | PosSizeLtY
| internal struct used to create sorted map, sorted by Y More...

## Public Types
typedef std::map< STOFFVec2< T >, T, struct PosSizeLtX > | MapX
| map of STOFFVec2
typedef std::map< STOFFVec2< T >, T, struct PosSizeLtY > | MapY
| map of STOFFVec2

## Public Member Functions
| STOFFVec2 (T xx=0, T yy=0)
| constructor
template<class U >
| STOFFVec2 (STOFFVec2< U > const &p)
| generic copy constructor
T | x () const
| first element
T | y () const
| second element
T | operator[] (int c) const
| operator[]
T & | operator[] (int c)
| operator[]
void | set (T xx, T yy)
| resets the two elements
void | setX (T xx)
| resets the first element
void | setY (T yy)
| resets the second element
void | add (T dx, T dy)
| increases the actuals values by dx and dy
STOFFVec2< T > & | operator+= (STOFFVec2< T > const &p)
| operator+=
STOFFVec2< T > & | operator-= (STOFFVec2< T > const &p)
| operator-=
template<class U >
STOFFVec2< T > & | operator*= (U scale)
| generic operator*=
bool | operator== (STOFFVec2< T > const &p) const
| comparison==
bool | operator!= (STOFFVec2< T > const &p) const
| comparison!=
bool | operator< (STOFFVec2< T > const &p) const
| comparison<: sort by y
int | cmp (STOFFVec2< T > const &p) const
| a comparison function: which first compares x then y
int | cmpY (STOFFVec2< T > const &p) const
| a comparison function: which first compares y then x

## Protected Attributes
T | m_x
| first element
T | m_y
| second element

## Friends
STOFFVec2< T > | operator+ (STOFFVec2< T > const &p1, STOFFVec2< T > const &p2)
| operator+
STOFFVec2< T > | operator- (STOFFVec2< T > const &p1, STOFFVec2< T > const &p2)
| operator-
template<class U >
STOFFVec2< T > | operator* (U scale, STOFFVec2< T > const &p1)
| generic operator*
std::ostream & | operator<< (std::ostream &o, STOFFVec2< T > const &f)
| operator<<: prints data in form "XxY"

## Detailed Description

template<class T>
class STOFFVec2< T >

small class which defines a vector with 2 elements

## Member Typedef Documentation

## ◆ MapX

template<class T >

typedef std::map<STOFFVec2<T>, T,struct PosSizeLtX> STOFFVec2< T >::MapX

map of STOFFVec2

## ◆ MapY

template<class T >

typedef std::map<STOFFVec2<T>, T,struct PosSizeLtY> STOFFVec2< T >::MapY

map of STOFFVec2

## Constructor & Destructor Documentation

## ◆ STOFFVec2() [1/2]

template<class T >

STOFFVec2< T >::STOFFVec2 | ( | T | xx = 0,
|  | T | yy = 0 )
| inline

constructor

## ◆ STOFFVec2() [2/2]

template<class T >
template<class U >

STOFFVec2< T >::STOFFVec2 | ( | STOFFVec2< U > const & | p | ) |
| inline

generic copy constructor

## Member Function Documentation

## ◆ add()

template<class T >

void STOFFVec2< T >::add | ( | T | dx,
|  | T | dy )
| inline

increases the actuals values by dx and dy

Referenced by STOFFVec2< T >::operator+=(), and STOFFVec2< T >::operator-=().

## ◆ cmp()

template<class T >

int STOFFVec2< T >::cmp | ( | STOFFVec2< T > const & | p | ) | const
| inline

a comparison function: which first compares x then y

Referenced by STOFFVec2< T >::PosSizeLtX::operator()().

## ◆ cmpY()

template<class T >

int STOFFVec2< T >::cmpY | ( | STOFFVec2< T > const & | p | ) | const
| inline

a comparison function: which first compares y then x

Referenced by STOFFVec2< T >::operator!=(), STOFFVec2< T >::PosSizeLtY::operator()(), STOFFVec2< T >::operator<(), and STOFFVec2< T >::operator==().

## ◆ operator!=()

template<class T >

bool STOFFVec2< T >::operator!= | ( | STOFFVec2< T > const & | p | ) | const
| inline

comparison!=

## ◆ operator*=()

template<class T >
template<class U >

STOFFVec2< T > & STOFFVec2< T >::operator*= | ( | U | scale | ) |
| inline

generic operator*=

## ◆ operator+=()

template<class T >

STOFFVec2< T > & STOFFVec2< T >::operator+= | ( | STOFFVec2< T > const & | p | ) |
| inline

operator+=

## ◆ operator-=()

template<class T >

STOFFVec2< T > & STOFFVec2< T >::operator-= | ( | STOFFVec2< T > const & | p | ) |
| inline

operator-=

## ◆ operator<()

template<class T >

bool STOFFVec2< T >::operator< | ( | STOFFVec2< T > const & | p | ) | const
| inline

comparison<: sort by y

## ◆ operator==()

template<class T >

bool STOFFVec2< T >::operator== | ( | STOFFVec2< T > const & | p | ) | const
| inline

comparison==

## ◆ operator[]() [1/2]

template<class T >

T & STOFFVec2< T >::operator[] | ( | int | c | ) |
| inline

operator[]

## ◆ operator[]() [2/2]

template<class T >

T STOFFVec2< T >::operator[] | ( | int | c | ) | const
| inline

operator[]

## ◆ set()

template<class T >

void STOFFVec2< T >::set | ( | T | xx,
|  | T | yy )
| inline

resets the two elements

## ◆ setX()

template<class T >

void STOFFVec2< T >::setX | ( | T | xx | ) |
| inline

resets the first element

## ◆ setY()

template<class T >

void STOFFVec2< T >::setY | ( | T | yy | ) |
| inline

resets the second element

## ◆ x()

template<class T >

T STOFFVec2< T >::x | ( |  | ) | const
| inline

first element

Referenced by StarObjectSmallGraphicInternal::SdrGraphicCircle::send(), and STOFFPosition::setSize().

## ◆ y()

template<class T >

T STOFFVec2< T >::y | ( |  | ) | const
| inline

second element

Referenced by StarObjectSmallGraphicInternal::SdrGraphicCircle::send(), and STOFFPosition::setSize().

## Friends And Related Symbol Documentation

## ◆ operator*

template<class T >
template<class U >

STOFFVec2< T > operator* | ( | U | scale,
|  | STOFFVec2< T > const & | p1 )
| friend

generic operator*

## ◆ operator+

template<class T >

STOFFVec2< T > operator+ | ( | STOFFVec2< T > const & | p1,
|  | STOFFVec2< T > const & | p2 )
| friend

operator+

## ◆ operator-

template<class T >

STOFFVec2< T > operator- | ( | STOFFVec2< T > const & | p1,
|  | STOFFVec2< T > const & | p2 )
| friend

operator-

## ◆ operator<<

template<class T >

std::ostream & operator<< | ( | std::ostream & | o,
|  | STOFFVec2< T > const & | f )
| friend

operator<<: prints data in form "XxY"

## Member Data Documentation

## ◆ m_x

template<class T >

T STOFFVec2< T >::m_x
| protected

first element

Referenced by STOFFVec2< T >::add(), STOFFVec2< T >::cmp(), STOFFVec2< T >::cmpY(), STOFFVec2< T >::operator*=(), STOFFVec2< T >::operator+=(), STOFFVec2< T >::operator-=(), STOFFVec2< T >::operator[](), STOFFVec2< T >::operator[](), STOFFVec2< T >::set(), STOFFVec2< T >::setX(), and STOFFVec2< T >::x().

## ◆ m_y

template<class T >

T STOFFVec2< T >::m_y
| protected

second element

Referenced by STOFFVec2< T >::add(), STOFFVec2< T >::cmp(), STOFFVec2< T >::cmpY(), STOFFVec2< T >::operator*=(), STOFFVec2< T >::operator+=(), STOFFVec2< T >::operator-=(), STOFFVec2< T >::operator[](), STOFFVec2< T >::operator[](), STOFFVec2< T >::set(), STOFFVec2< T >::setY(), and STOFFVec2< T >::y().

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

- libstaroffice_internal.hxx