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 | Static Private Attributes | Friends | List of all members
asdm::ArrayTimeInterval Class Reference

The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval. More...

#include <ArrayTimeInterval.h>

Public Member Functions

 ArrayTimeInterval ()
 Constructors. More...
 
 ArrayTimeInterval (ArrayTime start, Interval duration)
 
 ArrayTimeInterval (double startInMJD, double durationInDays)
 
 ArrayTimeInterval (int64_t startInNanoSeconds, int64_t durationInNanoSeconds)
 
 ArrayTimeInterval (ArrayTime start)
 
 ArrayTimeInterval (double startInMJD)
 
 ArrayTimeInterval (int64_t startInNanoSeconds)
 
 ArrayTimeInterval (asdmIDLTypes::IDLArrayTimeInterval t)
 
void setStart (ArrayTime start)
 Setters. More...
 
void setStart (double start)
 
void setStart (int64_t start)
 
void setDuration (Interval duration)
 
void setDuration (int64_t nanoSeconds)
 
void setDuration (double days)
 
ArrayTime getStart () const
 Getters. More...
 
ArrayTime getMidPoint () const
 
double getStartInMJD () const
 
int64_t getStartInNanoSeconds () const
 
Interval getDuration () const
 
int64_t getDurationInNanoSeconds () const
 
double getDurationInDays () const
 
bool equals (ArrayTimeInterval ati)
 Checkers. More...
 
bool overlaps (ArrayTimeInterval ati)
 
bool contains (ArrayTimeInterval ati)
 
bool contains (ArrayTime at)
 
bool operator== (ArrayTimeInterval &)
 Operators. More...
 
bool operator!= (ArrayTimeInterval &)
 
const
asdmIDLTypes::IDLArrayTimeInterval 
toIDLArrayTimeInterval () const
 To IDL conversion. More...
 
void toBin (EndianOSStream &eoss) const
 Write the binary representation of this to a EndianOSStream. More...
 
std::string toString () const
 Returns a string representation of this. More...
 

Static Public Member Functions

static void readStartTimeDurationInBin (bool b)
 Defines how the representation of an ArrayTimeInterval found in subsequent reads of a document containing table exported in binary must be interpreted. More...
 
static bool readStartTimeDurationInBin ()
 Returns a boolean value whose meaning is defined as follows: true <=> the representation of ArrayTimeInterval object found in any binary table will be considered as (startTime, duration). More...
 
static void readStartTimeDurationInXML (bool b)
 Defines how the representation of an ArrayTimeInterval found in subsequent reads of a document containing table exported in XML must be interpreted. More...
 
static bool readStartTimeDurationInXML ()
 Returns a boolean value whose meaning is defined as follows: true <=> the representation of ArrayTimeInterval object found in any binary table will be considered as (startTime, duration). More...
 
static void toBin (const std::vector< ArrayTimeInterval > &arrayTimeInterval, EndianOSStream &eoss)
 Write the binary representation of a vector of ArrayTime to a EndianOSStream. More...
 
static void toBin (const std::vector< std::vector< ArrayTimeInterval > > &arrayTimeInterval, EndianOSStream &eoss)
 Write the binary representation of a vector of vector of ArrayTimeInterval to a EndianOSStream. More...
 
static void toBin (const std::vector< std::vector< std::vector< ArrayTimeInterval > > > &arrayTimeInterval, EndianOSStream &eoss)
 Write the binary representation of a vector of vector of vector of ArrayTimeInterval to a EndianOSStream. More...
 
static ArrayTimeInterval fromBin (EndianIStream &eis)
 Read the binary representation of an ArrayTimeInterval from a EndianIStream and use the read value to set an ArrayTimeInterval. More...
 
static std::vector
< ArrayTimeInterval
from1DBin (EndianIStream &eis)
 Read the binary representation of a vector of ArrayTimeInterval from an EndianIStream and use the read value to set a vector of ArrayTimeInterval. More...
 
static std::vector
< std::vector
< ArrayTimeInterval > > 
from2DBin (EndianIStream &eis)
 Read the binary representation of a vector of vector of ArrayTimeInterval from an EndianIStream and use the read value to set a vector of vector of ArrayTimeInterval. More...
 
static std::vector
< std::vector< std::vector
< ArrayTimeInterval > > > 
from3DBin (EndianIStream &eis)
 Read the binary representation of a vector of vector of vector of ArrayTimeInterval from an EndianIStream and use the read value to set a vector of vector of vector of ArrayTimeInterval. More...
 

Private Attributes

ArrayTime start
 
Interval duration
 

Static Private Attributes

static bool readStartTimeDurationInBin_
 
static bool readStartTimeDurationInXML_
 

Friends

std::ostream & operator<< (std::ostream &, ArrayTimeInterval &)
 
