ANNA Suite  2020b
Multipurpose development suite for Telco applications
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
anna::Microsecond Class Reference

#include <Microsecond.hpp>

Public Types

typedef S64 type_t
 

Public Member Functions

 Microsecond ()
 
 Microsecond (const type_t value)
 
 Microsecond (const Microsecond &other)
 
 Microsecond (const Millisecond &other)
 
 Microsecond (const Second &other)
 
 operator type_t () const
 
type_trefValue ()
 
Microsecondoperator= (const Microsecond &other)
 
Microsecondoperator= (const Millisecond &other)
 
Microsecondoperator= (const Second &other)
 
bool operator== (const Microsecond &other) const
 
bool operator== (const Millisecond &other) const
 
bool operator== (const Second &other) const
 
bool operator!= (const Microsecond &other) const
 
bool operator!= (const Millisecond &other) const
 
bool operator!= (const Second &other) const
 
bool operator> (const Microsecond &other) const
 
bool operator> (const Millisecond &other) const
 
bool operator> (const Second &other) const
 
bool operator< (const Microsecond &other) const
 
bool operator< (const Millisecond &other) const
 
bool operator< (const Second &other) const
 
bool operator>= (const Microsecond &other) const
 
bool operator>= (const Millisecond &other) const
 
bool operator>= (const Second &other) const
 
bool operator<= (const Microsecond &other) const
 
bool operator<= (const Millisecond &other) const
 
bool operator<= (const Second &other) const
 
Microsecondoperator+= (const Microsecond &other)
 
Microsecondoperator*= (const int &value)
 
type_t getValue () const
 
std::string asString () const
 

Static Public Member Functions

static Microsecond getTime ()
 
static Microsecond fromString (const std::string &value) noexcept(false)
 

Friends

class Millisecond
 
class Second
 
class Microsecond operator- (const Microsecond &left, const Microsecond &right)
 
class Microsecond operator+ (const Microsecond &left, const Microsecond &right)
 
class Microsecond operator/ (const Microsecond &left, const Microsecond &right)
 
class Microsecond operator/ (const Microsecond &left, const int right)
 
class Microsecond operator/ (const Microsecond &left, const unsigned int right)
 

Member Typedef Documentation

◆ type_t

Constructor & Destructor Documentation

◆ Microsecond() [1/5]

anna::Microsecond::Microsecond ( )
inline

Constructor

29 : a_value(0) {;}

◆ Microsecond() [2/5]

anna::Microsecond::Microsecond ( const type_t  value)
inlineexplicit

Constructor.

Parameters
valueValor inicial de esta instancia.
35 : a_value(value) {;}

◆ Microsecond() [3/5]

anna::Microsecond::Microsecond ( const Microsecond other)
inline

Constructor copia.

Parameters
otherInstancia de la que copiar.
41 : a_value(other.a_value) {;}
Here is the call graph for this function:

◆ Microsecond() [4/5]

anna::Microsecond::Microsecond ( const Millisecond other)

Constructor copia.

Parameters
otherInstancia de la que copiar.

◆ Microsecond() [5/5]

anna::Microsecond::Microsecond ( const Second other)

Constructor copia.

Parameters
otherInstancia de la que copiar.

Member Function Documentation

◆ asString()

std::string anna::Microsecond::asString ( ) const

Devuelve una cadena con el valor de esta instancia y las unidades "us".

Returns
una cadena con el valor de esta instancia y las unidades "us".

◆ fromString()

static Microsecond anna::Microsecond::fromString ( const std::string &  value)
staticnoexcept

Obtiene los microsegundos del valor contenido en la cadena recibida como parámetro.

Parameters
valueCadena que contiene los microsegundos habrá sido obtenida con asString.
Returns
los microsegundos del valor contenido en la cadena recibida como parámetro.

◆ getTime()

static Microsecond anna::Microsecond::getTime ( )
static

Devuelve la hora actual de sistema expresada en microsegundos transcurridos desde el 1 de Enero de 1970

Returns
la hora actual de sistema expresada en microsegundos transcurridos desde el 1 de Enero de 1970

◆ getValue()

type_t anna::Microsecond::getValue ( ) const
inline

Devuelve el valor asociado a esta instancia.

Returns
el valor asociado a esta instancia.
115 { return a_value; }
Here is the call graph for this function:

◆ operator type_t()

anna::Microsecond::operator type_t ( ) const
inline

Conversor a numérico.

Returns
El valor asociado a esta instancia.
59 { return a_value; }

◆ operator!=() [1/3]

bool anna::Microsecond::operator!= ( const Microsecond other) const
inline
78 { return a_value != other.a_value; }

◆ operator!=() [2/3]

