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::Length Class Reference

The Length class implements a quantity of length in meters. More...

#include <Length.h>

List of all members.

Public Member Functions

 Length ()
 The nullary constructor (default).
 Length (const Length &)
 The copy constructor.
 Length (const string &s)
 A constructor from a string representation.
 Length (const IDLLength &idlLength)
 A constructor from a CORBA/IDL representation.
 Length (double value)
 A constructor from a value in double precision.
virtual ~Length ()
 The destructor.
void toBin (EndianOSStream &eoss)
 Write the binary representation of this to an EndianOSStream .
Lengthoperator= (const Length &x)
 An assignment operator Length = Length.
Lengthoperator= (const double d)
 An assignment operator Length = double.
Lengthoperator+= (const Length &x)
 Operator increment and assign.
Lengthoperator-= (const Length &x)
 Operator decrement and assign.
Lengthoperator*= (const double x)
 Operator multiply and assign.
Lengthoperator/= (const double x)
 Operator divide and assign.
Length operator+ (const Length &x) const
 Addition operator.
Length operator- (const Length &x) const
 Substraction operator.
Length operator* (const double x) const
 Multiplication operator.
Length operator/ (const double x) const
 Division operator.
bool operator< (const Length &x) const
 Comparison operator.
bool operator> (const Length &x) const
 Comparison operator.
bool operator<= (const Length &x) const
 Comparison operator.
bool operator>= (const Length &x) const
 Comparison operator.
bool operator== (const Length &x) const
 Comparision operator.
bool equals (const Length &x) const
 Comparison method.
bool operator!= (const Length &x) const
 Comparison operator.
bool isZero () const
 Comparison method.
Length operator- () const
 Unary operator.
Length 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 Length.
IDLLength toIDLLength () const
 Return the IDLLength representation of the Length.
 Length ()
 The nullary constructor (default).
 Length (const Length &)
 The copy constructor.
 Length (const string &s)
 A constructor from a string representation.
 Length (const IDLLength &idlLength)
 A constructor from a CORBA/IDL representation.
 Length (double value)
 A constructor from a value in double precision.
virtual ~Length ()
 The destructor.
void toBin (EndianOSStream &eoss)
 Write the binary representation of this to an EndianOSStream .
Lengthoperator= (const Length &x)
 An assignment operator Length = Length.
Lengthoperator= (const double d)
 An assignment operator Length = double.
Lengthoperator+= (const Length &x)
 Operator increment and assign.
Lengthoperator-= (const Length &x)
 Operator decrement and assign.
Lengthoperator*= (const double x)
 Operator multiply and assign.
Lengthoperator/= (const double x)
 Operator divide and assign.
Length operator+ (const Length &x) const
 Addition operator.
Length operator- (const Length &x) const
 Substraction operator.
Length operator* (const double x) const
 Multiplication operator.
Length operator/ (const double x) const
 Division operator.
bool operator< (const Length &x) const
 Comparison operator.
bool operator> (const Length &x) const
 Comparison operator.
bool operator<= (const Length &x) const
 Comparison operator.
bool operator>= (const Length &x) const
 Comparison operator.
bool operator== (const Length &x) const
 Comparision operator.
bool equals (const Length &x) const
 Comparison method.
bool operator!= (const Length &x) const
 Comparison operator.
bool isZero () const
 Comparison method.
Length operator- () const
 Unary operator.
Length 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 Length.
IDLLength toIDLLength () const
 Return the IDLLength representation of the Length.

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

Private Attributes

double value

Friends

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

Detailed Description

The Length class implements a quantity of length in meters.

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 Length.h.


Constructor & Destructor Documentation

asdm::Length::Length ( ) [inline]

The nullary constructor (default).

Length constructors.

Definition at line 322 of file Length.h.

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

The copy constructor.

Definition at line 324 of file Length.h.

