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

The Angle class implements a quantity of angle in radians. More...

#include <Angle.h>

Public Member Functions

 Angle ()
 The nullary constructor (default). More...
 
 Angle (const Angle &)
 The copy constructor. More...
 
 Angle (const std::string &s)
 A constructor from a string representation. More...
 
 Angle (const asdmIDLTypes::IDLAngle &idlAngle)
 A constructor from a CORBA/IDL representation. More...
 
 Angle (double value)
 A constructor from a value in double precision. More...
 
virtual ~Angle ()
 The destructor. More...
 
void toBin (EndianOSStream &eoss)
 Write the binary representation of this to an EndianOSStream . More...
 
Angleoperator= (const Angle &x)
 An assignment operator Angle = Angle. More...
 
Angleoperator= (const double d)
 An assignment operator Angle = double. More...
 
Angleoperator+= (const Angle &x)
 Operator increment and assign. More...
 
Angleoperator-= (const Angle &x)
 Operator decrement and assign. More...
 
Angleoperator*= (const double x)
 Operator multiply and assign. More...
 
Angleoperator/= (const double x)
 Operator divide and assign. More...
 
Angle operator+ (const Angle &x) const
 Addition operator. More...
 
Angle operator- (const Angle &x) const
 Substraction operator. More...
 
Angle operator* (const double x) const
 Multiplication operator. More...
 
Angle operator/ (const double x) const
 Division operator. More...
 
bool operator< (const Angle &x) const
 Comparison operator. More...
 
bool operator> (const Angle &x) const
 Comparison operator. More...
 
bool operator<= (const Angle &x) const
 Comparison operator. More...
 
bool operator>= (const Angle &x) const
 Comparison operator. More...
 
bool operator== (const Angle &x) const
 Comparision operator. More...
 
bool equals (const Angle &x) const
 Comparison method. More...
 
bool operator!= (const Angle &x) const
 Comparison operator. More...
 
bool isZero () const
 Comparison method. More...
 
Angle operator- () const
 Unary operator. More...
 
Angle 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 Angle. More...
 
asdmIDLTypes::IDLAngle toIDLAngle () const
 Return the IDLAngle representation of the Angle. 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 Angle getAngle (StringTokenizer &st) throw (NumberFormatException)
 Parse the next (string) token of a StringTokenizer into an angle. More...
 
static void toBin (const std::vector< Angle > &angle, EndianOSStream &eoss)
 Write the binary representation of a vector of Angle to a EndianOSStream. More...
 
static void toBin (const std::vector< std::vector< Angle > > &angle, EndianOSStream &eoss)
 Write the binary representation of a vector of vector of Angle to a EndianOSStream. More...
 
static void toBin (const std::vector< std::vector< std::vector< Angle > > > &angle, EndianOSStream &eoss)
 Write the binary representation of a vector of vector of vector of Angle to a EndianOSStream. More...
 
static Angle fromBin (EndianIStream &eis)
 Read the binary representation of an Angle from a EndianIStream and use the read value to set an Angle. More...
 
static std::vector< Anglefrom1DBin (EndianIStream &eis)
 Read the binary representation of a vector of Angle from an EndianIStream and use the read value to set a vector of Angle. More...
 
static std::vector
< std::vector< Angle > > 
from2DBin (EndianIStream &eis)
 Read the binary representation of a vector of vector of Angle from an EndianIStream and use the read value to set a vector of vector of Angle. More...
 
static std::vector
< std::vector< std::vector
< Angle > > > 
from3DBin (EndianIStream &eis)
 Read the binary representation of a vector of vector of vector of Angle from an EndianIStream and use the read value to set a vector of vector of vector of Angle. More...
 
static std::string unit ()
 Returns the abbreviated name of the unit implicitely associated to any Angle. More...
 

Private Attributes

double value
 

Friends

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

Detailed Description

The Angle class implements a quantity of angle in radians.

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

Constructor & Destructor Documentation

Angle::Angle ( )
inline

The nullary constructor (default).

Angle constructors.

Definition at line 316 of file Angle.h.

Angle::Angle ( const Angle t)
inline

The copy constructor.

Definition at line 318 of file Angle.h.

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

Angle::Angle ( const asdmIDLTypes::IDLAngle &  idlAngle)
inline

A constructor from a CORBA/IDL representation.

