GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GEnergy.hpp File Reference

Energy value class definition. More...

#include <string>
#include "GBase.hpp"

Go to the source code of this file.

Classes

class  GEnergy
 Class that handles energies in a unit independent way. More...
 

Functions

GEnergy operator+ (const GEnergy &a, const GEnergy &b)
 Energy addition operator friend. More...
 
GEnergy operator- (const GEnergy &a, const GEnergy &b)
 Energy subtraction operator friend. More...
 
GEnergy operator* (const double &a, const GEnergy &b)
 Energy multiplication operator friend. More...
 
GEnergy operator* (const GEnergy &a, const double &b)
 Energy multiplication operator friend. More...
 
GEnergy operator/ (const GEnergy &a, const double &b)
 Energy division operator friend. More...
 
double operator/ (const GEnergy &a, const GEnergy &b)
 Energy division operator friend. More...
 
bool operator== (const GEnergy &a, const GEnergy &b)
 Energy equality operator friend. More...
 
bool operator!= (const GEnergy &a, const GEnergy &b)
 Energy non-equality operator friend. More...
 
bool operator< (const GEnergy &a, const GEnergy &b)
 Energy smaller than operator friend. More...
 
bool operator<= (const GEnergy &a, const GEnergy &b)
 Energy smaller than or equal to operator friend. More...
 
bool operator> (const GEnergy &a, const GEnergy &b)
 Energy larger than operator friend. More...
 
bool operator>= (const GEnergy &a, const GEnergy &b)
 Energy larger than or equal to operator friend. More...
 

Detailed Description

Energy value class definition.

Author
Juergen Knoedlseder

Definition in file GEnergy.hpp.

Function Documentation

bool operator!= ( const GEnergy a,
const GEnergy b 
)
inline

Energy non-equality operator friend.

Parameters
[in]aFirst energy.
[in]bSecond energy.
Returns
True if both energies are not equal.

Definition at line 311 of file GEnergy.hpp.

References GEnergy::m_energy.

GEnergy operator* ( const double &  a,
const GEnergy b 
)
inline

Energy multiplication operator friend.

Parameters
[in]aScale.
[in]bEnergy.
Returns
Energy multiplied by scale.

Definition at line 235 of file GEnergy.hpp.

References GEnergy::m_energy.

GEnergy operator* ( const GEnergy a,
const double &  b 
)
inline

Energy multiplication operator friend.

Parameters
[in]aEnergy.
[in]bScale.
Returns
Energy multiplied by scale.

Definition at line 251 of file GEnergy.hpp.

References GEnergy::m_energy.

GEnergy operator+ ( const GEnergy a,
const GEnergy b 
)
inline

Energy addition operator friend.

Parameters
[in]aFirst energy.
[in]bSecond energy.
Returns
Sum of energies.

Definition at line 203 of file GEnergy.hpp.

References GEnergy::m_energy.

GEnergy operator- ( const GEnergy a,
const GEnergy b 
)
inline

Energy subtraction operator friend.

Parameters
[in]aFirst energy.
[in]bSecond energy.
Returns
Difference of energies.

Definition at line 219 of file GEnergy.hpp.

References GEnergy::m_energy.

GEnergy operator/ ( const GEnergy a,
const double &  b 
)
inline

Energy division operator friend.

Parameters
[in]aEnergy.
[in]bScale.
Returns
Energy divided by scale.

Definition at line 267 of file GEnergy.hpp.

References GEnergy::m_energy.

double operator/ ( const GEnergy a,
const GEnergy b 
)
inline

Energy division operator friend.

Parameters
[in]aEnergy.
[in]bEnergy.
Returns
Fraction of energies.

Definition at line 283 of file GEnergy.hpp.

References GEnergy::m_energy.

bool operator< ( const GEnergy a,
const GEnergy b 
)
inline

Energy smaller than operator friend.

Parameters
[in]aFirst energy.
[in]bSecond energy.
Returns
True if first energy is smaller than second energy.

Definition at line 325 of file GEnergy.hpp.

References GEnergy::m_energy.

bool operator<= ( const GEnergy a,
const GEnergy b 
)
inline

Energy smaller than or equal to operator friend.

Parameters
[in]aFirst energy.
[in]bSecond energy.
Returns
True if first energy is smaller than or equal to second energy.

Definition at line 339 of file GEnergy.hpp.

References GEnergy::m_energy.

bool operator== ( const GEnergy a,
const GEnergy b 
)
inline

Energy equality operator friend.

Parameters
[in]aFirst energy.
[in]bSecond energy.
Returns
True if both energies are equal.

Definition at line 297 of file GEnergy.hpp.

References GEnergy::m_energy.

bool operator> ( const GEnergy a,
const GEnergy b 
)
inline

Energy larger than operator friend.

Parameters
[in]aFirst energy.
[in]bSecond energy.
Returns
True if first energy is larger than second energy.

Definition at line 353 of file GEnergy.hpp.

References GEnergy::m_energy.

bool operator>= ( const GEnergy a,
const GEnergy b 
)
inline

Energy larger than or equal to operator friend.

Parameters
[in]aFirst energy.
[in]bSecond energy.
Returns
True if first energy is larger than or equal to second energy.

Definition at line 367 of file GEnergy.hpp.

References GEnergy::m_energy.