Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_Size Class Reference

A class for representing a size using floating point coordinates. More...

List of all members.

Public Member Functions

Constructor / Destructor
 CP_Size ()
 Constructor.
 CP_Size (float inWidth, float inHeight)
 CP_Size (const CP_Size &inFloatSize)
 ~CP_Size ()
 Destructor.
Getters
float Width () const
float Height () const
Comparers
bool operator== (const CP_Size &inSize) const
bool operator!= (const CP_Size &inSize) const
bool operator>= (const CP_Size &inSize) const
bool operator<= (const CP_Size &inSize) const
bool operator> (const CP_Size &inSize)
bool operator< (const CP_Size &inSize)
Math
CP_Sizeoperator+= (const CP_Size &inSize)
CP_Sizeoperator-= (const CP_Size &inSize)
CP_Sizeoperator *= (const CP_Size &inSize)
CP_Sizeoperator/= (const CP_Size &inSize)
CP_Size operator+ (const CP_Size &inSize) const
CP_Size operator- (const CP_Size &inSize) const
CP_Size operator * (const CP_Size &inSize) const
CP_Size operator/ (const CP_Size &inSize) const
CP_Sizeoperator= (const CP_Size &)
CP_Size operator- () const
Setters
void SetWidth (float inWidth)
void SetHeight (float inHeight)
void Set (float inWidth, float inHeight)

Public Attributes

float fWidth
float fHeight


Detailed Description

This class is used to express all sizes in CPLAT.

A size represents a measurement of both width and height.


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_Size::CP_Size  ) 
 

Constructor. This creates a size with all coordinates at 0.

Exceptions:
none 

CP_Size::CP_Size float  inWidth,
float  inHeight
 

Constructor. This creates a size with the passed in measurements.

Parameters:
inWidth Measurement representing the width.
inWHeight Measurement representing the fHeight.
Exceptions:
none 

CP_Size::CP_Size const CP_Size inSize  ) 
 

Copy constructor. Sets the measurements of this object from the passed in inSize.

Parameters:
inSize CP_Size to copy measurements from.
Exceptions:
none 

CP_Size::~CP_Size  ) 
 

Destructor.

Exceptions:
none 


Member Function Documentation

float CP_Size::Width  )  const
 

Return the width data member.

Exceptions:
none 
Returns:
float const Width of this object.

float CP_Size::Height  )  const
 

Return the height data member.

Exceptions:
none 
Returns:
float const Height of this object.

bool CP_Size::operator== const CP_Size inSize  )  const
 

Equality operator. Returns true if this size is the same as the passed in size.

Parameters:
inSize CP_Size to check against.
Exceptions:
none 
Returns:
bool const True if this object represents the same size as the passed in size.

bool CP_Size::operator!= const CP_Size inSize  )  const
 

Inequality operator. Returns true if this size is not the same as the passed in size.

Parameters:
inSize CP_Size to check against.
Exceptions:
none 
Returns:
bool const True if this object represents the same size as the passed in size.

bool CP_Size::operator>= const CP_Size inSize  )  const
 

Greater than or equal to operator. Returns true if this size is greater than or equal to the passed in size.

Parameters:
inSize CP_Size to check against.
Exceptions:
none 
Returns:
bool const True if this object is greater than or equal to the passed in size.

bool CP_Size::operator<= const CP_Size inSize  )  const
 

Less than or equal to operator. Returns true if this size is less than or equal to the passed in size.

Parameters:
inSize CP_Size to check against.
Exceptions:
none 
Returns:
bool const True if this object is less than or equal to the passed in size.

bool CP_Size::operator> const CP_Size inSize  ) 
 

Greater than operator. Returns true if this size is greater than the passed in size.

Parameters:
inSize CP_Size to check against.
Exceptions:
none 
Returns:
bool True if this object is greater than the passed in size.

bool CP_Size::operator< const CP_Size inSize  ) 
 