bool anna::Microsecond::operator!= ( const Millisecond other) const

◆ operator!=() [3/3]

bool anna::Microsecond::operator!= ( const Second other) const

◆ operator*=()

Microsecond& anna::Microsecond::operator*= ( const int &  value)
inline
109 { a_value *= value; return *this; }

◆ operator+=()

Microsecond& anna::Microsecond::operator+= ( const Microsecond other)
inline
108 { a_value += other.a_value; return *this; }

◆ operator<() [1/3]

bool anna::Microsecond::operator< ( const Microsecond other) const
inline
90 { return a_value < other.a_value; }

◆ operator<() [2/3]

bool anna::Microsecond::operator< ( const Millisecond other) const

◆ operator<() [3/3]

bool anna::Microsecond::operator< ( const Second other) const

◆ operator<=() [1/3]

bool anna::Microsecond::operator<= ( const Microsecond other) const
inline
102 { return a_value <= other.a_value; }

◆ operator<=() [2/3]

bool anna::Microsecond::operator<= ( const Millisecond other) const
inline
104 { return (operator==(other) == true) ? true : operator<(other); }
bool operator<(const Microsecond &other) const
Definition: Microsecond.hpp:90
Here is the call graph for this function:

◆ operator<=() [3/3]

bool anna::Microsecond::operator<= ( const Second other) const
inline
106 { return (operator==(other) == true) ? true : operator<(other); }
bool operator<(const Microsecond &other) const
Definition: Microsecond.hpp:90
Here is the call graph for this function:

◆ operator=() [1/3]

Microsecond& anna::Microsecond::operator= ( const Microsecond other)
inline
66 { a_value = other.a_value; return *this; }

◆ operator=() [2/3]

Microsecond& anna::Microsecond::operator= ( const Millisecond other)

◆ operator=() [3/3]

Microsecond& anna::Microsecond::operator= ( const Second other)

◆ operator==() [1/3]

bool anna::Microsecond::operator== ( const Microsecond other) const
inline
72 { return a_value == other.a_value; }

◆ operator==() [2/3]

bool anna::Microsecond::operator== ( const Millisecond other) const

◆ operator==() [3/3]

bool anna::Microsecond::operator== ( const Second other) const

◆ operator>() [1/3]

bool anna::Microsecond::operator> ( const Microsecond other) const
inline
84 { return a_value > other.a_value; }

◆ operator>() [2/3]

bool anna::Microsecond::operator> ( const Millisecond other) const

◆ operator>() [3/3]

bool anna::Microsecond::operator> ( const Second other) const

◆ operator>=() [1/3]

bool anna::Microsecond::operator>= ( const Microsecond other) const
inline
96 { return a_value >= other.a_value; }

◆ operator>=() [2/3]

bool anna::Microsecond::operator>= ( const Millisecond other) const
inline
98 { return (operator==(other) == true) ? true : operator>(other); }
bool operator>(const Microsecond &other) const
Definition: Microsecond.hpp:84
Here is the call graph for this function:

◆ operator>=() [3/3]

bool anna::Microsecond::operator>= ( const Second other) const
inline
100 { return (operator==(other) == true) ? true : operator>(other); }
bool operator>(const Microsecond &other) const
Definition: Microsecond.hpp:84
Here is the call graph for this function:

◆ refValue()

type_t& anna::Microsecond::refValue ( )
inline
64 { return a_value; }

Friends And Related Function Documentation

◆ Millisecond

friend class Millisecond
friend

◆ operator+

class Microsecond operator+ ( const Microsecond left,
const Microsecond right 
)
friend
155 {
156  return Microsecond(left.a_value + right.a_value);
157 }
Microsecond()
Definition: Microsecond.hpp:29

◆ operator-

class Microsecond operator- ( const Microsecond left,
const Microsecond right 
)
friend
150 {
151  return Microsecond(left.a_value - right.a_value);
152 }
Microsecond()
Definition: Microsecond.hpp:29

◆ operator/ [1/3]

class Microsecond operator/ ( const Microsecond left,
const Microsecond right 
)
friend
160 {
161  return Microsecond(left.a_value / right.a_value);
162 }
Microsecond()
Definition: Microsecond.hpp:29

◆ operator/ [2/3]

class Microsecond operator/ ( const Microsecond left,
const int  right 
)
friend
165 {
166  return Microsecond(left.a_value / right);
167 }
Microsecond()
Definition: Microsecond.hpp:29

◆ operator/ [3/3]

class Microsecond operator/ ( const Microsecond left,
const unsigned int  right 
)
friend
170 {
171  return Microsecond(left.a_value / right);
172 }
Microsecond()
Definition: Microsecond.hpp:29

◆ Second

friend class Second
friend

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