Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Mezzanine::UI::UnifiedDim Class Reference

This class represents both the relative and absolute values that can be expressed for the values on one dimension for a UI renderable. More...

#include <unifieddim.h>

Public Member Functions

 UnifiedDim ()
 Class constructor.
 
 UnifiedDim (const Real &Relative)
 Relative constructor. More...
 
 UnifiedDim (const Real &Relative, const Real &Absolute)
 Descriptive constructor. More...
 
 UnifiedDim (const UnifiedDim &Other)
 Copy constructor. More...
 
 ~UnifiedDim ()
 Class destructor.
 
Real CalculateActualDimension (const Real &Actual) const
 Calculates the actual value when a Real in pixels has this unified dim applied to it. More...
 
Boole operator!= (const UnifiedDim &Other) const
 Inequality comparison operator. More...
 
UnifiedDim operator* (const UnifiedDim &Other) const
 Multiplication operator. More...
 
UnifiedDim operator* (const Real &Other)
 Multiplication with Real operator. More...
 
UnifiedDimoperator*= (const UnifiedDim &Other)
 Multiplication assignment operator. More...
 
UnifiedDimoperator*= (const Real &Other)
 Multiplication assignment with Real operator. More...
 
UnifiedDim operator+ (const UnifiedDim &Other) const
 Addition operator. More...
 
UnifiedDimoperator+= (const UnifiedDim &Other)
 Addition assignment operator. More...
 
UnifiedDim operator- (const UnifiedDim &Other) const
 Subtraction operator. More...
 
UnifiedDimoperator-= (const UnifiedDim &Other)
 Subtraction assignment operator. More...
 
UnifiedDim operator/ (const UnifiedDim &Other) const
 Division operator. More...
 
UnifiedDim operator/ (const Real &Other)
 Division with Real operator. More...
 
UnifiedDimoperator/= (const UnifiedDim &Other)
 Division assignment operator. More...
 
UnifiedDimoperator/= (const Real &Other)
 Division assignment with Real operator. More...
 
UnifiedDimoperator= (const UnifiedDim &Other)
 Assignment operator. More...
 
Boole operator== (const UnifiedDim &Other) const
 Equality comparison operator. More...
 
