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 More... | |
typedef std::map< STOFFVec2< T >, T, struct PosSizeLtY > | MapY |
map of STOFFVec2 More... | |
Public Member Functions | |
STOFFVec2 (T xx=0, T yy=0) | |
constructor More... | |
template<class U > | |
STOFFVec2 (STOFFVec2< U > const &p) | |
generic copy constructor More... | |
T | x () const |
first element More... | |
T | y () const |
second element More... | |
T | operator[] (int c) const |
operator[] More... | |
T & | operator[] (int c) |
operator[] More... | |
void | set (T xx, T yy) |
resets the two elements More... | |
void | setX (T xx) |
resets the first element More... | |
void | setY (T yy) |
resets the second element More... | |
void | add (T dx, T dy) |
increases the actuals values by dx and dy More... | |
STOFFVec2< T > & | operator+= (STOFFVec2< T > const &p) |
operator+= More... | |
STOFFVec2< T > & | operator-= (STOFFVec2< T > const &p) |
operator-= More... | |
template<class U > | |
STOFFVec2< T > & | operator *= (U scale) |
generic operator*= More... | |
bool | operator== (STOFFVec2< T > const &p) const |
comparison== More... | |
bool | operator!= (STOFFVec2< T > const &p) const |
comparison!= More... | |
bool | operator< (STOFFVec2< T > const &p) const |
comparison<: sort by y More... | |
int | cmp (STOFFVec2< T > const &p) const |
a comparison function: which first compares x then y More... | |
int | cmpY (STOFFVec2< T > const &p) const |
a comparison function: which first compares y then x More... | |
Protected Attributes | |
T | m_x |
first element More... | |
T | m_y |
second element More... | |
Friends | |
STOFFVec2< T > | operator+ (STOFFVec2< T > const &p1, STOFFVec2< T > const &p2) |
operator+ More... | |
STOFFVec2< T > | operator- (STOFFVec2< T > const &p1, STOFFVec2< T > const &p2) |
operator- More... | |
template<class U > | |
STOFFVec2< T > | operator * (U scale, STOFFVec2< T > const &p1) |
generic operator* More... | |
std::ostream & | operator<< (std::ostream &o, STOFFVec2< T > const &f) |
operator<<: prints data in form "XxY" More... | |
small class which defines a vector with 2 elements
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==().
generic operator*=
comparison!=
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 >::add(), STOFFVec2< bool >::cmp(), STOFFVec2< bool >::cmpY(), STOFFVec2< bool >::operator *=(), STOFFVec2< bool >::operator+=(), STOFFVec2< bool >::operator-=(), STOFFVec2< bool >::operator[](), STOFFVec2< bool >::set(), STOFFVec2< bool >::setX(), and STOFFVec2< bool >::x().
|
protected |
second element
Referenced by STOFFVec2< bool >::add(), STOFFVec2< bool >::cmp(), STOFFVec2< bool >::cmpY(), STOFFVec2< bool >::operator *=(), STOFFVec2< bool >::operator+=(), STOFFVec2< bool >::operator-=(), STOFFVec2< bool >::operator[](), STOFFVec2< bool >::set(), STOFFVec2< bool >::setY(), and STOFFVec2< bool >::y().