MWAWVec2< T > Class Template Reference

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

#include <libmwaw_internal.hxx>

List of all members.

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< MWAWVec2< T >
, T, struct PosSizeLtX
MapX
 map of MWAWVec2
typedef std::map< MWAWVec2< T >
, T, struct PosSizeLtY
MapY
 map of MWAWVec2

Public Member Functions

 MWAWVec2 (T xx=0, T yy=0)
 constructor
template<class U >
 MWAWVec2 (MWAWVec2< U > const &p)
 generic copy constructor
x () const
 first element
y () const
 second element
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
MWAWVec2< T > & operator+= (MWAWVec2< T > const &p)
 operator+=
MWAWVec2< T > & operator-= (MWAWVec2< T > const &p)
 operator-=
template<class U >
MWAWVec2< T > & operator*= (U scale)
 generic operator*=
bool operator== (MWAWVec2< T > const &p) const
 comparison==
bool operator!= (MWAWVec2< T > const &p) const
 comparison!=
bool operator< (MWAWVec2< T > const &p) const
 comparison<: sort by y
int cmp (MWAWVec2< T > const &p) const
 a comparison function: which first compares x then y
int cmpY (MWAWVec2< T > const &p) const
 a comparison function: which first compares y then x

Protected Attributes

m_x
 first element
m_y
 second element

Friends

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

Detailed Description

template<class T>
class MWAWVec2< T >

small class which defines a vector with 2 elements


Member Typedef Documentation

template<class T>
MWAWVec2< T >::MapX

map of MWAWVec2

template<class T>
MWAWVec2< T >::MapY

map of MWAWVec2


Constructor & Destructor Documentation

template<class T>
MWAWVec2< T >::MWAWVec2 ( xx = 0,
yy = 0 
) [inline]

constructor

template<class T>
template<class U >
MWAWVec2< T >::MWAWVec2 ( MWAWVec2< U > const &  p) [inline]

generic copy constructor


Member Function Documentation

template<class T>
void MWAWVec2< T >::add ( dx,
dy 
) [inline]

increases the actuals values by dx and dy

template<class T>
int MWAWVec2< T >::cmp ( MWAWVec2< T > const &  p) const [inline]

a comparison function: which first compares x then y

Referenced by MWAWGraphicStyle::Pattern::cmp(), MWAWGraphicShape::cmp(), MWAWGraphicStyle::cmp(), and MWAWVec2< T >::PosSizeLtX::operator()().

template<class T>
bool MWAWVec2< T >::operator!= ( MWAWVec2< T > const &  p) const [inline]

comparison!=

template<class T>
template<class U >
MWAWVec2<T>& MWAWVec2< T >::operator*= ( scale) [inline]

generic operator*=

template<class T>
MWAWVec2<T>& MWAWVec2< T >::operator+= ( MWAWVec2< T > const &  p) [inline]

operator+=

template<class T>
MWAWVec2<T>& MWAWVec2< T >::operator-= ( MWAWVec2< T > const &  p) [inline]

operator-=

template<class T>
bool MWAWVec2< T >::operator< ( MWAWVec2< T > const &  p) const [inline]

comparison<: sort by y

template<class T>
bool MWAWVec2< T >::operator== ( MWAWVec2< T > const &  p) const [inline]

comparison==

template<class T>
T MWAWVec2< T >::operator[] ( int  c) const [inline]

operator[]

template<class T>
T& MWAWVec2< T >::operator[] ( int  c) [inline]

operator[]

template<class T>
void MWAWVec2< T >::set ( xx,
yy 
) [inline]
template<class T>
void MWAWVec2< T >::setX ( xx) [inline]

resets the first element

Referenced by MsWrdStruct::ParagraphInfo::read(), and MsWks4Zone::readFRAM().

template<class T>
void MWAWVec2< T >::setY ( yy) [inline]

resets the second element

Referenced by MsWrdStruct::ParagraphInfo::read(), and MsWks4Zone::readFRAM().

template<class T>
T MWAWVec2< T >::x ( ) const [inline]

first element