Less than operator. Returns true if this size is less than the passed in size.

Parameters:
inSize CP_Size to check against.
Exceptions:
none 
Returns:
bool True if this object is less than the passed in size.

CP_Size & CP_Size::operator+= const CP_Size inSize  ) 
 

Plus equals operator. Adds the width and height contained in the passed in CP_Size to the width and height of this object.

Parameters:
inSize CP_Size to add in.
Exceptions:
none 
Returns:
CP_Size& Returns a reference to ourselves.

CP_Size & CP_Size::operator-= const CP_Size inSize  ) 
 

Minus equals operator. Subtracts the width and height contained in the passed in CP_Size from the width and height of this object.

Parameters:
inSize CP_Size to subtract from.
Exceptions:
none 
Returns:
CP_Size& Returns a reference to ourselves.

CP_Size & CP_Size::operator *= const CP_Size inSize  ) 
 

Times equals operator. Multiples the width and height contained in the passed in CP_Size to the width and height of this object.

Parameters:
inSize CP_Size to multiply by.
Exceptions:
none 
Returns:
CP_Size& Returns a reference to ourselves.

CP_Size & CP_Size::operator/= const CP_Size inSize  ) 
 

Divide equals operator. Divides the width and height contained in the passed in CP_Size to the width and height of this object.

Parameters:
inSize CP_Size to divide by.
Exceptions:
none 
Returns:
CP_Size& Returns a reference to ourselves.

CP_Size CP_Size::operator+ const CP_Size inSize  )  const
 

Addition operator. Adds the width and height contained in the passed in CP_Size to the width and height of this object, and returns a new CP_Size.

Parameters:
inSize CP_Size to add in.
Exceptions:
none 
Returns:
CP_Size const Returns a new CP_Size after the addition of the passed in size.

CP_Size CP_Size::operator- const CP_Size inSize  )  const
 

Subtraction operator. Subtracts the width and height contained in the passed in CP_Size to the width and height of this object, and returns a new CP_Size.

Parameters:
inSize CP_Size to subtract from.
Exceptions:
none 
Returns:
CP_Size const Returns a new CP_Size after the subtraction of the passed in size.

CP_Size CP_Size::operator * const CP_Size inSize  )  const
 

Multiplication operator. Multiplies the width and height contained in the passed in CP_Size to the width and height of this object, and returns a new CP_Size.

Parameters:
inSize CP_Size to multiply by.
Exceptions:
none 
Returns:
CP_Size const Returns a new CP_Size after the multiplication of the passed in size.

CP_Size CP_Size::operator/ const CP_Size inSize  )  const
 

Division operator. Divides the width and height contained in the passed in CP_Size to the width and height of this object, and returns a new CP_Size.

Parameters:
inSize CP_Size to divide by.
Exceptions:
none 
Returns:
CP_Size const Returns a new CP_Size after the division of the passed in size.

CP_Size & CP_Size::operator= const CP_Size inSize  ) 
 

Assignment operator. Assigns the width and height of this object from the passed in CP_Size object.

Parameters:
inSize CP_Size to copy width and height from.
Exceptions:
none 
Returns:
CP_Size& Returns a reference to ourselves.

CP_Size CP_Size::operator-  )  const
 

Negation operator. Returns a negative version of this size.

Exceptions:
none 
Returns:
CP_Size const Returns a new CP_Size object with the negative width and height of this object.

void CP_Size::SetWidth float  inWidth  ) 
 

void CP_Size::SetHeight float  inHeight  ) 
 

void CP_Size::Set float  inWidth,
float  inHeight
 

Sets the width and height from the passed in parameters.

Parameters:
inWidth Width to set this object to.
inHeight Height to set this object to.
Exceptions:
none 
Returns:
void


Member Data Documentation

float CP_Size::fWidth
 

float CP_Size::fHeight
 

Width measurement.


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:02:13 2005 for CPLAT by  doxygen 1.4.0