Parameters
idlAnglea cons ref to an IDLAngle.

Definition at line 321 of file Angle.h.

Angle::Angle ( double  value)
inline

A constructor from a value in double precision.

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

Definition at line 326 of file Angle.h.

Angle::~Angle ( )
inlinevirtual

The destructor.

Angle destructor.

Definition at line 329 of file Angle.h.

Member Function Documentation

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

Comparison method.

Equality.

Parameters
xa const reference to a Angle.

Definition at line 391 of file Angle.h.

References value.

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

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

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

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

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

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

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

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

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

A static method equivalent to the constructor from a string.

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

Return the double precision value of the Angle.

Returns
double

Definition at line 421 of file Angle.h.

References value.

static Angle asdm::Angle::getAngle ( StringTokenizer st)
throw (NumberFormatException
)
static

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

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

Comparison method.

Test nullity.

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

Conversion operator.

Conversion functions.

Converts into a string.

Definition at line 412 of file Angle.h.

References casa::vpf::toString().

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

Comparison operator.

Not-equal.

Parameters
xa const reference to a Angle.

Definition at line 397 of file Angle.h.

References value.

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

Multiplication operator.

Parameters
xa value in double precision.

Definition at line 368 of file Angle.h.

References value.

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

Operator multiply and assign.

Parameters
xa value in double precision.

Definition at line 349 of file Angle.h.

References value.

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

Addition operator.

arithmetic functions

Parameters
xa const reference to a Angle.

Definition at line 358 of file Angle.h.

References value.

Angle Angle::operator+ ( ) const
inline

Unary operator.

Unary plus.

Definition at line 406 of file Angle.h.

References value.

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

Operator increment and assign.

assignment with arithmetic operators

Parameters
xa const reference to an Angle.

Definition at line 341 of file Angle.h.

References value.

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

Substraction operator.

Parameters
xa const reference to a Angle.

Definition at line 363 of file Angle.h.

References value.

Angle Angle::operator- ( ) const
inline

Unary operator.

unary - and + operators

Opposite.

Definition at line 401 of file Angle.h.

References value.

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

Operator decrement and assign.

Parameters
xa const reference to an Angle.

Definition at line 345 of file Angle.h.

References value.

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

Division operator.

Parameters
da value in double precision.

Definition at line 373 of file Angle.h.

References value.

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

Operator divide and assign.

Parameters
xa valye in double precision.

Definition at line 353 of file Angle.h.

References value.

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

Comparison operator.

comparison operators

Less-than.

Parameters
xa const reference to a Angle.

Definition at line 379 of file Angle.h.

References value.

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

Comparison operator.

Less-than or equal.

Parameters
xa const reference to a Angle.

Definition at line 385 of file Angle.h.

References value.

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

An assignment operator Angle = Angle.

assignment operator

Parameters
xa const reference to an Angle.

Definition at line 331 of file Angle.h.

References value.

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

An assignment operator Angle = double.

assignment operator

Parameters
da value in double precision.

Definition at line 336 of file Angle.h.

References value.

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

Comparision operator.

Equal-to.

Parameters
xa const reference to a Angle.

Definition at line 394 of file Angle.h.

References value.

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

Comparison operator.

Greater-than.

Parameters
xa const reference to a Angle.

Definition at line 382 of file Angle.h.

References value.

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

Comparison operator.

Greater-than or equal.

Parameters
xa const reference to a Angle.

Definition at line 388 of file Angle.h.

References value.

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

Write the binary representation of this to an EndianOSStream .

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

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

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

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

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

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

Parameters
anglethe vector of vector of vector of Angle to be written
eossthe EndianOSStream to be written to
asdmIDLTypes::IDLAngle Angle::toIDLAngle ( ) const
inline

Return the IDLAngle representation of the Angle.

Returns
IDLAngle

Definition at line 425 of file Angle.h.

References value.

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

Conversion into string.

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

Returns
string
std::string Angle::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 Angle.h.

References value.

Referenced by toStringI().

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

Idem toString.

Definition at line 418 of file Angle.h.

References toString(), and value.

std::string Angle::unit ( )
inlinestatic

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

Returns
string

Definition at line 445 of file Angle.h.

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

Friends And Related Function Documentation

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

Overloading of multiplication operator.

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

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

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

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

Member Data Documentation

double asdm::Angle::value
private

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