std::istream & operator>> (std::istream &, ArrayTimeInterval &)
 

Detailed Description

The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval.

Instances of ArrayTimeInterval are used in many ASDM tables whose rows contain information relevant during a certain laps of time and starting at a given date.

Definition at line 47 of file ArrayTimeInterval.h.

Constructor & Destructor Documentation

asdm::ArrayTimeInterval::ArrayTimeInterval ( )
inline

Constructors.

inline constructors

Definition at line 216 of file ArrayTimeInterval.h.

asdm::ArrayTimeInterval::ArrayTimeInterval ( ArrayTime  start,
Interval  duration 
)
inline

Definition at line 217 of file ArrayTimeInterval.h.

References duration, asdm::Interval::get(), asdm::Long::MAX_VALUE, min, and start.

asdm::ArrayTimeInterval::ArrayTimeInterval ( double  startInMJD,
double  durationInDays 
)
inline

Definition at line 222 of file ArrayTimeInterval.h.

asdm::ArrayTimeInterval::ArrayTimeInterval ( int64_t  startInNanoSeconds,
int64_t  durationInNanoSeconds 
)
inline

Definition at line 226 of file ArrayTimeInterval.h.

References duration, asdm::Long::MAX_VALUE, min, and start.

asdm::ArrayTimeInterval::ArrayTimeInterval ( ArrayTime  start)
inline

Definition at line 232 of file ArrayTimeInterval.h.

References duration, asdm::Interval::get(), asdm::Long::MAX_VALUE, and start.

asdm::ArrayTimeInterval::ArrayTimeInterval ( double  startInMJD)
inline

Definition at line 237 of file ArrayTimeInterval.h.

References duration, asdm::Interval::get(), asdm::Long::MAX_VALUE, and start.

asdm::ArrayTimeInterval::ArrayTimeInterval ( int64_t  startInNanoSeconds)
inline

Definition at line 242 of file ArrayTimeInterval.h.

References duration, asdm::Interval::get(), asdm::Long::MAX_VALUE, and start.

asdm::ArrayTimeInterval::ArrayTimeInterval ( asdmIDLTypes::IDLArrayTimeInterval  t)

Member Function Documentation

bool asdm::ArrayTimeInterval::contains ( ArrayTimeInterval  ati)
inline

Definition at line 320 of file ArrayTimeInterval.h.

References duration, asdm::Interval::get(), getDuration(), getStart(), and start.

bool asdm::ArrayTimeInterval::contains ( ArrayTime  at)
inline

Definition at line 330 of file ArrayTimeInterval.h.

References duration, asdm::Interval::get(), start, and casa::time.

bool asdm::ArrayTimeInterval::equals ( ArrayTimeInterval  ati)
inline

Checkers.

inline checkers

Definition at line 303 of file ArrayTimeInterval.h.

References duration, asdm::Interval::get(), getDuration(), getStart(), and start.

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

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

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

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

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

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

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

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

Parameters
eisthe EndianStream to be read
Returns
an ArrayTimeInterval
Interval asdm::ArrayTimeInterval::getDuration ( ) const
inline
double asdm::ArrayTimeInterval::getDurationInDays ( ) const
inline
int64_t asdm::ArrayTimeInterval::getDurationInNanoSeconds ( ) const
inline

Definition at line 298 of file ArrayTimeInterval.h.

References duration, and asdm::Interval::get().

ArrayTime asdm::ArrayTimeInterval::getMidPoint ( ) const
inline

Definition at line 278 of file ArrayTimeInterval.h.

References duration, asdm::Interval::get(), and start.

ArrayTime asdm::ArrayTimeInterval::getStart ( ) const
inline

Getters.

inline getters

Definition at line 274 of file ArrayTimeInterval.h.

References start.

Referenced by asdm::ASDM_TABLE_BASE::ati2CASA1D(), contains(), equals(), asdm::operator<<(), and overlaps().

double asdm::ArrayTimeInterval::getStartInMJD ( ) const
inline

Definition at line 282 of file ArrayTimeInterval.h.

References asdm::ArrayTime::getMJD(), and start.

int64_t asdm::ArrayTimeInterval::getStartInNanoSeconds ( ) const
inline

Definition at line 286 of file ArrayTimeInterval.h.

References asdm::Interval::get(), and start.

bool asdm::ArrayTimeInterval::operator!= ( ArrayTimeInterval ati)
inline

Definition at line 342 of file ArrayTimeInterval.h.

References duration, and start.

bool asdm::ArrayTimeInterval::operator== ( ArrayTimeInterval ati)
inline

Operators.

Definition at line 338 of file ArrayTimeInterval.h.

References duration, and start.

bool asdm::ArrayTimeInterval::overlaps ( ArrayTimeInterval  ati)
inline

Definition at line 308 of file ArrayTimeInterval.h.

References duration, asdm::Interval::get(), getDuration(), getStart(), and start.

static void asdm::ArrayTimeInterval::readStartTimeDurationInBin ( bool  b)
static

Defines how the representation of an ArrayTimeInterval found in subsequent reads of a document containing table exported in binary must be interpreted.

The interpretation depends on the value of the argument b : b == true means that it must be interpreted as (startTime, duration) b == false means that it must be interpreted as (midPoint, duration)

Parameters
ba boolean value.
static bool asdm::ArrayTimeInterval::readStartTimeDurationInBin ( )
static

Returns a boolean value whose meaning is defined as follows: true <=> the representation of ArrayTimeInterval object found in any binary table will be considered as (startTime, duration).

false <=> the representation of ArrayTimeInterval object found in any binary table will be considered as (midPoint, duration).

static void asdm::ArrayTimeInterval::readStartTimeDurationInXML ( bool  b)
static

Defines how the representation of an ArrayTimeInterval found in subsequent reads of a document containing table exported in XML must be interpreted.

The interpretation depends on the value of the argument b : b == true means that it must be interpreted as (startTime, duration) b == false means that it must be interpreted as (midPoint, duration)

Parameters
ba boolean value.
static bool asdm::ArrayTimeInterval::readStartTimeDurationInXML ( )
static

Returns a boolean value whose meaning is defined as follows: true <=> the representation of ArrayTimeInterval object found in any binary table will be considered as (startTime, duration).

false <=> the representation of ArrayTimeInterval object found in any binary table will be considered as (midPoint, duration).

void asdm::ArrayTimeInterval::setDuration ( Interval  duration)
inline

Definition at line 260 of file ArrayTimeInterval.h.

void asdm::ArrayTimeInterval::setDuration ( int64_t  nanoSeconds)
inline

Definition at line 269 of file ArrayTimeInterval.h.

void asdm::ArrayTimeInterval::setDuration ( double  days)
inline

Definition at line 265 of file ArrayTimeInterval.h.

References asdm::ArrayTime::unitsInADay.

void asdm::ArrayTimeInterval::setStart ( ArrayTime  start)
inline

Setters.

Inline setters.

Definition at line 248 of file ArrayTimeInterval.h.

void asdm::ArrayTimeInterval::setStart ( double  start)
inline

Definition at line 252 of file ArrayTimeInterval.h.

void asdm::ArrayTimeInterval::setStart ( int64_t  start)
inline

Definition at line 256 of file ArrayTimeInterval.h.

void asdm::ArrayTimeInterval::toBin ( EndianOSStream eoss) const

Write the binary representation of this to a EndianOSStream.

It writes successively the midpoint , the duration.

static void asdm::ArrayTimeInterval::toBin ( const std::vector< ArrayTimeInterval > &  arrayTimeInterval,
EndianOSStream eoss 
)
static

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

Parameters
arrayTimeIntervalthe vector of ArrayTime to be written
eossthe EndianOSStream to be written to
static void asdm::ArrayTimeInterval::toBin ( const std::vector< std::vector< ArrayTimeInterval > > &  arrayTimeInterval,
EndianOSStream eoss 
)
static

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

Parameters
arrayTimeIntervalthe vector of vector of ArrayTimeInterval to be written
eossthe EndianOSStream to be written to
static void asdm::ArrayTimeInterval::toBin ( const std::vector< std::vector< std::vector< ArrayTimeInterval > > > &  arrayTimeInterval,
EndianOSStream eoss 
)
static

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

Parameters
arrayTimeIntervalthe vector of vector of vector of ArrayTimeInterval to be written
eossthe EndianOSStream to be written to
const asdmIDLTypes::IDLArrayTimeInterval asdm::ArrayTimeInterval::toIDLArrayTimeInterval ( ) const

To IDL conversion.

std::string asdm::ArrayTimeInterval::toString ( ) const

Returns a string representation of this.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
ArrayTimeInterval ati 
)
friend

Definition at line 346 of file ArrayTimeInterval.h.

std::istream& operator>> ( std::istream &  i,
ArrayTimeInterval ati 
)
friend

Definition at line 351 of file ArrayTimeInterval.h.

Member Data Documentation

Interval asdm::ArrayTimeInterval::duration
private
bool asdm::ArrayTimeInterval::readStartTimeDurationInBin_
staticprivate

Definition at line 55 of file ArrayTimeInterval.h.

bool asdm::ArrayTimeInterval::readStartTimeDurationInXML_
staticprivate

Definition at line 56 of file ArrayTimeInterval.h.

ArrayTime asdm::ArrayTimeInterval::start
private

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