asdm::Interval Class Reference

#include <Interval.h>

Inheritance diagram for asdm::Interval:

Inheritance graph
[legend]
List of all members.

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 63 of file Interval.h.

Public Member Functions

 Interval ()
 Interval constructors.
 Interval (const Interval &)
 Interval (const string &s)
 Interval (const IDLInterval &)
 Interval (long long value)
virtual ~Interval ()
 Interval destructor.
Intervaloperator= (const Interval &)
 assignment operator
Intervaloperator= (const long long)
 assignment operator
Intervaloperator+= (const Interval &)
 assignment with arithmetic operators
Intervaloperator-= (const Interval &)
Intervaloperator *= (const long long)
Intervaloperator/= (const long long)
Interval operator+ (const Interval &) const
 arithmetic functions
Interval operator- (const Interval &) const
Interval operator * (const long long) const
Interval operator/ (const long long) const
bool operator< (const Interval &) const
 comparison operators
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
Interval operator+ () const
string toString () const
string toStringI () const
void toBin (EndianOSStream &eoss)
 Write the binary representation of this into an EndianOSStream.
 operator string () const
 Conversion functions.
long long get () const
IDLInterval toIDLInterval () const

Static Public Member Functions

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

Private Attributes

long long value

Friends

Interval operator * (long long, const Interval &)
 Friend functions.
ostream & operator<< (ostream &, const Interval &)
istream & operator>> (istream &, Interval &)


Constructor & Destructor Documentation

asdm::Interval::Interval (  )  [inline]

Interval constructors.

Definition at line 169 of file Interval.h.

asdm::Interval::Interval ( const Interval  )  [inline]

Definition at line 172 of file Interval.h.

asdm::Interval::Interval ( const string &  s  )  [inline]

Definition at line 180 of file Interval.h.

asdm::Interval::Interval ( const IDLInterval &   )  [inline]

Definition at line 176 of file Interval.h.

asdm::Interval::Interval ( long long  value  )  [inline]

Definition at line 183 of file Interval.h.

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

Interval destructor.

Definition at line 187 of file Interval.h.


Member Function Documentation

static long long asdm::Interval::fromString ( const string &   )  [static]

static string asdm::Interval::toString ( long  long  )  [static]

static Interval asdm::Interval::getInterval ( StringTokenizer t  )  throw (NumberFormatException) [static]

Interval & asdm::Interval::operator= ( const Interval  )  [inline]

assignment operator

Definition at line 190 of file Interval.h.

References value.

Interval & asdm::Interval::operator= ( const long  long  )  [inline]

assignment operator

Definition at line 196 of file Interval.h.

References value.

Interval & asdm::Interval::operator+= ( const Interval  )  [inline]

assignment with arithmetic operators

Definition at line 202 of file Interval.h.

References value.

Interval & asdm::Interval::operator-= ( const Interval  )  [inline]

Definition at line 207 of file Interval.h.

References value.

Interval & asdm::Interval::operator *= ( const long  long  )  [inline]

Definition at line 212 of file Interval.h.

References value.

Interval & asdm::Interval::operator/= ( const long  long  )  [inline]

Definition at line 217 of file Interval.h.

References value.

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

arithmetic functions

Definition at line 223 of file Interval.h.

References value.

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

Definition at line 229 of file Interval.h.

References value.

Interval asdm::Interval::operator * ( const long  long  )  const [inline]

Definition at line 234 of file Interval.h.

References value.

Interval asdm::Interval::operator/ ( const long  long  )  const [inline]

Definition at line 240 of file Interval.h.

References value.

bool asdm::Interval::operator< ( const Interval  )  const [inline]

comparison operators

Definition at line 247 of file Interval.h.

References value.

bool asdm::Interval::operator> ( const Interval  )  const [inline]

Definition at line 251 of file Interval.h.

References value.

bool asdm::Interval::operator<= ( const Interval  )  const [inline]

Definition at line 255 of file Interval.h.

References value.

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

Definition at line 259 of file Interval.h.

References value.

bool asdm::Interval::operator== ( const Interval  )  const [inline]

Definition at line 263 of file Interval.h.

References value.

bool asdm::Interval::equals ( const Interval  )  const [inline]

Definition at line 266 of file Interval.h.

References value.

bool asdm::Interval::operator!= ( const Interval  )  const [inline]

Definition at line 270 of file Interval.h.

References value.

bool asdm::Interval::isZero (  )  const

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

unary - and + operators

Definition at line 275 of file Interval.h.

References value.

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

Definition at line 281 of file Interval.h.

References value.

string asdm::Interval::toString (  )  const [inline]

Definition at line 292 of file Interval.h.

References value.

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

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

Definition at line 296 of file Interval.h.

References toString(), and value.

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

Write the binary representation of this into an EndianOSStream.

Parameters:
eoss 

Reimplemented in asdm::ArrayTime.

static void asdm::Interval::toBin ( 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 ( vector< vector< Interval > >  interval,
EndianOSStream eoss 
) [static]

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

Parameters:
interval 
eoss 

static Interval asdm::Interval::fromBin ( EndianISStream eiss  )  [static]

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

Parameters:
eiss the EndianISStream to be read
Returns:
an Interval

Reimplemented in asdm::ArrayTime.

static vector<Interval> asdm::Interval::from1DBin ( EndianISStream eiss  )  [static]

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

Parameters:
eiss the EndianISStream to be read
Returns:
a vector of Interval

Reimplemented in asdm::ArrayTime.

static vector<vector<Interval> > asdm::Interval::from2DBin ( EndianISStream eiss  )  [static]

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

Parameters:
eiss the EndianISStream to be read
Returns:
a vector of vector of Interval

Reimplemented in asdm::ArrayTime.

asdm::Interval::operator string (  )  const [inline]

Conversion functions.

Definition at line 288 of file Interval.h.

References toString().

long long asdm::Interval::get (  )  const [inline]

Definition at line 300 of file Interval.h.

References value.

Referenced by asdm::ArrayTimeInterval::ArrayTimeInterval(), asdm::ArrayTimeInterval::contains(), asdm::ArrayTimeInterval::equals(), asdm::ArrayTimeInterval::getDurationInDays(), asdm::ArrayTimeInterval::getDurationInNanoSeconds(), asdm::ArrayTimeInterval::getStartInNanoSeconds(), asdm::operator<<(), and asdm::ArrayTimeInterval::overlaps().

IDLInterval asdm::Interval::toIDLInterval (  )  const [inline]

Definition at line 305 of file Interval.h.

References value.

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

Definition at line 330 of file Interval.h.


Friends And Related Function Documentation

Interval operator * ( long  long,
const Interval  
) [friend]

Friend functions.

ostream& operator<< ( ostream &  ,
const Interval  
) [friend]

istream& operator>> ( istream &  ,
Interval  
) [friend]


Member Data Documentation

long long asdm::Interval::value [private]

Definition at line 164 of file Interval.h.

Referenced by equals(), get(), asdm::operator *(), operator *(), operator *=(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), asdm::operator<<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), asdm::operator>>(), toIDLInterval(), toString(), and toStringI().


The documentation for this class was generated from the following file:
Generated on Thu Aug 27 21:26:03 2009 for NRAOCASA by  doxygen 1.5.1