casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
asdm::Frequency Class Reference

The Frequency class implements a quantity of frequency in hertz. More...

#include <Frequency.h>

Public Member Functions

 Frequency ()
 The nullary constructor (default). More...
 
 Frequency (const Frequency &)
 The copy constructor. More...
 
 Frequency (const std::string &s)
 A constructor from a string representation. More...
 
 Frequency (const asdmIDLTypes::IDLFrequency &idlFrequency)
 A constructor from a CORBA/IDL representation. More...
 
 Frequency (double value)
 A constructor from a value in double precision. More...
 
virtual ~Frequency ()
 The destructor. More...
 
void toBin (EndianOSStream &eoss)
 Write the binary representation of this to an EndianOSStream . More...
 
Frequencyoperator= (const Frequency &x)
 An assignment operator Frequency = Frequency. More...
 
Frequencyoperator= (const double d)
 An assignment operator Frequency = double. More...
 
Frequencyoperator+= (const Frequency &x)
 Operator increment and assign. More...
 
Frequencyoperator-= (const Frequency &x)
 Operator decrement and assign. More...
 
Frequencyoperator*= (const double x)
 Operator multiply and assign. More...
 
Frequencyoperator/= (const double x)
 Operator divide and assign. More...
 
Frequency operator+ (const Frequency &x) const
 Addition operator. More...
 
Frequency operator- (const Frequency &x) const
 Substraction operator. More...
 
Frequency operator* (const double x) const
 Multiplication operator. More...
 
Frequency operator/ (const double x) const
 Division operator. More...
 
bool operator< (const Frequency &x) const
 Comparison operator. More...
 
bool operator> (const Frequency &x) const
 Comparison operator. More...
 
bool operator<= (const Frequency &x) const
 Comparison operator. More...
 
bool operator>= (const Frequency &x) const
 Comparison operator. More...
 
bool operator== (const Frequency &x) const
 Comparision operator. More...
 
bool equals (const Frequency &x) const
 Comparison method. More...
 
bool operator!= (const Frequency &x) const
 Comparison operator. More...
 
bool isZero () const
 Comparison method. More...
 
Frequency operator- () const
 Unary operator. More...
 
Frequency operator+ () const
 Unary operator. More...
 
std::string toString () const
 Converts into a string. More...
 
std::string toStringI () const
 Idem toString. More...
 
 operator std::string () const
 Conversion operator. More...
 
double get () const
 Return the double precision value of the Frequency. More...
 
asdmIDLTypes::IDLFrequency toIDLFrequency () const
 Return the IDLFrequency representation of the Frequency. More...
 

Static Public Member Functions

static double fromString (const std::string &s)
 A static method equivalent to the constructor from a string. More...
 
static std::string toString (double)
 Conversion into string. More...
 
static Frequency getFrequency (StringTokenizer &st) throw (NumberFormatException)
 Parse the next (string) token of a StringTokenizer into an angle. More...
 
static void toBin (const std::vector< Frequency > &angle, EndianOSStream &eoss)
 Write the binary representation of a vector of Frequency to a EndianOSStream. More...
 
static void toBin (const std::vector< std::vector< Frequency > > &angle, EndianOSStream &eoss)
 Write the binary representation of a vector of vector of Frequency to a EndianOSStream. More...
 
static void toBin (const std::vector< std::vector< std::vector< Frequency > > > &angle, EndianOSStream &eoss)
 Write the binary representation of a vector of vector of vector of Frequency to a EndianOSStream. More...
 
static Frequency fromBin (EndianIStream &eis)
 Read the binary representation of an Frequency from a EndianIStream and use the read value to set an Frequency. More...
 
static std::vector< Frequencyfrom1DBin (EndianIStream &eis)
 Read the binary representation of a vector of Frequency from an EndianIStream and use the read value to set a vector of Frequency. More...
 
static std::vector
< std::vector< Frequency > > 
from2DBin (EndianIStream &eis)
 Read the binary representation of a vector of vector of Frequency from an EndianIStream and use the read value to set a vector of vector of Frequency. More...
 
static std::vector
< std::vector< std::vector
< Frequency > > > 
from3DBin (EndianIStream &eis)
 Read the binary representation of a vector of vector of vector of Frequency from an EndianIStream and use the read value to set a vector of vector of vector of Frequency. More...
 
static std::string unit ()
 Returns the abbreviated name of the unit implicitely associated to any Frequency. More...
 

Private Attributes

double value
 

Friends

Frequency operator* (double d, const Frequency &x)
 Overloading of multiplication operator. More...
 
std::ostream & operator<< (std::ostream &os, const Frequency &x)
 Overloading of << to output the value an Frequency on an ostream. More...
 
std::istream & operator>> (std::istream &is, Frequency &x)
 Overloading of >> to read an Frequency from an istream. More...
 

Detailed Description

The Frequency class implements a quantity of frequency in hertz.

