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

The Interval class implements an interval of time in units of nanoseconds. More...

#include <Interval.h>

Inheritance diagram for asdm::Interval:
asdm::ArrayTime asdm::UTCCorrection

Public Member Functions

 Interval ()
 Interval constructors. More...
 
 Interval (const Interval &)
 
 Interval (const std::string &s)
 
 Interval (const asdmIDLTypes::IDLInterval &)
 
 Interval (int64_t value)
 
virtual ~Interval ()
 Interval destructor. More...
 
Intervaloperator= (const Interval &)
 assignment operator More...
 
Intervaloperator= (const int64_t)
 assignment operator More...
 
Intervaloperator+= (const Interval &)
 assignment with arithmetic operators More...
 
Intervaloperator-= (const Interval &)
 
Intervaloperator*= (const int64_t)
 
Intervaloperator/= (const int64_t)
 
Interval operator+ (const Interval &) const
 arithmetic functions More...
 
Interval operator- (const Interval &) const
 
Interval operator* (const int64_t) const
 
Interval operator/ (const int64_t) const
 
bool operator< (const Interval &) const
 comparison operators More...
 
bool operator> (const Interval &) const
 
bool operator<= (const Interval &) const
 
bool operator>= (const Interval &) const
 
bool operator== (const Interval &) const
 
bool equals (const Interval &) const
 
bool operator!= (const Interval &) const
 
bool isZero () const
 
Interval operator- () const
 unary - and + operators More...
 
Interval operator+ () const
 
std::string toString () const
 
std::string toStringI () const
 
void toBin (EndianOSStream &eoss)
 Write the binary representation of this into an EndianOSStream. More...
 
 operator std::string () const
 Conversion functions. More...
 
int64_t get () const
 
asdmIDLTypes::IDLInterval toIDLInterval () const
 

Static Public Member Functions

static int64_t fromString (const std::string &)
 
static std::string toString (int64_t)
 
static Interval getInterval (StringTokenizer &t) throw (NumberFormatException)
 
static void toBin (std::vector< Interval > interval, EndianOSStream &eoss)
 Write the binary representation of a vector of Interval into a EndianOSStream. More...
 
static void toBin (std::vector< std::vector< Interval > > interval, EndianOSStream &eoss)
 Write the binary representation of a vector of vector of Interval into a EndianOSStream. More...
 
static Interval fromBin (EndianIStream &eis)
 Read the binary representation of an Interval from an EndianIStream and use the read value to set an Interval. More...
 
static std::vector< Intervalfrom1DBin (EndianIStream &eis)
 Read the binary representation of a vector of Interval from a EndianIStream and use the read value to set a vector of Interval. More...
 
static std::vector
< std::vector< Interval > > 
from2DBin (EndianIStream &eis)
 Read the binary representation of a vector of vector of Interval from a EndianIStream and use the read value to set a vector of vector of Interval. More...
 
static std::string unit ()
 

Private Attributes

int64_t value
 

Friends

Interval operator* (int64_t, const Interval &)
 Friend functions. More...
 
std::ostream & operator<< (std::ostream &, const Interval &)
 
std::istream & operator>> (std::istream &, Interval &)
 

Detailed Description

The Interval class implements an interval of time in units of nanoseconds.

Version
1.00 Jan. 7, 2005
Author
Allen Farris

Definition at line 58 of file Interval.h.

Constructor & Destructor Documentation

asdm::Interval::Interval ( )
inline

Interval constructors.

Definition at line 164 of file Interval.h.

asdm::Interval::Interval ( const Interval t)
inline

Definition at line 167 of file Interval.h.

asdm::Interval::Interval ( const std::string &  s)
inline

Definition at line 175 of file Interval.h.

asdm::Interval::Interval ( const asdmIDLTypes::IDLInterval &  l)
inline

Definition at line 171 of file Interval.h.

asdm::Interval::Interval ( int64_t  value)
inline

Definition at line 178 of file Interval.h.

asdm::Interval::~Interval ( )
inlinevirtual

Interval destructor.

Definition at line 182 of file Interval.h.

Member Function Documentation

bool asdm::Interval::equals ( const Interval x) const
inline

Definition at line 261 of file Interval.h.

References value.

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

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

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

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

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

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

