small class which defines a vector with 2 elements More...
#include <libwps_internal.h>
| 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 Member Functions | |
| Vec2 (T xx=0, T yy=0) | |
| constructor  More... | |
| template<class U > | |
| Vec2 (Vec2< 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... | |
| Vec2< T > & | operator+= (Vec2< T > const &p) | 
| operator+=  More... | |
| Vec2< T > & | operator-= (Vec2< T > const &p) | 
| operator-=  More... | |
| template<class U > | |
| Vec2< T > & | operator*= (U scale) | 
| generic operator*=  More... | |
| bool | operator== (Vec2< T > const &p) const | 
| comparison==  More... | |
| bool | operator!= (Vec2< T > const &p) const | 
| comparison!=  More... | |
| bool | operator< (Vec2< T > const &p) const | 
| comparison<: sort by y  More... | |
| int | cmp (Vec2< T > const &p) const | 
| a comparison function: which first compares x then y  More... | |
| int | cmpY (Vec2< 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 | |
| Vec2< T > | operator+ (Vec2< T > const &p1, Vec2< T > const &p2) | 
| operator+  More... | |
| Vec2< T > | operator- (Vec2< T > const &p1, Vec2< T > const &p2) | 
| operator-  More... | |
| template<class U > | |
| Vec2< T > | operator* (U scale, Vec2< T > const &p1) | 
| generic operator*  More... | |
| std::ostream & | operator<< (std::ostream &o, Vec2< 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 WPS8Table::readMCLD().
a comparison function: which first compares x then y
Referenced by WPSGraphicShape::PathData::cmp(), WPSGraphicShape::cmp(), WPSGraphicStyle::cmp(), and Vec2< T >::PosSizeLtX::operator()().
a comparison function: which first compares y then x
Referenced by WPSPosition::cmp(), and Vec2< T >::PosSizeLtY::operator()().
generic operator*=
comparison<: sort by y
| 
 | inline | 
operator[]
| 
 | inline | 
operator[]
| 
 | inline | 
resets the two elements
Referenced by WPS8Graph::readBDR(), and WPS8Graph::sendObjects().
| 
 | inline | 
resets the first element
Referenced by WPS8Parser::readFRAM(), and WPS8Graph::readPICT().
| 
 | inline | 
resets the second element
Referenced by WPS8Parser::readFRAM(), and WPS8Graph::readPICT().
| 
 | inline | 
first element
Referenced by WPSContentListener::_handleFrameParameters(), WKSContentListener::_handleFrameParameters(), WPSGraphicShape::addTo(), WPS8TableInternal::operator<<(), WPS4TextInternal::operator<<(), WPSOLEParser::parse(), WPS4Graph::readObject(), WPS8Graph::sendObject(), WPS8Graph::sendObjects(), and WPS8Parser::sendPageFrames().
| 
 | inline | 
second element
Referenced by WPSContentListener::_handleFrameParameters(), WKSContentListener::_handleFrameParameters(), WPSGraphicShape::addTo(), WPS8TableInternal::operator<<(), WPS4TextInternal::operator<<(), WPSOLEParser::parse(), WPS4Graph::readObject(), WPS8Graph::sendObject(), WPS8Graph::sendObjects(), and WPS8Parser::sendPageFrames().
generic operator*
| 
 | friend | 
operator<<: prints data in form "XxY"
| 
 | protected | 
first element
Referenced by Vec2< bool >::cmp(), Vec2< bool >::cmpY(), Vec2< bool >::operator+=(), and Vec2< bool >::operator-=().
| 
 | protected | 
second element
Referenced by Vec2< bool >::cmp(), Vec2< bool >::cmpY(), Vec2< bool >::operator+=(), and Vec2< bool >::operator-=().