Version
1.00 Jan. 7, 2005
Author
Allen Farris
Version
1.1 Aug 8, 2006
Author
Michel Caillat added toBin/fromBin methods.

Definition at line 53 of file Frequency.h.

Constructor & Destructor Documentation

Frequency::Frequency ( )
inline

The nullary constructor (default).

Frequency constructors.

Definition at line 316 of file Frequency.h.

Frequency::Frequency ( const Frequency t)
inline

The copy constructor.

Definition at line 318 of file Frequency.h.

Frequency::Frequency ( const std::string &  s)
inline

A constructor from a string representation.

The string passed in argument must be parsable into a double precision number to express the value in radian of the angle.

Parameters
sa string.

Definition at line 324 of file Frequency.h.

Frequency::Frequency ( const asdmIDLTypes::IDLFrequency &  idlFrequency)
inline

A constructor from a CORBA/IDL representation.

Parameters
idlFrequencya cons ref to an IDLFrequency.

Definition at line 321 of file Frequency.h.

Frequency::Frequency ( double  value)
inline

A constructor from a value in double precision.

The value passed in argument defines the value of the Frequency in radian.

Definition at line 326 of file Frequency.h.

Frequency::~Frequency ( )
inlinevirtual

The destructor.

Frequency destructor.

Definition at line 329 of file Frequency.h.

Member Function Documentation

bool Frequency::equals ( const Frequency x) const
inline

Comparison method.

Equality.

Parameters
xa const reference to a Frequency.

Definition at line 391 of file Frequency.h.

References value.

static std::vector<Frequency> asdm::Frequency::from1DBin ( EndianIStream eis)
static

Read the binary representation of a vector of Frequency from an EndianIStream and use the read value to set a vector of Frequency.

Parameters
eisa reference to the EndianIStream to be read
Returns
a vector of Frequency
static std::vector<std::vector<Frequency> > asdm::Frequency::from2DBin ( EndianIStream eis)
static

Read the binary representation of a vector of vector of Frequency from an EndianIStream and use the read value to set a vector of vector of Frequency.

Parameters
eisthe EndianIStream to be read
Returns
a vector of vector of Frequency
static std::vector<std::vector<std::vector<Frequency> > > asdm::Frequency::from3DBin ( EndianIStream eis)
static

Read the binary representation of a vector of vector of vector of Frequency from an EndianIStream and use the read value to set a vector of vector of vector of Frequency.

Parameters
eisthe EndianIStream to be read
Returns
a vector of vector of vector of Frequency
static Frequency asdm::Frequency::fromBin ( EndianIStream eis)
static

Read the binary representation of an Frequency from a EndianIStream and use the read value to set an Frequency.

Parameters
eisthe EndianStream to be read
Returns
an Frequency
static double asdm::Frequency::fromString ( const std::string &  s)
static

A static method equivalent to the constructor from a string.

Parameters
sa string?.
double Frequency::get ( ) const
inline

Return the double precision value of the Frequency.

Returns
double

Definition at line 421 of file Frequency.h.

References value.

static Frequency asdm::Frequency::getFrequency ( StringTokenizer st)
throw (NumberFormatException
)
static

Parse the next (string) token of a StringTokenizer into an angle.

Parameters
sta reference to a StringTokenizer.
Returns
an Frequency.
bool asdm::Frequency::isZero ( ) const

Comparison method.

Test nullity.

Returns
a bool.
Frequency::operator std::string ( ) const
inline

Conversion operator.

Conversion functions.

Converts into a string.

Definition at line 412 of file Frequency.h.

References casa::vpf::toString().

bool Frequency::operator!= ( const Frequency x) const
inline

Comparison operator.

Not-equal.

Parameters
xa const reference to a Frequency.

Definition at line 397 of file Frequency.h.

References value.

Frequency Frequency::operator* ( const double  x) const
inline

Multiplication operator.

Parameters
xa value in double precision.

Definition at line 368 of file Frequency.h.

References value.

Frequency & Frequency::operator*= ( const double  x)
inline

Operator multiply and assign.

Parameters
xa value in double precision.

Definition at line 349 of file Frequency.h.

References value.

Frequency Frequency::operator+ ( const Frequency x) const
inline

Addition operator.

arithmetic functions

Parameters
xa const reference to a Frequency.

Definition at line 358 of file Frequency.h.

References value.

Frequency Frequency::operator+ ( ) const
inline

Unary operator.

Unary plus.

Definition at line 406 of file Frequency.h.

References value.

Frequency & Frequency::operator+= ( const Frequency x)
inline

Operator increment and assign.

assignment with arithmetic operators

Parameters
xa const reference to an Frequency.

Definition at line 341 of file Frequency.h.

References value.

Frequency Frequency::operator- ( const Frequency x) const
inline

Substraction operator.

Parameters
xa const reference to a Frequency.

Definition at line 363 of file Frequency.h.