Referenced by MWAWTextListener::_handleFrameParameters(), MWAWSpreadsheetListener::_handleFrameParameters(), MWAWPresentationListener::_handleFrameParameters(), MWAWGraphicListener::_handleFrameParameters(), MWAWGraphicShape::addTo(), MWAWPictMac::checkOrGet(), WriterPlsParserInternal::WindowsInfo::dimensionInvalid(), MWAWPictData::get(), MsWksGraph::getEntryPicture(), MsWksGraph::getEntryPictureV1(), MsWksGraphInternal::Zone::getLocalBox(), MacWrtParserInternal::WindowsInfo::isEmpty(), MWAWGraphicListener::MWAWGraphicListener(), MWAWSpreadsheetListener::MWAWSpreadsheetListener(), HanMacWrdKGraphInternal::operator<<(), WriterPlsParserInternal::operator<<(), MWAWOLEParser::parse(), libmwaw::PrinterRect::read(), libmwaw_applepict1::Bitmap::read(), libmwaw_applepict1::Pixmap::read(), ClarisDrawParser::readDocHeader(), ClarisWksDocument::readDocHeader(), MacWrtParser::readGraphic(), WriterPlsParser::readGraphic(), MsWksDocument::readGroupHeaderFooter(), libmwaw_applepict1::Pixmap::readPixmapData(), MacDrawParser::readPrintInfo(), SuperPaintParser::readPrintInfo(), WingzParser::readPrintInfo(), MacWrtParser::readPrintInfo(), WriterPlsParser::readPrintInfo(), MacDrawProParser::readPrintInfo(), MacDraftParser::readPrintInfo(), ActaParser::readPrintInfo(), LightWayTxtParser::readPrintInfo(), ClarisDrawParser::readPrintInfo(), MindWrtParser::readPrintInfo(), BeagleWksDBParser::readPrintInfo(), BeagleWksBMParser::readPrintInfo(), BeagleWksParser::readPrintInfo(), NisusWrtParser::readPrintInfo(), BeagleWksSSParser::readPrintInfo(), MoreParser::readPrintInfo(), FullWrtParser::readPrintInfo(), GreatWksDocument::readPrintInfo(), MsWrdParser::readPrintInfo(), BeagleWksDRParser::readPrintInfo(), WriteNowParser::readPrintInfo(), MsWksDocument::readPrintInfo(), MacWrtProParser::readPrintInfo(), RagTimeParser::readPrintInfo(), HanMacWrdJParser::readPrintInfo(), ClarisWksDocument::readPrintInfo(), MarinerWrtParser::readPrintInfo(), HanMacWrdKParser::readPrintInfo(), MsWks4Zone::readPRNT(), WriteNowText::readTokenV2(), libmwaw_applepict1::Bitmap::saveBitmap(), libmwaw_applepict1::Pixmap::savePixmap(), FullWrtGraph::sendGraphic(), WriteNowParser::sendPicture(), MacWrtProParser::sendPicture(), and MacWrtParser::sendWindow().

template<class T>
T MWAWVec2< T >::y ( ) const [inline]

second element

Referenced by MWAWTextListener::_handleFrameParameters(), MWAWSpreadsheetListener::_handleFrameParameters(), MWAWPresentationListener::_handleFrameParameters(), MWAWGraphicListener::_handleFrameParameters(), MWAWGraphicShape::addTo(), MWAWPictMac::checkOrGet(), MsWksGraph::computePositions(), WriterPlsParserInternal::WindowsInfo::dimensionInvalid(), MWAWPictData::get(), MsWksGraph::getEntryPicture(), MsWksGraph::getEntryPictureV1(), MsWksGraphInternal::Zone::getLocalBox(), MWAWGraphicListener::MWAWGraphicListener(), MWAWSpreadsheetListener::MWAWSpreadsheetListener(), HanMacWrdKGraphInternal::operator<<(), WriterPlsParserInternal::operator<<(), MWAWOLEParser::parse(), libmwaw::PrinterRect::read(), libmwaw_applepict1::Bitmap::read(), libmwaw_applepict1::Pixmap::read(), libmwaw_applepict1::Bitmap::readBitmapData(), ClarisDrawParser::readDocHeader(), ClarisWksDocument::readDocHeader(), MacWrtParser::readGraphic(), WriterPlsParser::readGraphic(), MsWksDocument::readGroupHeaderFooter(), libmwaw_applepict1::Pixmap::readPixmapData(), MacDrawParser::readPrintInfo(), SuperPaintParser::readPrintInfo(), WingzParser::readPrintInfo(), MacWrtParser::readPrintInfo(), WriterPlsParser::readPrintInfo(), MacDrawProParser::readPrintInfo(), MacDraftParser::readPrintInfo(), ActaParser::readPrintInfo(), LightWayTxtParser::readPrintInfo(), ClarisDrawParser::readPrintInfo(), MindWrtParser::readPrintInfo(), BeagleWksDBParser::readPrintInfo(), BeagleWksBMParser::readPrintInfo(), BeagleWksParser::readPrintInfo(), NisusWrtParser::readPrintInfo(), BeagleWksSSParser::readPrintInfo(), MoreParser::readPrintInfo(), FullWrtParser::readPrintInfo(), GreatWksDocument::readPrintInfo(), MsWrdParser::readPrintInfo(), BeagleWksDRParser::readPrintInfo(), WriteNowParser::readPrintInfo(), MsWksDocument::readPrintInfo(), MacWrtProParser::readPrintInfo(), RagTimeParser::readPrintInfo(), ClarisWksDocument::readPrintInfo(), HanMacWrdJParser::readPrintInfo(), MarinerWrtParser::readPrintInfo(), HanMacWrdKParser::readPrintInfo(), MsWks4Zone::readPRNT(), WriteNowText::readTokenV2(), FullWrtGraph::sendGraphic(), WriteNowParser::sendPicture(), MacWrtProParser::sendPicture(), and MacWrtParser::sendWindow().


Friends And Related Function Documentation

template<class T>
template<class U >
MWAWVec2<T> operator* ( scale,
MWAWVec2< T > const &  p1 
) [friend]

generic operator*

template<class T>
MWAWVec2<T> operator+ ( MWAWVec2< T > const &  p1,
MWAWVec2< T > const &  p2 
) [friend]

operator+

template<class T>
MWAWVec2<T> operator- ( MWAWVec2< T > const &  p1,
MWAWVec2< T > const &  p2 
) [friend]

operator-

template<class T>
std::ostream& operator<< ( std::ostream &  o,
MWAWVec2< T > const &  f 
) [friend]

operator<<: prints data in form "XxY"


Member Data Documentation


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