void ProtoDeSerialize (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite this object with it. More...
 
void ProtoSerialize (XML::Node &ParentNode) const
 Convert this class to an XML::Node ready for serialization. More...
 
void SetIdentity ()
 Sets all values of this dimension to zero.
 
void SetValues (const Real &Relative, const Real &Absolute)
 Sets the values of this dimension. More...
 

Static Public Member Functions

static String GetSerializableName ()
 Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More...
 

Public Attributes

Real Abs
 The absolute value on this dimension.
 
Real Rel
 The relative value on this dimension.
 

Detailed Description

This class represents both the relative and absolute values that can be expressed for the values on one dimension for a UI renderable.

Definition at line 56 of file unifieddim.h.

Constructor & Destructor Documentation

Mezzanine::UI::UnifiedDim::UnifiedDim ( const Real Relative)
inline

Relative constructor.

Parameters
RelativeThe relative portion of this dimension.

Definition at line 74 of file unifieddim.h.

Mezzanine::UI::UnifiedDim::UnifiedDim ( const Real Relative,
const Real Absolute 
)
inline

Descriptive constructor.

Parameters
RelativeThe relative portion of this dimension.
AbsoluteThe absolute portion of this dimension.

Definition at line 79 of file unifieddim.h.

Mezzanine::UI::UnifiedDim::UnifiedDim ( const UnifiedDim Other)
inline

Copy constructor.

Parameters
OtherThe other UnifiedDim to copy from.

Definition at line 83 of file unifieddim.h.

Member Function Documentation

Real Mezzanine::UI::UnifiedDim::CalculateActualDimension ( const Real Actual) const
inline

Calculates the actual value when a Real in pixels has this unified dim applied to it.

Parameters
ActualA Real containing the actual(pixel) dimension to use as a base for the calculation.
Returns
Returns a Real containing the result dimension in actual (pixel) units.

Definition at line 109 of file unifieddim.h.

static String Mezzanine::UI::UnifiedDim::GetSerializableName ( )
inlinestatic

Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized.

Returns
A string containing the name of this class.

Definition at line 294 of file unifieddim.h.

Boole Mezzanine::UI::UnifiedDim::operator!= ( const UnifiedDim Other) const
inline

Inequality comparison operator.

Parameters
OtherThe other UnifiedDim to compare to.
Returns
Returns true if these UnifiedDim's are not equal, false otherwise.

Definition at line 235 of file unifieddim.h.

UnifiedDim Mezzanine::UI::UnifiedDim::operator* ( const UnifiedDim Other) const
inline

Multiplication operator.

Parameters
OtherThe other UnifiedDim to multiply by.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 134 of file unifieddim.h.

UnifiedDim Mezzanine::UI::UnifiedDim::operator* ( const Real Other)
inline

Multiplication with Real operator.

Parameters
OtherThe Real to multiply by.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 190 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator*= ( const UnifiedDim Other)
inline

Multiplication assignment operator.

Parameters
OtherThe other UnifiedDim to multiply by.
Returns
Returns a reference to this.

Definition at line 168 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator*= ( const Real Other)
inline

Multiplication assignment with Real operator.

Parameters
OtherThe Real to multiply by.
Returns
Returns a reference to this.

Definition at line 206 of file unifieddim.h.

UnifiedDim Mezzanine::UI::UnifiedDim::operator+ ( const UnifiedDim Other) const
inline

Addition operator.

Parameters
OtherThe other UnifiedDim to add to this.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 120 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator+= ( const UnifiedDim Other)
inline

Addition assignment operator.

Parameters
OtherThe other UnifiedDim to add to this.
Returns
Returns a reference to this.

Definition at line 150 of file unifieddim.h.

UnifiedDim Mezzanine::UI::UnifiedDim::operator- ( const UnifiedDim Other) const
inline

Subtraction operator.

Parameters
OtherThe other UnifiedDim to subtract from this.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 127 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator-= ( const UnifiedDim Other)
inline

Subtraction assignment operator.

Parameters
OtherThe other UnifiedDim to subtract from this.
Returns
Returns a reference to this.

Definition at line 159 of file unifieddim.h.

UnifiedDim Mezzanine::UI::UnifiedDim::operator/ ( const UnifiedDim Other) const
inline

Division operator.

Parameters
OtherThe other UnifiedDim to divide by.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 141 of file unifieddim.h.

UnifiedDim Mezzanine::UI::UnifiedDim::operator/ ( const Real Other)
inline

Division with Real operator.

Parameters
OtherThe Real to divide by.
Returns
Returns a new UnifiedDim that is the result of this operation.

Definition at line 197 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator/= ( const UnifiedDim Other)
inline

Division assignment operator.

Parameters
OtherThe other UnifiedDim to divide by.
Returns
Returns a reference to this.

Definition at line 177 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator/= ( const Real Other)
inline

Division assignment with Real operator.

Parameters
OtherThe Real to divide by.
Returns
Returns a reference to this.

Definition at line 215 of file unifieddim.h.

UnifiedDim& Mezzanine::UI::UnifiedDim::operator= ( const UnifiedDim Other)
inline

Assignment operator.

Parameters
OtherThe other UnifiedDim to be assign values from.
Returns
Returns a reference to this.

Definition at line 246 of file unifieddim.h.

Boole Mezzanine::UI::UnifiedDim::operator== ( const UnifiedDim Other) const
inline

Equality comparison operator.

Parameters
OtherThe other UnifiedDim to compare to.
Returns
Returns true if these UnifiedDim's are equal, false otherwise.

Definition at line 228 of file unifieddim.h.

void Mezzanine::UI::UnifiedDim::ProtoDeSerialize ( const XML::Node SelfRoot)
inline

Take the data stored in an XML Node and overwrite this object with it.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.

Definition at line 273 of file unifieddim.h.

void Mezzanine::UI::UnifiedDim::ProtoSerialize ( XML::Node ParentNode) const
inline

Convert this class to an XML::Node ready for serialization.

Parameters
ParentNodeThe point in the XML hierarchy that all this renderable should be appended to.

Definition at line 258 of file unifieddim.h.

void Mezzanine::UI::UnifiedDim::SetValues ( const Real Relative,
const Real Absolute 
)
inline

Sets the values of this dimension.

Parameters
RelativeThe relative portion of this dimension.
AbsoluteThe absolute portion of this dimension.

Definition at line 94 of file unifieddim.h.


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