Parameters
eisthe EndianIStream to be read
Returns
an Interval
static int64_t asdm::Interval::fromString ( const std::string &  )
static
int64_t asdm::Interval::get ( ) const
inline
static Interval asdm::Interval::getInterval ( StringTokenizer t)
throw (NumberFormatException
)
static
bool asdm::Interval::isZero ( ) const
asdm::Interval::operator std::string ( ) const
inline

Conversion functions.

Definition at line 283 of file Interval.h.

References casa::vpf::toString().

bool asdm::Interval::operator!= ( const Interval x) const
inline

Definition at line 265 of file Interval.h.

References value.

Interval asdm::Interval::operator* ( const int64_t  n) const
inline

Definition at line 229 of file Interval.h.

References value.

Interval & asdm::Interval::operator*= ( const int64_t  n)
inline

Definition at line 207 of file Interval.h.

References value.

Interval asdm::Interval::operator+ ( const Interval t2) const
inline

arithmetic functions

Definition at line 218 of file Interval.h.

References value.

Interval asdm::Interval::operator+ ( ) const
inline

Definition at line 276 of file Interval.h.

References value.

Interval & asdm::Interval::operator+= ( const Interval t)
inline

assignment with arithmetic operators

Definition at line 197 of file Interval.h.

References value.

Interval asdm::Interval::operator- ( const Interval t2) const
inline

Definition at line 224 of file Interval.h.

References value.

Interval asdm::Interval::operator- ( ) const
inline

unary - and + operators

Definition at line 270 of file Interval.h.

References value.

Interval & asdm::Interval::operator-= ( const Interval t)
inline

Definition at line 202 of file Interval.h.

References value.

Interval asdm::Interval::operator/ ( const int64_t  n) const
inline

Definition at line 235 of file Interval.h.

References value.

Interval & asdm::Interval::operator/= ( const int64_t  n)
inline

Definition at line 212 of file Interval.h.

References value.

bool asdm::Interval::operator< ( const Interval x) const
inline

comparison operators

Definition at line 242 of file Interval.h.

References value.

bool asdm::Interval::operator<= ( const Interval x) const
inline

Definition at line 250 of file Interval.h.

References value.

Interval & asdm::Interval::operator= ( const Interval t)
inline

assignment operator

Definition at line 185 of file Interval.h.

References value.

Interval & asdm::Interval::operator= ( const int64_t  v)
inline

assignment operator

Definition at line 191 of file Interval.h.

References value.

bool asdm::Interval::operator== ( const Interval x) const
inline

Definition at line 258 of file Interval.h.

References value.

bool asdm::Interval::operator> ( const Interval x) const
inline

Definition at line 246 of file Interval.h.

References value.

bool asdm::Interval::operator>= ( const Interval x) const
inline

Definition at line 254 of file Interval.h.

References value.

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

Write the binary representation of this into an EndianOSStream.

Parameters
eoss
static void asdm::Interval::toBin ( std::vector< Interval interval,
EndianOSStream eoss 
)
static

Write the binary representation of a vector of Interval into a EndianOSStream.

Parameters
interval
eoss
static void asdm::Interval::toBin ( std::vector< std::vector< Interval > >  interval,
EndianOSStream eoss 
)
static

Write the binary representation of a vector of vector of Interval into a EndianOSStream.

Parameters
interval
eoss
asdmIDLTypes::IDLInterval asdm::Interval::toIDLInterval ( ) const
inline

Definition at line 300 of file Interval.h.

References value.

static std::string asdm::Interval::toString ( int64_t  )
static
std::string asdm::Interval::toString ( ) const
inline

Definition at line 287 of file Interval.h.

References value.

Referenced by toStringI().

std::string asdm::Interval::toStringI ( ) const
inline

Definition at line 291 of file Interval.h.

References toString(), and value.

std::string asdm::Interval::unit ( )
inlinestatic

Definition at line 325 of file Interval.h.

Friends And Related Function Documentation

Interval operator* ( int64_t  n,
const Interval x 
)
friend

Friend functions.

std::ostream& operator<< ( std::ostream &  o,
const Interval x 
)
friend
std::istream& operator>> ( std::istream &  i,
Interval x 
)
friend

Member Data Documentation

int64_t asdm::Interval::value
private

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