casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Attributes | Friends
asdm::Frequency Class Reference

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

#include <Frequency.h>

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Private Attributes

double value

Friends

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

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 59 of file Frequency.h.


Constructor & Destructor Documentation

The nullary constructor (default).

Frequency constructors.

Definition at line 322 of file Frequency.h.

asdm::Frequency::Frequency ( const Frequency t) [inline]

The copy constructor.

Definition at line 324 of file Frequency.h.

asdm::Frequency::Frequency ( const 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 330 of file Frequency.h.

asdm::Frequency::Frequency ( const IDLFrequency &  idlFrequency) [inline]

A constructor from a CORBA/IDL representation.

Parameters:
idlFrequencya cons ref to an IDLFrequency.

Definition at line 327 of file Frequency.h.

asdm::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 332 of file Frequency.h.

asdm::Frequency::~Frequency ( ) [inline, virtual]

The destructor.

Frequency destructor.

Definition at line 335 of file Frequency.h.

The nullary constructor (default).

The copy constructor.

asdm::Frequency::Frequency ( const string &  s)

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.
asdm::Frequency::Frequency ( const IDLFrequency &  idlFrequency)

A constructor from a CORBA/IDL representation.

Parameters:
idlFrequencya cons ref to an IDLFrequency.
asdm::Frequency::Frequency ( double  value)

A constructor from a value in double precision.

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

virtual asdm::Frequency::~Frequency ( ) [virtual]

The destructor.


Member Function Documentation

bool asdm::Frequency::equals ( const Frequency x) const [inline]

Comparison method.

Equality.

Parameters:
xa const reference to a Frequency.

Definition at line 397 of file Frequency.h.

References value.

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

Comparison method.

Equality.

Parameters:
xa const reference to a Frequency.
static 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 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 vector<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 vector<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 vector<vector<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 vector<vector<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 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 string &  s) [static]

A static method equivalent to the constructor from a string.

Parameters:
sa string?.
static double asdm::Frequency::fromString ( const string &  s) [static]

A static method equivalent to the constructor from a string.

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

Return the double precision value of the Frequency.

Returns:
double

Definition at line 427 of file Frequency.h.

References value.

double asdm::Frequency::get ( ) const

Return the double precision value of the Frequency.

Returns:
double

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

Parameters:
sta reference to a StringTokenizer.
Returns:
an Frequency.

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.
bool asdm::Frequency::isZero ( ) const

Comparison method.

Test nullity.

Returns:
a bool.
asdm::Frequency::operator string ( ) const [inline]

Conversion operator.

Conversion functions.

Converts into a string.

Definition at line 418 of file Frequency.h.

References toString().

asdm::Frequency::operator string ( ) const

Conversion operator.

Converts into a string.

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

Comparison operator.

Not-equal.

Parameters:
xa const reference to a Frequency.
bool asdm::Frequency::operator!= ( const Frequency x) const [inline]

Comparison operator.

Not-equal.

Parameters:
xa const reference to a Frequency.

Definition at line 403 of file Frequency.h.

References value.

Frequency asdm::Frequency::operator* ( const double  x) const [inline]

Multiplication operator.

Parameters:
xa value in double precision.

Definition at line 374 of file Frequency.h.

References value.

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

Multiplication operator.

Parameters:
xa value in double precision.
Frequency & asdm::Frequency::operator*= ( const double  x) [inline]

Operator multiply and assign.

Parameters:
xa value in double precision.

Definition at line 355 of file Frequency.h.

References value.

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

Operator multiply and assign.

Parameters:
xa value in double precision.
Frequency asdm::Frequency::operator+ ( const Frequency x) const [inline]

Addition operator.

arithmetic functions

Parameters:
xa const reference to a Frequency.

Definition at line 364 of file Frequency.h.

References value.

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

Addition operator.

Parameters:
xa const reference to a Frequency.
Frequency asdm::Frequency::operator+ ( ) const

Unary operator.

Unary plus.

Frequency asdm::Frequency::operator+ ( ) const [inline]

Unary operator.

Unary plus.

Definition at line 412 of file Frequency.h.

References value.

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

Operator increment and assign.

Parameters:
xa const reference to an Frequency.
Frequency & asdm::Frequency::operator+= ( const Frequency x) [inline]

Operator increment and assign.

assignment with arithmetic operators

Parameters:
xa const reference to an Frequency.

Definition at line 347 of file Frequency.h.

References value.

Frequency asdm::Frequency::operator- ( const Frequency x) const [inline]

Substraction operator.

Parameters:
xa const reference to a Frequency.

Definition at line 369 of file Frequency.h.

References value.

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

Substraction operator.

Parameters:
xa const reference to a Frequency.
Frequency asdm::Frequency::operator- ( ) const

Unary operator.

Opposite.

Frequency asdm::Frequency::operator- ( ) const [inline]

Unary operator.

unary - and + operators

Opposite.

Definition at line 407 of file Frequency.h.

References value.

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

Operator decrement and assign.

