- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exponent::Basics::CDouble Class Reference

Inheritance diagram for Exponent::Basics::CDouble:

List of all members.

## Detailed Description

Wrapper around built in double type.

Basic wrapper around a built in double type giving it CCountedObject functionality

Date:
  21/08/2004

Author:
  Paul Chana

Version:
  1.0.0 Initial version

  1.0.1 Made the constructor default

Note:
  All contents of this source code are copyright 2005 Exp Digital Uk.
  This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
  with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
  Certain sections of this code may come from other sources. They are credited where applicable.
  If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk

Id
  CDouble.hpp,v 1.3 2007/02/08 21:06:44 paul Exp

Definition at line 38 of file CDouble.hpp.

## Public Member Functions

- CDouble (const double value=0.0)
- virtual void getObjectDescription (char *string, const long size) const
- double getValue () const
- CString getValueAsString (const long decimalPlaces=2) const
- CDouble & operator * (const double value)
- CDouble & operator * (const CDouble &value)
- bool operator! ()
- bool operator!= (const double value)
- bool operator!= (const CDouble &value)
- CDouble & operator+ (const double value)
- CDouble & operator+ (const CDouble &value)
- CDouble & operator+= (const double value)
- CDouble & operator+= (const CDouble &value)
- CDouble & operator- (const double value)
- CDouble & operator- (const CDouble &value)
- CDouble & operator-= (const double value)
- CDouble & operator-= (const CDouble &value)
- CDouble & operator/ (const double value)
- CDouble & operator/ (const CDouble &value)
- CDouble & operator= (const double value)
- CDouble & operator= (const CDouble &value)
- bool operator== (const double value)
- bool operator== (const CDouble &value)
- void setValue (const double value)
- void setValue (const CDouble &value)
- virtual ~CDouble ()

## Protected Attributes

- double m_value

## Constructor & Destructor Documentation

Exponent::Basics::CDouble::CDouble | ( | const double | value = `0.0` | ) |

Construction

Parameters:

  | value | The value to store

virtual Exponent::Basics::CDouble::~CDouble | ( |  | ) | `[virtual]`

Destruction

## Member Function Documentation

virtual void Exponent::Basics::CDouble::getObjectDescription | ( | char * | string,
|  | const long | size |
| ) |  |  | const`[virtual]`

Get a description of the object

Parameters:

  | string | On return is filled with the description
  | size | The size of the stirng

Reimplemented from Exponent::Basics::CCountedObject.

double Exponent::Basics::CDouble::getValue | ( |  | ) | const

Get the value

Return values:

  | double | The value

CString Exponent::Basics::CDouble::getValueAsString | ( | const long | decimalPlaces = `2` | ) | const

Get as a string

Parameters:

  | decimalPlaces | The number of decimal places precision required

Return values:

  | CString | The double as a string

CDouble& Exponent::Basics::CDouble::operator * | ( | const double | value | ) |

Multiplication operator

Parameters:

  | value | The value to multiply with this

Return values:

  | CDouble& | A reference to this

CDouble& Exponent::Basics::CDouble::operator * | ( | const CDouble & | value | ) |

Multiplication operator

Parameters:

  | value | The value to multiply with this

Return values:

  | CDouble& | A reference to this

bool Exponent::Basics::CDouble::operator! | ( |  | ) |

! operator

Return values:

  | bool | True if value == 0, false otherwise

bool Exponent::Basics::CDouble::operator!= | ( | const double | value | ) |

InEquality operator

Parameters:

  | value | The value to compare to

Return values:

  | bool | True if values are inequal, false otherwise

bool Exponent::Basics::CDouble::operator!= | ( | const CDouble & | value | ) |

InEquality operator

Parameters:

  | value | The value to compare to

Return values:

  | bool | True if values are inequal, false otherwise

CDouble& Exponent::Basics::CDouble::operator+ | ( | const double | value | ) |

Addition operator

Parameters:

  | value | The value to add to this

Return values:

  | CDouble& | A reference to this

CDouble& Exponent::Basics::CDouble::operator+ | ( | const CDouble & | value | ) |

Addition operator

Parameters:

  | value | The value to add to this

Return values:

  | CDouble& | A reference to this

CDouble& Exponent::Basics::CDouble::operator+= | ( | const double | value | ) |

Plus equals operator

Parameters:

  | value | The value to add to this

Return values:

  | CDouble& | A reference to this

CDouble& Exponent::Basics::CDouble::operator+= | ( | const CDouble & | value | ) |

Plus equals operator

Parameters:

  | value | The value to add to this

Return values:

  | CDouble& | A reference to this

CDouble& Exponent::Basics::CDouble::operator- | ( | const double | value | ) |

Subtraction operator

Parameters:

  | value | The value to subtract from this

Return values:

  | CDouble& | A reference to this

CDouble& Exponent::Basics::CDouble::operator- | ( | const CDouble & | value | ) |

Subtraction operator

Parameters:

  | value | The value to subtract from this

Return values:

  | CDouble& | A reference to this

CDouble& Exponent::Basics::CDouble::operator-= | ( | const double | value | ) |

Neg equals operator

Parameters:

  | value | The value to subtract from this

Return values:

  | CDouble& | A reference to this

CDouble& Exponent::Basics::CDouble::operator-= | ( | const CDouble & | value | ) |

Neg equals operator

Parameters:

  | value | The value to subtract from this

Return values:

  | CDouble& | A reference to this

CDouble& Exponent::Basics::CDouble::operator/ | ( | const double | value | ) |

Division operator

Parameters:

  | value | The value to divide with this

Return values:

  | CDouble& | A reference to this

CDouble& Exponent::Basics::CDouble::operator/ | ( | const CDouble & | value | ) |

Division operator

Parameters:

  | value | The value to divide with this

Return values:

  | CDouble& | A reference to this

CDouble& Exponent::Basics::CDouble::operator= | ( | const double | value | ) |

Assignment operator

Parameters:

  | value | The value to store

Return values:

  | CDouble& | A reference to this

CDouble& Exponent::Basics::CDouble::operator= | ( | const CDouble & | value | ) |

Assignment operator

Parameters:

  | value | The value to store

Return values:

  | CDouble& | A reference to this

bool Exponent::Basics::CDouble::operator== | ( | const double | value | ) |

Equality operator

Parameters:

  | value | The value to compare to

Return values:

  | bool | True if values are equal, false otherwise

bool Exponent::Basics::CDouble::operator== | ( | const CDouble & | value | ) |

Equality operator

Parameters:

  | value | The value to compare to

Return values:

  | bool | True if values are equal, false otherwise

void Exponent::Basics::CDouble::setValue | ( | const double | value | ) |

Set the value

Parameters:

  | value | The value to store

void Exponent::Basics::CDouble::setValue | ( | const CDouble & | value | ) |

Set the value

Parameters:

  | value | The value to store

## Member Data Documentation

double Exponent::Basics::CDouble::m_value`[protected]`

The value stored

Definition at line 237 of file CDouble.hpp.