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" | |
small class which defines a vector with 2 elements
| typedef std::map<STOFFVec2<T>, T,struct PosSizeLtX> STOFFVec2< T >::MapX |
map of STOFFVec2
| typedef std::map<STOFFVec2<T>, T,struct PosSizeLtY> STOFFVec2< T >::MapY |
map of STOFFVec2
|
inline |
constructor
Referenced by STOFFVec2< T >::PosSizeLtX::operator()(), and STOFFVec2< T >::PosSizeLtY::operator()().
generic copy constructor
|
inline |
increases the actuals values by dx and dy
Referenced by STOFFVec2< bool >::operator+=(), and STOFFVec2< bool >::operator-=().
a comparison function: which first compares x then y
Referenced by STOFFVec2< T >::PosSizeLtX::operator()().
a comparison function: which first compares y then x
Referenced by STOFFVec2< bool >::operator!=(), STOFFVec2< T >::PosSizeLtY::operator()(), STOFFVec2< bool >::operator<(), and STOFFVec2< bool >::operator==().
comparison!=
generic operator*=
operator+=
operator-=
comparison<: sort by y
comparison==
|
inline |
operator[]
|
inline |
operator[]
|
inline |
resets the two elements
|
inline |
resets the first element
|
inline |
resets the second element
|
inline |
first element
Referenced by StarObjectSmallGraphicInternal::SdrGraphicCircle::send(), and STOFFPosition::setSize().
|
inline |
second element
Referenced by StarObjectSmallGraphicInternal::SdrGraphicCircle::send(), and STOFFPosition::setSize().
|
friend |
generic operator*
|
friend |
operator+
|
friend |
operator-
|
friend |
operator<<: prints data in form "XxY"
|
protected |
first element
Referenced by STOFFVec2< bool >::cmp(), STOFFVec2< bool >::cmpY(), STOFFVec2< bool >::operator+=(), STOFFVec2< bool >::operator-=(), and STOFFVec2< bool >::operator<<.
|
protected |
second element
Referenced by STOFFVec2< bool >::cmp(), STOFFVec2< bool >::cmpY(), STOFFVec2< bool >::operator+=(), STOFFVec2< bool >::operator-=(), and STOFFVec2< bool >::operator<<.