asdm::Length::Length ( 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 Length.h.

asdm::Length::Length ( const IDLLength &  idlLength) [inline]

A constructor from a CORBA/IDL representation.

Parameters:
idlLengtha cons ref to an IDLLength.

Definition at line 327 of file Length.h.

asdm::Length::Length ( double  value) [inline]

A constructor from a value in double precision.

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

Definition at line 332 of file Length.h.

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

The destructor.

Length destructor.

Definition at line 335 of file Length.h.

The nullary constructor (default).

The copy constructor.

asdm::Length::Length ( 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::Length::Length ( const IDLLength &  idlLength)

A constructor from a CORBA/IDL representation.

Parameters:
idlLengtha cons ref to an IDLLength.
asdm::Length::Length ( double  value)

A constructor from a value in double precision.

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

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

The destructor.


Member Function Documentation

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

Comparison method.

Equality.

Parameters:
xa const reference to a Length.

Definition at line 397 of file Length.h.

References value.

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

Comparison method.

Equality.

Parameters:
xa const reference to a Length.
static vector<Length> asdm::Length::from1DBin ( EndianIStream eis) [static]

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

Parameters:
eisa reference to the EndianIStream to be read
Returns:
a vector of Length
static vector<Length> asdm::Length::from1DBin ( EndianIStream eis) [static]

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

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

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

Parameters:
eisthe EndianIStream to be read
Returns:
a vector of vector of Length
static vector<vector<Length> > asdm::Length::from2DBin ( EndianIStream eis) [static]

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

Parameters:
eisthe EndianIStream to be read
Returns:
a vector of vector of Length
static vector<vector<vector<Length> > > asdm::Length::from3DBin ( EndianIStream eis) [static]

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

Parameters:
eisthe EndianIStream to be read
Returns:
a vector of vector of vector of Length
static vector<vector<vector<Length> > > asdm::Length::from3DBin ( EndianIStream eis) [static]

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

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

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

Parameters:
eisthe EndianStream to be read
Returns:
an Length
static Length asdm::Length::fromBin ( EndianIStream eis) [static]

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

Parameters:
eisthe EndianStream to be read
Returns:
an Length
static double asdm::Length::fromString ( const string &  s) [static]

A static method equivalent to the constructor from a string.

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

A static method equivalent to the constructor from a string.

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

Return the double precision value of the Length.

Returns:
double

Definition at line 427 of file Length.h.

References value.

double asdm::Length::get ( ) const

Return the double precision value of the Length.

Returns:
double

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

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

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

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

Comparison method.

Test nullity.

Returns:
a bool.
bool asdm::Length::isZero ( ) const

Comparison method.

Test nullity.

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

Conversion operator.

Conversion functions.

Converts into a string.

Definition at line 418 of file Length.h.

References toString().

asdm::Length::operator string ( ) const

Conversion operator.

Converts into a string.

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

Comparison operator.

Not-equal.

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

Comparison operator.

Not-equal.

Parameters:
xa const reference to a Length.

Definition at line 403 of file Length.h.

References value.

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

Multiplication operator.

Parameters:
xa value in double precision.

Definition at line 374 of file Length.h.

References value.

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

Multiplication operator.

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

Operator multiply and assign.

Parameters:
xa value in double precision.

Definition at line 355 of file Length.h.

References value.

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

Operator multiply and assign.

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

Addition operator.

arithmetic functions

Parameters:
xa const reference to a Length.

Definition at line 364 of file Length.h.

References value.

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

Addition operator.

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

Unary operator.

Unary plus.

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

Unary operator.

Unary plus.

Definition at line 412 of file Length.h.

References value.

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

Operator increment and assign.

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

Operator increment and assign.

assignment with arithmetic operators

Parameters:
xa const reference to an Length.

Definition at line 347 of file Length.h.

References value.

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

Substraction operator.

Parameters:
xa const reference to a Length.

Definition at line 369 of file Length.h.

References value.

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

Substraction operator.

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

Unary operator.

Opposite.

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

Unary operator.

unary - and + operators

Opposite.

Definition at line 407 of file Length.h.

References value.

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

Operator decrement and assign.

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

Operator decrement and assign.

Parameters:
xa const reference to an Length.

Definition at line 351 of file Length.h.

References value.

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

Division operator.

Parameters:
da value in double precision.

Definition at line 379 of file Length.h.

References value.

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

Division operator.

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

Operator divide and assign.

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

Operator divide and assign.

Parameters:
xa valye in double precision.

Definition at line 359 of file Length.h.

References value.

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

Comparison operator.

Less-than.

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

Comparison operator.

comparison operators

Less-than.

Parameters:
xa const reference to a Length.

Definition at line 385 of file Length.h.

References value.

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

Comparison operator.

Less-than or equal.

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

Comparison operator.

Less-than or equal.

Parameters:
xa const reference to a Length.

Definition at line 391 of file Length.h.

References value.

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

An assignment operator Length = Length.

assignment operator

Parameters:
xa const reference to an Length.

Definition at line 337 of file Length.h.

References value.

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

An assignment operator Length = Length.

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

An assignment operator Length = double.

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

An assignment operator Length = double.

assignment operator

Parameters:
da value in double precision.

Definition at line 342 of file Length.h.

References value.

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

Comparision operator.

Equal-to.

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

Comparision operator.

Equal-to.

Parameters:
xa const reference to a Length.

Definition at line 400 of file Length.h.

References value.

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

Comparison operator.

Greater-than.

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

Comparison operator.

Greater-than.

Parameters:
xa const reference to a Length.

Definition at line 388 of file Length.h.

References value.

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

Comparison operator.

Greater-than or equal.

Parameters:
xa const reference to a Length.

Definition at line 394 of file Length.h.

References value.

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

Comparison operator.

Greater-than or equal.

Parameters:
xa const reference to a Length.

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::Length::toBin ( const vector< Length > &  angle,
EndianOSStream eoss 
) [static]

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

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

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

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

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

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

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

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

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

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

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

Parameters:
anglethe vector of vector of vector of Length to be written
eossthe EndianOSStream to be written to
IDLLength asdm::Length::toIDLLength ( ) const

Return the IDLLength representation of the Length.

Returns:
IDLLength
IDLLength asdm::Length::toIDLLength ( ) const [inline]

Return the IDLLength representation of the Length.

Returns:
IDLLength

Definition at line 431 of file Length.h.

References value.

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

Conversion into string.

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

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

Conversion into string.

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

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

Converts into a string.

Returns:
a string containing the representation of a the value in double precision.
string asdm::Length::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 Length.h.

References value.

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

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

Idem toString.

Definition at line 424 of file Length.h.

References toString(), and value.

string asdm::Length::toStringI ( ) const

Idem toString.

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

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

Returns:
string

Definition at line 451 of file Length.h.

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

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

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

Returns:
string

Friends And Related Function Documentation

Length operator* ( double  d,
const Length x 
) [friend]

Overloading of multiplication operator.

Parameters:
da value in double precision .
xa const reference to a Length .
Returns:
a Length
Length operator* ( double  d,
const Length x 
) [friend]

Overloading of multiplication operator.

Parameters:
da value in double precision .
xa const reference to a Length .
Returns:
a Length

Overloading of multiplication operator.

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

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

Parameters:
osa reference to the ostream to be written on.
xa const reference to a Length.
ostream& operator<< ( ostream &  os,
const Length x 
) [friend]

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

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

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

istream& operator>> ( istream &  is,
Length x 
) [friend]

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


Member Data Documentation

double asdm::Length::value [private]

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