References value.

Frequency Frequency::operator- ( ) const
inline

Unary operator.

unary - and + operators

Opposite.

Definition at line 401 of file Frequency.h.

References value.

Frequency & Frequency::operator-= ( const Frequency x)
inline

Operator decrement and assign.

Parameters
xa const reference to an Frequency.

Definition at line 345 of file Frequency.h.

References value.

Frequency Frequency::operator/ ( const double  x) const
inline

Division operator.

Parameters
da value in double precision.

Definition at line 373 of file Frequency.h.

References value.

Frequency & Frequency::operator/= ( const double  x)
inline

Operator divide and assign.

Parameters
xa valye in double precision.

Definition at line 353 of file Frequency.h.

References value.

bool Frequency::operator< ( const Frequency x) const
inline

Comparison operator.

comparison operators

Less-than.

Parameters
xa const reference to a Frequency.

Definition at line 379 of file Frequency.h.

References value.

bool Frequency::operator<= ( const Frequency x) const
inline

Comparison operator.

Less-than or equal.

Parameters
xa const reference to a Frequency.

Definition at line 385 of file Frequency.h.

References value.

Frequency & Frequency::operator= ( const Frequency x)
inline

An assignment operator Frequency = Frequency.

assignment operator

Parameters
xa const reference to an Frequency.

Definition at line 331 of file Frequency.h.

References value.

Frequency & Frequency::operator= ( const double  d)
inline

An assignment operator Frequency = double.

assignment operator

Parameters
da value in double precision.

Definition at line 336 of file Frequency.h.

References value.

bool Frequency::operator== ( const Frequency x) const
inline

Comparision operator.

Equal-to.

Parameters
xa const reference to a Frequency.

Definition at line 394 of file Frequency.h.

References value.

bool Frequency::operator> ( const Frequency x) const
inline

Comparison operator.

Greater-than.

Parameters
xa const reference to a Frequency.

Definition at line 382 of file Frequency.h.

References value.

bool Frequency::operator>= ( const Frequency x) const
inline

Comparison operator.

Greater-than or equal.

Parameters
xa const reference to a Frequency.

Definition at line 388 of file Frequency.h.

References value.

void asdm::Frequency::toBin ( EndianOSStream eoss)

Write the binary representation of this to an EndianOSStream .

Parameters
eossa reference to an EndianOSStream .
static void asdm::Frequency::toBin ( const std::vector< Frequency > &  angle,
EndianOSStream eoss 
)
static

Write the binary representation of a vector of Frequency to a EndianOSStream.

Parameters
anglethe vector of Frequency to be written
eossthe EndianOSStream to be written to
static void asdm::Frequency::toBin ( const std::vector< std::vector< Frequency > > &  angle,
EndianOSStream eoss 
)
static

Write the binary representation of a vector of vector of Frequency to a EndianOSStream.

Parameters
anglethe vector of vector of Frequency to be written
eossthe EndianOSStream to be written to
static void asdm::Frequency::toBin ( const std::vector< std::vector< std::vector< Frequency > > > &  angle,
EndianOSStream eoss 
)
static

Write the binary representation of a vector of vector of vector of Frequency to a EndianOSStream.

Parameters
anglethe vector of vector of vector of Frequency to be written
eossthe EndianOSStream to be written to
asdmIDLTypes::IDLFrequency Frequency::toIDLFrequency ( ) const
inline

Return the IDLFrequency representation of the Frequency.

Returns
IDLFrequency

Definition at line 425 of file Frequency.h.

References value.

static std::string asdm::Frequency::toString ( double  )
static

Conversion into string.

The resulting string contains the representation of the value of this Frequency.

Returns
string
std::string Frequency::toString ( ) const
inline

Converts into a string.

Returns
a string containing the representation of a the value in double precision.

Definition at line 415 of file Frequency.h.

References value.

Referenced by toStringI().

std::string Frequency::toStringI ( ) const
inline

Idem toString.

Definition at line 418 of file Frequency.h.

References toString(), and value.

std::string Frequency::unit ( )
inlinestatic

Returns the abbreviated name of the unit implicitely associated to any Frequency.

Returns
string

Definition at line 445 of file Frequency.h.

Referenced by casa::MS2ASDM::unitASDMFreq().

Friends And Related Function Documentation

Frequency operator* ( double  d,
const Frequency x 
)
friend

Overloading of multiplication operator.

Parameters
da value in double precision .
xa const reference to a Frequency .
Returns
a Frequency
std::ostream& operator<< ( std::ostream &  os,
const Frequency x 
)
friend

Overloading of << to output the value an Frequency on an ostream.

Parameters
osa reference to the ostream to be written on.
xa const reference to a Frequency.
std::istream& operator>> ( std::istream &  is,
Frequency x 
)
friend

Overloading of >> to read an Frequency from an istream.

Member Data Documentation

double asdm::Frequency::value
private

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