Isis 3 Developer Reference
|
Read and store original labels. More...
#include <OriginalLabel.h>
Public Member Functions | |
OriginalLabel () | |
Constructor for creating an original blob with a given name. More... | |
OriginalLabel (const QString &file) | |
Constructor for creating an original blob with a given name and file to read labels from. More... | |
OriginalLabel (Pvl pvl) | |
Constructor for creating an original blob with a given name and Pvl container. More... | |
~OriginalLabel () | |
Pvl | ReturnLabels () |
Returns the labels in a Pvl object. More... | |
QString | Type () const |
Accessor method that returns a string containing the Blob type. More... | |
QString | Name () const |
Accessor method that returns a string containing the Blob name. More... | |
int | Size () const |
Accessor method that returns the number of bytes in the blob data. More... | |
PvlObject & | Label () |
Accessor method that returns a PvlObject containing the Blob label. More... | |
void | Read (const QString &file) |
This method reads Pvl values from a specified file. More... | |
void | Read (const QString &file, const Pvl &pvlLabels) |
This method reads the given a file and labels. More... | |
virtual void | Read (const Pvl &pvl, std::istream &is) |
This method reads the Blob data from an open input file stream. More... | |
void | Write (const QString &file) |
Write the blob data out to a file. More... | |
void | Write (Pvl &pvl, std::fstream &stm, const QString &detachedFileName="") |
Write the blob data out to a Pvl object. More... | |
Protected Member Functions | |
void | WriteInit () |
Prepare labels for writing to the output cube. More... | |
void | Find (const Pvl &pvl) |
This method searches the given Pvl for the Blob by the Blob's type and name. More... | |
virtual void | ReadInit () |
This virtual method for classes that inherit Blob. More... | |
virtual void | ReadData (std::istream &is) |
Read binary data from an input stream into the Blob object. More... | |
virtual void | WriteData (std::fstream &os) |
Writes blob data to a stream. More... | |
Protected Attributes | |
PvlObject | p_blobPvl |
Pvl Blob object. More... | |
QString | p_blobName |
Name of the Blob object. More... | |
char * | p_buffer |
Buffer blob data is stored in. More... | |
BigInt | p_startByte |
Byte blob data starts at in buffer. More... | |
int | p_nbytes |
Size of blob data (in bytes) More... | |
QString | p_type |
Type of data stored in the buffer. More... | |
QString | p_detached |
Used for reading detached blobs. More... | |
QString | p_labelFile |
The file containing the labels. More... | |
Read and store original labels.
This class provides a means to read and store the labels from the original source. The labels can be retreived in a Pvl object.
Isis::OriginalLabel::OriginalLabel | ( | ) |
Constructor for creating an original blob with a given name.
References Isis::Pvl::setTerminator().
Isis::OriginalLabel::OriginalLabel | ( | const QString & | file | ) |
Constructor for creating an original blob with a given name and file to read labels from.
file | File to read labels from |
References Isis::Blob::Read().
Isis::OriginalLabel::OriginalLabel | ( | Pvl | pvl | ) |
Isis::OriginalLabel::~OriginalLabel | ( | ) |
|
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.
pvl | The Pvl to be searched |
References _FILEINFO_, Isis::PvlContainer::isNamed(), Isis::PvlObject::object(), Isis::PvlObject::objects(), and Isis::FileName::path().
|
inherited |
Accessor method that returns a PvlObject containing the Blob label.
Referenced by Isis::SpiceRotation::CacheLabel(), Isis::SpicePosition::LoadCache(), and Isis::SpiceRotation::LoadCache().
|
inherited |
Accessor method that returns a string containing the Blob name.
Referenced by Isis::Shape::isFootprintable(), Isis::Image::isFootprintable(), Isis::SpicePosition::LoadCache(), and Isis::Cube::write().
|
inherited |
This method reads Pvl values from a specified file.
file | The filename to read from. |
iException::Io | - Unable to open file |
iException::Pvl | - Invalid label format |
References _FILEINFO_, and Isis::Pvl::read().
Referenced by Isis::History::History(), OriginalLabel(), Isis::OriginalXmlLabel::OriginalXmlLabel(), Isis::History::Read(), Isis::Cube::read(), and Isis::Table::Table().
|
inherited |
This method reads the given a file and labels.
file | The filename to read from. |
pvlLabels | A Pvl containing the label information. |
iException::Io | - Unable to open file |
References _FILEINFO_, and Isis::Message::FileOpen().
|
virtualinherited |
This method reads the Blob data from an open input file stream.
pvl | A Pvl containing the label information. |
istm | The input file stream containing the blob data to be read. |
iException::Io | - Unable to open file |
Reimplemented in Isis::History.
References _FILEINFO_, and Isis::Message::FileOpen().
|
protectedvirtualinherited |
Read binary data from an input stream into the Blob object.
stream | The input stream to read from. |
IException::Io | - Error reading data from stream |
Reimplemented in Isis::ImagePolygon, Isis::Table, and Isis::OriginalXmlLabel.
References _FILEINFO_.
Referenced by Isis::OriginalXmlLabel::ReadData().
|
protectedvirtualinherited |
This virtual method for classes that inherit Blob.
It is not defined in the Blob class.
Reimplemented in Isis::Table.
Pvl Isis::OriginalLabel::ReturnLabels | ( | ) |
Returns the labels in a Pvl object.
References Isis::Blob::p_buffer, and Isis::Blob::p_nbytes.
|
inherited |
Accessor method that returns the number of bytes in the blob data.
|
inherited |
Accessor method that returns a string containing the Blob type.
Referenced by Isis::Shape::isFootprintable(), Isis::Image::isFootprintable(), and Isis::Cube::write().
|
inherited |
Write the blob data out to a file.
file | The filename to write to. |
IException::Io | - Unable to open file |
IException::Io | - Error preparing to write data to file |
IException::Io | - Error creating file |
References _FILEINFO_, Isis::PvlObject::addObject(), Isis::PvlObject::findObject(), Isis::toString(), and Isis::Pvl::write().
Referenced by Isis::Cube::write().
|
inherited |
Write the blob data out to a Pvl object.
pvl | The pvl object to update |
stm | stream to write data to |
detachedFileName | If the stream is detached from the labels give the name of the file |
References Isis::PvlObject::addObject(), Isis::PvlContainer::name(), Isis::PvlObject::object(), Isis::PvlObject::objects(), and Isis::toString().
|
protectedvirtualinherited |
Writes blob data to a stream.
stream | Output steam blob data will be written to |
IException::Io | - Error writing data to stream |
Reimplemented in Isis::ImagePolygon, Isis::Table, and Isis::OriginalXmlLabel.
References _FILEINFO_.
|
protectedvirtual |
Prepare labels for writing to the output cube.
Reimplemented from Isis::Blob.
References Isis::Blob::p_buffer, and Isis::Blob::p_nbytes.
|
protectedinherited |
Name of the Blob object.
Referenced by Isis::Blob::Blob(), Isis::Table::operator+=(), Isis::Blob::operator=(), Isis::Table::ReadData(), and Isis::ImagePolygon::ReadData().
|
protectedinherited |
|
protectedinherited |
Buffer blob data is stored in.
Referenced by Isis::Blob::Blob(), Isis::GisBlob::GisBlob(), Isis::Blob::operator=(), Isis::OriginalXmlLabel::ReadData(), Isis::History::ReturnHist(), ReturnLabels(), Isis::GisBlob::setPolygon(), Isis::History::WriteInit(), and WriteInit().
|
protectedinherited |
Used for reading detached blobs.
Referenced by Isis::Blob::Blob(), and Isis::Blob::operator=().
|
protectedinherited |
The file containing the labels.
Referenced by Isis::Blob::Blob(), and Isis::Blob::operator=().
|
protectedinherited |
Size of blob data (in bytes)
Referenced by Isis::Blob::Blob(), Isis::GisBlob::GisBlob(), Isis::Blob::operator=(), Isis::OriginalXmlLabel::ReadData(), Isis::ImagePolygon::ReadData(), Isis::History::ReturnHist(), ReturnLabels(), Isis::GisBlob::setPolygon(), Isis::ImagePolygon::WriteData(), Isis::OriginalXmlLabel::WriteInit(), Isis::History::WriteInit(), WriteInit(), Isis::Table::WriteInit(), and Isis::ImagePolygon::WriteInit().
|
protectedinherited |
Byte blob data starts at in buffer.
Referenced by Isis::Blob::Blob(), Isis::Blob::operator=(), Isis::Table::ReadData(), and Isis::ImagePolygon::ReadData().
|
protectedinherited |
Type of data stored in the buffer.
Referenced by Isis::Blob::Blob(), Isis::Blob::operator=(), and Isis::ImagePolygon::ReadData().