Parameters:
xa const reference to an Frequency.
Frequency & asdm::Frequency::operator-= ( const Frequency x) [inline]

Operator decrement and assign.

Parameters:
xa const reference to an Frequency.

Definition at line 351 of file Frequency.h.

References value.

Frequency asdm::Frequency::operator/ ( const double  x) const [inline]

Division operator.

Parameters:
da value in double precision.

Definition at line 379 of file Frequency.h.

References value.

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

Division operator.

Parameters:
da value in double precision.
Frequency& asdm::Frequency::operator/= ( const double  x)

Operator divide and assign.

Parameters:
xa valye in double precision.
Frequency & asdm::Frequency::operator/= ( const double  x) [inline]

Operator divide and assign.

Parameters:
xa valye in double precision.

Definition at line 359 of file Frequency.h.

References value.

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

Comparison operator.

Less-than.

Parameters:
xa const reference to a Frequency.
bool asdm::Frequency::operator< ( const Frequency x) const [inline]

Comparison operator.

comparison operators

Less-than.

Parameters:
xa const reference to a Frequency.

Definition at line 385 of file Frequency.h.

References value.

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

Comparison operator.

Less-than or equal.

Parameters:
xa const reference to a Frequency.
bool asdm::Frequency::operator<= ( const Frequency x) const [inline]

Comparison operator.

Less-than or equal.

Parameters:
xa const reference to a Frequency.

Definition at line 391 of file Frequency.h.

References value.

Frequency & asdm::Frequency::operator= ( const Frequency x) [inline]

An assignment operator Frequency = Frequency.

assignment operator

Parameters:
xa const reference to an Frequency.

Definition at line 337 of file Frequency.h.

References value.

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

An assignment operator Frequency = Frequency.

Parameters:
xa const reference to an Frequency.
Frequency& asdm::Frequency::operator= ( const double  d)

An assignment operator Frequency = double.

Parameters:
da value in double precision.
Frequency & asdm::Frequency::operator= ( const double  d) [inline]

An assignment operator Frequency = double.

assignment operator

Parameters:
da value in double precision.

Definition at line 342 of file Frequency.h.

References value.

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

Comparision operator.

Equal-to.

Parameters:
xa const reference to a Frequency.
bool asdm::Frequency::operator== ( const Frequency x) const [inline]

Comparision operator.

Equal-to.

Parameters:
xa const reference to a Frequency.

Definition at line 400 of file Frequency.h.

References value.

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

Comparison operator.

Greater-than.

Parameters:
xa const reference to a Frequency.
bool asdm::Frequency::operator> ( const Frequency x) const [inline]

Comparison operator.

Greater-than.

Parameters:
xa const reference to a Frequency.

Definition at line 388 of file Frequency.h.

References value.

bool asdm::Frequency::operator>= ( const Frequency x) const [inline]

Comparison operator.

Greater-than or equal.

Parameters:
xa const reference to a Frequency.

Definition at line 394 of file Frequency.h.

References value.

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

Comparison operator.

Greater-than or equal.

Parameters:
xa const reference to a Frequency.

Write the binary representation of this to an EndianOSStream .

Parameters:
eossa reference to an EndianOSStream .

Write the binary representation of this to an EndianOSStream .

Parameters:
eossa reference to an EndianOSStream .
static void asdm::Frequency::toBin ( const 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 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 vector< 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 vector< 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 vector< vector< 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
static void asdm::Frequency::toBin ( const vector< vector< 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
IDLFrequency asdm::Frequency::toIDLFrequency ( ) const

Return the IDLFrequency representation of the Frequency.

Returns:
IDLFrequency
IDLFrequency asdm::Frequency::toIDLFrequency ( ) const [inline]

Return the IDLFrequency representation of the Frequency.

Returns:
IDLFrequency

Definition at line 431 of file Frequency.h.

References value.

static string asdm::Frequency::toString ( double  ) [static]

Conversion into string.

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

Returns:
string
static string asdm::Frequency::toString ( double  ) [static]

Conversion into string.

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

Returns:
string
string asdm::Frequency::toString ( ) const

Converts into a string.

Returns:
a string containing the representation of a the value in double precision.
string asdm::Frequency::toString ( ) const [inline]

Converts into a string.

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

Definition at line 421 of file Frequency.h.

References value.

Referenced by operator string(), and toStringI().

string asdm::Frequency::toStringI ( ) const [inline]

Idem toString.

Definition at line 424 of file Frequency.h.

References toString(), and value.

string asdm::Frequency::toStringI ( ) const

Idem toString.

string asdm::Frequency::unit ( ) [inline, static]

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

Returns:
string

Definition at line 451 of file Frequency.h.

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

static string asdm::Frequency::unit ( ) [static]

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

Returns:
string

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
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

Overloading of multiplication operator.

Parameters:
da value in double precision .
xa const reference to a Frequency .
Returns:
a Frequency
ostream& operator<< ( 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.
ostream& operator<< ( 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.
istream& operator>> ( istream &  is,
Frequency x 
) [friend]

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

istream& operator>> ( 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 files: