USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::History Class Reference

#include <History.h>

Inheritance diagram for Isis::History:
Inheritance graph
Collaboration diagram for Isis::History:
Collaboration graph

Public Member Functions

 History (const QString &name)
 Constructor for reading a history blob.
 
 History (const QString &name, const QString &file)
 Constructor for reading a history blob.
 
 ~History ()
 Destructor.
 
void AddEntry ()
 Adds History PvlObject.
 
void AddEntry (Isis::PvlObject &obj)
 Adds given PvlObject to History Pvl.
 
Pvl ReturnHist ()
 Reads p_buffer into a pvl.
 
void Read (const Isis::Pvl &pvl, std::istream &is)
 Reads input stream into Pvl.
 
QString Type () const
 Accessor method that returns a string containing the Blob type.
 
QString Name () const
 Accessor method that returns a string containing the Blob name.
 
int Size () const
 Accessor method that returns the number of bytes in the blob data.
 
PvlObjectLabel ()
 Accessor method that returns a PvlObject containing the Blob label.
 
void Read (const QString &file)
 This method reads Pvl values from a specified file.
 
void Read (const QString &file, const Pvl &pvlLabels)
 This method reads the given a file and labels.
 
void Write (const QString &file)
 Write the blob data out to a file.
 
void Write (Pvl &pvl, std::fstream &stm, const QString &detachedFileName="")
 Write the blob data out to a Pvl object.
 

Protected Member Functions

void WriteInit ()
 This virtual method for classes that inherit Blob.
 
void Find (const Pvl &pvl)
 This method searches the given Pvl for the Blob by the Blob's type and name.
 
virtual void ReadInit ()
 This virtual method for classes that inherit Blob.
 
virtual void ReadData (std::istream &is)
 Read binary data from an input stream into the Blob object.
 
virtual void WriteData (std::fstream &os)
 Writes blob data to a stream.
 

Protected Attributes

PvlObject p_blobPvl
 Pvl Blob object.
 
QString p_blobName
 Name of the Blob object.
 
char * p_buffer
 Buffer blob data is stored in.
 
BigInt p_startByte
 Byte blob data starts at in buffer.
 
int p_nbytes
 Size of blob data (in bytes)
 
QString p_type
 Type of data stored in the buffer.
 
QString p_detached
 Used for reading detached blobs.
 
QString p_labelFile
 The file containing the labels.
 

Private Attributes

Pvl p_history
 History Pvl.
 

Detailed Description

Author
????-??-?? Unknown
History:

2006-12-11 Kris Becker Fixed bug in WriteInit method using a temporary string to reference a char pointer to its contents. The string remain after the reference or its toast.

2011-08-19 Jeannie Backer - Modified unitTest to use $temporary variable instead of /tmp directory. Added some documentation to methods.

2012-10-04 Jeannie Backer - Replaced if! defined with ifndef. Added forward declaration for PvlObject and include for Pvl since the include for Pvl was removed from Blob.h. Added padding to control statements. References #1169

Todo:
This class needs documentation.

Definition at line 51 of file History.h.

Constructor & Destructor Documentation

Isis::History::History ( const QString &  name)

Constructor for reading a history blob.

Parameters
name

Definition at line 40 of file History.cpp.

References p_history, and Isis::Pvl::setTerminator().

Isis::History::History ( const QString &  name,
const QString &  file 
)

Constructor for reading a history blob.

Parameters
name
file

Definition at line 49 of file History.cpp.

References Isis::Blob::Read().

Isis::History::~History ( )

Destructor.

Definition at line 55 of file History.cpp.

Member Function Documentation

void Isis::History::AddEntry ( )

Adds History PvlObject.

Definition at line 61 of file History.cpp.

References Isis::Application::History().

Referenced by Isis::Process::WriteHistory().

void Isis::History::AddEntry ( Isis::PvlObject obj)

Adds given PvlObject to History Pvl.

Parameters
objPvlObject to be added

Definition at line 71 of file History.cpp.

References Isis::PvlObject::addObject(), and p_history.

void Isis::Blob::Find ( const Pvl pvl)
protectedinherited

This method searches the given Pvl for the Blob by the Blob's type and name.

If found, the start byte, number of bytes are read from the Pvl. Also, if a keyword label pointer is found, the filename for the detached blob is stored and the pointer is removed from the blob pvl.

Parameters
pvlThe Pvl to be searched

Definition at line 179 of file Blob.cpp.

References _FILEINFO_, Isis::PvlContainer::isNamed(), Isis::PvlObject::object(), Isis::PvlObject::objects(), and Isis::FileName::path().

PvlObject & Isis::Blob::Label ( )
inherited

Accessor method that returns a PvlObject containing the Blob label.

Returns
PvlObject The label of the blob.

Definition at line 167 of file Blob.cpp.

Referenced by Isis::SpiceRotation::CacheLabel(), Isis::SpicePosition::CacheLabel(), Isis::DawnVirCamera::getPointingTable(), Isis::SpicePosition::LoadCache(), and Isis::SpiceRotation::LoadCache().

QString Isis::Blob::Name ( ) const
inherited

Accessor method that returns a string containing the Blob name.

Returns
string The name of the blob.

Definition at line 149 of file Blob.cpp.

Referenced by Isis::Image::isFootprintable(), Isis::SpicePosition::LoadCache(), and Isis::Cube::write().

void Isis::History::Read ( const Isis::Pvl pvl,
std::istream &  is 
)
virtual

Reads input stream into Pvl.

Parameters
pvlPvl into which the input stream will be read.
isInput stream.

Reimplemented from Isis::Blob.

Definition at line 114 of file History.cpp.

References Isis::Blob::Read().

void Isis::Blob::Read ( const QString &  file)
inherited

This method reads Pvl values from a specified file.

Parameters
fileThe filename to read from.
Exceptions
iException::Io- Unable to open file
iException::Pvl- Invalid label format

Definition at line 243 of file Blob.cpp.

References _FILEINFO_, and Isis::Pvl::read().

Referenced by History(), Isis::OriginalLabel::OriginalLabel(), Read(), Isis::Cube::read(), and Isis::Table::Table().

void Isis::Blob::Read ( const QString &  file,
const Pvl pvlLabels 
)
inherited

This method reads the given a file and labels.

Parameters
fileThe filename to read from.
pvlLabelsA Pvl containing the label information.
Exceptions
iException::Io- Unable to open file

Definition at line 268 of file Blob.cpp.

References _FILEINFO_, and Isis::Message::FileOpen().

void Isis::Blob::ReadData ( std::istream &  stream)
protectedvirtualinherited

Read binary data from an input stream into the Blob object.

Parameters
streamThe input stream to read from.
Exceptions
IException::Io- Error reading data from stream

Reimplemented in Isis::ImagePolygon, and Isis::Table.

Definition at line 340 of file Blob.cpp.

References _FILEINFO_.

void Isis::Blob::ReadInit ( )
protectedvirtualinherited

This virtual method for classes that inherit Blob.

It is not defined in the Blob class.

Reimplemented in Isis::Table.

Definition at line 330 of file Blob.cpp.

Pvl Isis::History::ReturnHist ( )

Reads p_buffer into a pvl.

Returns
Pvl

Definition at line 100 of file History.cpp.

References Isis::Blob::p_buffer, and Isis::Blob::p_nbytes.

int Isis::Blob::Size ( ) const
inherited

Accessor method that returns the number of bytes in the blob data.

Returns
int Number of bytes in the blob data.

Definition at line 158 of file Blob.cpp.

Referenced by Isis::BundleAdjust::Observations().

QString Isis::Blob::Type ( ) const
inherited

Accessor method that returns a string containing the Blob type.

Returns
string Type of blob.

Definition at line 140 of file Blob.cpp.

Referenced by Isis::Image::isFootprintable(), and Isis::Cube::write().

void Isis::Blob::Write ( const QString &  file)
inherited

Write the blob data out to a file.

Parameters
fileThe filename to write to.
Exceptions
IException::Io- Unable to open file
IException::Io- Error preparing to write data to file
IException::Io- Error creating file

Definition at line 369 of file Blob.cpp.

References _FILEINFO_, Isis::PvlObject::addObject(), Isis::PvlObject::findObject(), Isis::toString(), and Isis::Pvl::write().

Referenced by Isis::Cube::write().

void Isis::Blob::Write ( Pvl pvl,
std::fstream &  stm,
const QString &  detachedFileName = "" 
)
inherited

Write the blob data out to a Pvl object.

Parameters
pvlThe pvl object to update
stmstream to write data to
detachedFileNameIf the stream is detached from the labels give the name of the file

Definition at line 418 of file Blob.cpp.

References Isis::PvlObject::addObject(), Isis::PvlContainer::name(), Isis::PvlObject::object(), Isis::PvlObject::objects(), and Isis::toString().

void Isis::Blob::WriteData ( std::fstream &  stream)
protectedvirtualinherited

Writes blob data to a stream.

Parameters
streamOutput steam blob data will be written to
Exceptions
IException::Io- Error writing data to stream

Reimplemented in Isis::ImagePolygon, and Isis::Table.

Definition at line 502 of file Blob.cpp.

References _FILEINFO_.

void Isis::History::WriteInit ( )
protectedvirtual

This virtual method for classes that inherit Blob.

It is not defined in the Blob class.

Reimplemented from Isis::Blob.

Definition at line 78 of file History.cpp.

References Isis::Blob::p_buffer, p_history, and Isis::Blob::p_nbytes.

Member Data Documentation

QString Isis::Blob::p_blobName
protectedinherited
PvlObject Isis::Blob::p_blobPvl
protectedinherited
char* Isis::Blob::p_buffer
protectedinherited
QString Isis::Blob::p_detached
protectedinherited

Used for reading detached blobs.

Definition at line 101 of file Blob.h.

Referenced by Isis::Blob::Blob(), and Isis::Blob::operator=().

Pvl Isis::History::p_history
private

History Pvl.

Definition at line 66 of file History.h.

Referenced by AddEntry(), History(), and WriteInit().

QString Isis::Blob::p_labelFile
protectedinherited

The file containing the labels.

Definition at line 102 of file Blob.h.

Referenced by Isis::Blob::Blob(), and Isis::Blob::operator=().

BigInt Isis::Blob::p_startByte
protectedinherited

Byte blob data starts at in buffer.

Definition at line 98 of file Blob.h.

Referenced by Isis::Blob::Blob(), Isis::Blob::operator=(), Isis::Table::ReadData(), and Isis::ImagePolygon::ReadData().

QString Isis::Blob::p_type
protectedinherited

Type of data stored in the buffer.

Definition at line 100 of file Blob.h.

Referenced by Isis::Blob::Blob(), Isis::Blob::operator=(), and Isis::ImagePolygon::ReadData().


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