Sequence Chart Studio  svn HEAD revision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
DecScaled Class Reference

#include <time.h>

Collaboration diagram for DecScaled:
Collaboration graph

Public Member Functions

 DecScaled ()
 
 DecScaled (long mant)
 
 DecScaled (long mant, long exp)
 
 DecScaled (const std::string &number)
 
DecScaledoperator= (const DecScaled &right)
 
const DecScaledoperator+ () const
 
const DecScaled operator- () const
 
const DecScaled operator+ (const DecScaled &right) const
 
const DecScaled operator- (const DecScaled &right) const
 
const DecScaled operator* (const DecScaled &right) const
 
bool operator== (const DecScaled &right) const
 
bool operator!= (const DecScaled &right) const
 
bool operator< (const DecScaled &right) const
 
bool operator<= (const DecScaled &right) const
 
bool operator> (const DecScaled &right) const
 
bool operator>= (const DecScaled &right) const
 

Protected Member Functions

const std::pair< DecScaled,
DecScaled
normalize (const DecScaled &left, const DecScaled &right) const
 

Private Member Functions

void tidy ()
 

Private Attributes

long m_exp
 
long m_mant
 

Friends

std::ostream & operator<< (std::ostream &os, const DecScaled &value)
 

Detailed Description

Decimal scaling structure, stands for: m_mant*10^m_exp;

Definition at line 133 of file time.h.

Constructor & Destructor Documentation

DecScaled::DecScaled ( )
inline

Definition at line 149 of file time.h.

Referenced by operator*(), operator+(), and operator-().

DecScaled::DecScaled ( long  mant)
inline

Definition at line 150 of file time.h.

References tidy().

DecScaled::DecScaled ( long  mant,
long  exp 
)
inline

Definition at line 155 of file time.h.

References tidy().

DecScaled::DecScaled ( const std::string number)

Definition at line 24 of file time.cpp.

References m_exp, m_mant, and tidy().

Member Function Documentation

const std::pair<DecScaled, DecScaled> DecScaled::normalize ( const DecScaled left,
const DecScaled right 
) const
inlineprotected

Definition at line 248 of file time.h.

References ipow(), m_exp, and m_mant.

Referenced by operator+(), operator-(), operator<(), operator<=(), operator>(), and operator>=().

bool DecScaled::operator!= ( const DecScaled right) const
inline

Definition at line 207 of file time.h.

References m_exp, and m_mant.

const DecScaled DecScaled::operator* ( const DecScaled right) const
inline

Definition at line 192 of file time.h.

References DecScaled(), m_exp, and m_mant.

const DecScaled& DecScaled::operator+ ( ) const
inline

Definition at line 170 of file time.h.

const DecScaled DecScaled::operator+ ( const DecScaled right) const
inline

Definition at line 180 of file time.h.

References DecScaled(), and normalize().

const DecScaled DecScaled::operator- ( ) const
inline

Definition at line 175 of file time.h.

References DecScaled(), m_exp, and m_mant.

const DecScaled DecScaled::operator- ( const DecScaled right) const
inline

Definition at line 186 of file time.h.

References DecScaled(), and normalize().

bool DecScaled::operator< ( const DecScaled right) const
inline

Definition at line 212 of file time.h.

References normalize().

bool DecScaled::operator<= ( const DecScaled right) const
inline

Definition at line 218 of file time.h.

References normalize().

DecScaled& DecScaled::operator= ( const DecScaled right)
inline

Definition at line 161 of file time.h.

References m_exp, and m_mant.

bool DecScaled::operator== ( const DecScaled right) const
inline

Definition at line 202 of file time.h.

References m_exp, and m_mant.

bool DecScaled::operator> ( const DecScaled right) const
inline

Definition at line 224 of file time.h.

References normalize().

bool DecScaled::operator>= ( const DecScaled right) const
inline

Definition at line 230 of file time.h.

References normalize().

void DecScaled::tidy ( )
inlineprivate

Definition at line 140 of file time.h.

References m_exp, and m_mant.

Referenced by DecScaled().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const DecScaled value 
)
friend

Print the number in a scientific notation http://en.wikipedia.org/wiki/Scientific_notation

Definition at line 241 of file time.h.

Member Data Documentation

long DecScaled::m_exp
private

Definition at line 136 of file time.h.

Referenced by DecScaled(), normalize(), operator!=(), operator*(), operator-(), operator=(), operator==(), and tidy().

long DecScaled::m_mant
private

Definition at line 137 of file time.h.

Referenced by DecScaled(), normalize(), operator!=(), operator*(), operator-(), operator=(), operator==(), and tidy().


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

SourceForge.net Logo
Generated on Fri Jan 15 2016 16:26:58 for Sequence Chart Studio by  doxygen