Isis 3 Programmer Reference
Isis::PvlGroup Class Reference

Contains multiple PvlContainers. More...

#include <PvlGroup.h>

Inheritance diagram for Isis::PvlGroup:
Inheritance graph
Collaboration diagram for Isis::PvlGroup:
Collaboration graph

Public Types

enum  InsertMode { Append, Replace }
 Contains both modes: Append or Replace. More...
 
typedef QList< PvlKeyword >::iterator PvlKeywordIterator
 The keyword iterator. More...
 
typedef QList< PvlKeyword >::const_iterator ConstPvlKeywordIterator
 The const keyword iterator. More...
 

Public Member Functions

 PvlGroup ()
 Creates a blank PvlGroup object. More...
 
 PvlGroup (const QString &name)
 Creates a PvlGroup object with a name. More...
 
 PvlGroup (const PvlGroup &other)
 Copy constructor. More...
 
void validateGroup (PvlGroup &pPvlGrp)
 Validate a Group comparing with the Template Group. More...
 
bool operator== (const PvlGroup &group) const
 Whenever the '==' operator is used on a PvlGroup object, it will call the stringEqual() method. More...
 
const PvlGroupoperator= (const PvlGroup &other)
 This is an assignment operator. More...
 
void setName (const QString &name)
 Set the name of the container. More...
 
QString name () const
 Returns the container name. More...
 
bool isNamed (const QString &match) const
 Returns whether the given string is equal to the container name or not. More...
 
QString type () const
 Returns the container type. More...
 
int keywords () const
 Returns the number of keywords contained in the PvlContainer. More...
 
void clear ()
 Clears PvlKeywords. More...
 
void addKeyword (const PvlKeyword &keyword, const InsertMode mode=Append)
 Add a keyword to the container. More...
 
PvlKeywordIterator addKeyword (const PvlKeyword &keyword, PvlKeywordIterator pos)
 Insert a keyword at the specified iterator position. More...
 
void operator+= (const PvlKeyword &keyword)
 When you use the += operator with a PvlKeyword, it will call the addKeyword() method. More...
 
PvlKeywordfindKeyword (const QString &name)
 Find a keyword with a specified name. More...
 
const PvlKeywordfindKeyword (const QString &name) const
 Find a keyword with a specified name. More...
 
PvlKeywordIterator findKeyword (const QString &name, PvlKeywordIterator beg, PvlKeywordIterator end)
 Find the index of a keyword, using iterators. More...
 
ConstPvlKeywordIterator findKeyword (const QString &name, ConstPvlKeywordIterator beg, ConstPvlKeywordIterator end) const
 Find the index of a keyword, using iterators. More...
 
PvlKeywordoperator[] (const QString &name)
 When you use the [] operator with a (string) name, it will call the findKeyword() method. More...
 
PvlKeywordoperator[] (const int index)
 Return the PvlKeyword object at the specified index. More...
 
PvlKeywordoperator[] (const char *name)
 When you use the [] operator with a (char) name, it will call the findKeyword() method. More...
 
const PvlKeywordoperator[] (const QString &name) const
 When you use the [] operator with a (string) name, it will call the findKeyword() method. More...
 
const PvlKeywordoperator[] (const int index) const
 Return the PvlKeyword object at the specified index. More...
 
PvlKeyword operator[] (const char *name) const
 When you use the [] operator with a (char) name, it will call the findKeyword() method. More...
 
bool hasKeyword (const QString &name) const
 Check to see if a keyword exists. More...
 
PvlKeywordIterator begin ()
 Return the beginning iterator. More...
 
ConstPvlKeywordIterator begin () const
 Return the const beginning iterator. More...
 
PvlKeywordIterator end ()
 Return the ending iterator. More...
 
ConstPvlKeywordIterator end () const
 Return the const ending iterator. More...
 
void deleteKeyword (const QString &name)
 Remove a specified keyword. More...
 
void deleteKeyword (const int index)
 Remove the specified keyword. More...
 
bool cleanDuplicateKeywords ()
 Removes keywords from the container that have BOTH the same name and value. More...
 
void operator-= (const QString &name)
 When you use the -= operator with a (string) name, it will call the deleteKeyword() method. More...
 
void operator-= (const PvlKeyword &key)
 When you use the -= operator with a PvlKeyword object, it will call the deleteKeyword() method. More...
 
QString fileName () const
 Returns the filename used to initialise the Pvl object. More...
 
void setFormatTemplate (PvlContainer &ref)
 
bool hasFormatTemplate ()
 
PvlContainerformatTemplate ()
 
PvlFormatformat ()
 
void setFormat (PvlFormat *format)
 
int indent ()
 
void setIndent (int indent)
 
int comments () const
 
QString comment (const int index) const
 
void addComment (const QString &comment)
 
PvlKeywordnameKeyword ()
 
const PvlKeywordnameKeyword () const
 

Protected Member Functions

void init ()
 Sets the filename to blank. More...
 
void setFileName (const QString &filename)
 Sets the filename to the specified string. More...
 
void validateAllKeywords (PvlContainer &pPvlCont)
 Validate All the Keywords in a Container comparing with the Template. More...
 
void validateRepeatOption (PvlKeyword &pPvlTmplKwrd, PvlContainer &pPvlCont)
 Validate the Repeat Option for a Keyword. More...
 

Protected Attributes

QString m_filename
 This contains the filename used to initialize the pvl object. More...
 
PvlKeyword m_name
 This is the name keyword. More...
 
QList< PvlKeywordm_keywords
 This is the vector of PvlKeywords the container is holding. More...
 
PvlContainerm_formatTemplate
 

Friends

std::istream & operator>> (std::istream &is, PvlGroup &result)
 Read in a group. More...
 
std::ostream & operator<< (std::ostream &os, PvlGroup &group)
 Outputs the PvlGroup data to a specified output stream. More...
 

Detailed Description

Contains multiple PvlContainers.

Contains multiple PvlContainers so that keyword-value pairs can be organized in specific groups. For example, a PvlGroup would be used to group all data from a particular mission together. A PvlGroup object will also organize (indent) objects on output.

Author
2002-10-11 Jeff Anderson
History:

2005-04-04 Leah Dahmer wrote class documentation.

2006-04-21 Jacob Danton Added format templates abilities.

2006-09-11 Stuart Sides Added formatting ability

2008-07-02 Steven Lambright Added const functionality and fixed +=

2008-07-02 Steven Lambright Updated to compensate for PvlKeyword no longer being a parent

2008-09-30 Christopher Austin Replaced all std::endl in the << operator with PvlFormat.FormatEOL()

2010-04-13 Eric Hyer - Added copy constructor Added assignment operator

2010-09-27 Sharmila Prasad - Added API to Validate a PVLGroup

2013-03-11 Steven Lambright and Mathew Eis - Brought method names and member variable names up to the current Isis 3 coding standards. Fixes #1533.

Todo:
2005-04-04 Needs coded example.

Definition at line 57 of file PvlGroup.h.

Member Typedef Documentation

◆ ConstPvlKeywordIterator

typedef QList<PvlKeyword>::const_iterator Isis::PvlContainer::ConstPvlKeywordIterator
inherited

The const keyword iterator.

Definition at line 174 of file PvlContainer.h.

◆ PvlKeywordIterator

The keyword iterator.

Definition at line 171 of file PvlContainer.h.

Member Enumeration Documentation

◆ InsertMode

Contains both modes: Append or Replace.

Definition at line 109 of file PvlContainer.h.

Constructor & Destructor Documentation

◆ PvlGroup() [1/3]

Isis::PvlGroup::PvlGroup ( )

Creates a blank PvlGroup object.

Definition at line 29 of file PvlGroup.cpp.

◆ PvlGroup() [2/3]

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

Creates a PvlGroup object with a name.

Parameters
nameThe group name.

Definition at line 35 of file PvlGroup.cpp.

◆ PvlGroup() [3/3]

Isis::PvlGroup::PvlGroup ( const PvlGroup other)

Copy constructor.

Definition at line 41 of file PvlGroup.cpp.

Member Function Documentation

◆ addKeyword() [1/2]

void Isis::PvlContainer::addKeyword ( const PvlKeyword keyword,
const InsertMode  mode = Append 
)
inherited

Add a keyword to the container.

Add a keyword to the PvlContainer object.

Parameters
keywordThe PvlKeyword object to append.
modeUsing the InsertMode value of Append.
keyThe PvlKeyword object to add.
modeThe enum InsertMode has two possible values, Append or Replace. Use Append if you just want to add it to the end, Replace if you want to replace it.

Definition at line 218 of file PvlContainer.cpp.

References Isis::PvlKeyword::name().

Referenced by Isis::ControlNetDiff::addUniqueMeasure(), Isis::ControlNetDiff::addUniquePoint(), Isis::NaifStatus::CheckErrors(), Isis::ControlNetDiff::compare(), Isis::ControlNetDiff::compareGroups(), Isis::ShapeModelFactory::create(), Isis::CameraFactory::Create(), Isis::ProjectionFactory::CreateForCube(), Isis::ControlNetDiff::diff(), Isis::ProcessImportFits::extractFitsLabels(), Isis::ExportPdsTable::fillMetaData(), Isis::Application::GetEnviromentInfo(), Isis::CameraPointInfo::GetPointInfo(), Isis::Application::GetUnameInfo(), Isis::PvlContainer::operator+=(), Isis::operator<<(), Isis::operator>>(), Isis::LimitPolygonSeeder::PluginParameters(), Isis::GridPolygonSeeder::PluginParameters(), Isis::StripPolygonSeeder::PluginParameters(), Isis::PolygonSeeder::PluginParameters(), Isis::Target::radiiGroup(), Isis::ProjectionFactory::RingsCreateForCube(), Isis::ProcessMapMosaic::RingsSetOutputCube(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::Projection::SetUpperLeftCorner(), Isis::SubArea::UpdateLabel(), Isis::CubeTileHandler::updateLabels(), Isis::CubeBsqHandler::updateLabels(), and Isis::ControlNetVersioner::write().

◆ addKeyword() [2/2]

PvlContainer::PvlKeywordIterator Isis::PvlContainer::addKeyword ( const PvlKeyword keyword,
PvlKeywordIterator  pos 
)
inherited

Insert a keyword at the specified iterator position.

This method provides the capability to insert a keyword at the specified iterator position. The process follows the description of the STL vector definition along with all the caveats (e.g., invalidation of iterators upon insert operations).

This method will not perform any checks for the existance of the keyword. This could lead to multiple instances of the same keyword in the same container. It is up to the caller to manage this issue.

Parameters
keyKeyword to insert
posIterator position where to insert the new keyword
Returns
PvlContainer::PvlKeywordIterator Returns the position of the inserted keyword per the STL vector documentation.

Definition at line 249 of file PvlContainer.cpp.

◆ begin() [1/2]

◆ begin() [2/2]

ConstPvlKeywordIterator Isis::PvlContainer::begin ( ) const
inlineinherited

Return the const beginning iterator.

Returns
The const beginning iterator.

Definition at line 200 of file PvlContainer.h.

References Isis::PvlContainer::m_keywords.

◆ cleanDuplicateKeywords()

bool Isis::PvlContainer::cleanDuplicateKeywords ( )
inherited

Removes keywords from the container that have BOTH the same name and value.

Returns
bool True if one or more keywords were deleted; False if no keywords were deleted.

Definition at line 152 of file PvlContainer.cpp.

◆ clear()

void Isis::PvlContainer::clear ( )
inlineinherited

Clears PvlKeywords.

Definition at line 105 of file PvlContainer.h.

References Isis::PvlContainer::m_keywords.

Referenced by Isis::Cube::applyVirtualBandsToLabel(), and Isis::PvlObject::clear().

◆ deleteKeyword() [1/2]

◆ deleteKeyword() [2/2]

void Isis::PvlContainer::deleteKeyword ( const int  index)
inherited

Remove the specified keyword.

Parameters
indexThe index of the keyword to remove.
Exceptions
iException::PvlKeyword doesn't exist.

Definition at line 131 of file PvlContainer.cpp.

References _FILEINFO_.

◆ end() [1/2]

◆ end() [2/2]

ConstPvlKeywordIterator Isis::PvlContainer::end ( ) const
inlineinherited

Return the const ending iterator.

Returns
The const ending iterator.

Definition at line 216 of file PvlContainer.h.

References Isis::PvlContainer::m_keywords.

◆ fileName()

◆ findKeyword() [1/4]

◆ findKeyword() [2/4]

const Isis::PvlKeyword & Isis::PvlContainer::findKeyword ( const QString &  name) const
inherited

Find a keyword with a specified name.

Parameters
nameThe name of the keyword to look for.
Returns
The PvlKeyword object.
Exceptions
IExceptionThe keyword doesn't exist.

Definition at line 96 of file PvlContainer.cpp.

References _FILEINFO_.

◆ findKeyword() [3/4]

PvlContainer::PvlKeywordIterator Isis::PvlContainer::findKeyword ( const QString &  name,
PvlContainer::PvlKeywordIterator  beg,
PvlContainer::PvlKeywordIterator  end 
)
inherited

Find the index of a keyword, using iterators.

Parameters
nameThe name of the keyword.
begThe beginning iterator.
endThe ending iterator.
Returns
The keyword index.

Definition at line 367 of file PvlContainer.cpp.

◆ findKeyword() [4/4]

PvlContainer::ConstPvlKeywordIterator Isis::PvlContainer::findKeyword ( const QString &  name,
PvlContainer::ConstPvlKeywordIterator  beg,
PvlContainer::ConstPvlKeywordIterator  end 
) const
inherited

Find the index of a keyword, using iterators.

Parameters
nameThe name of the keyword.
begThe beginning iterator.
endThe ending iterator.
Returns
The keyword index.

Definition at line 382 of file PvlContainer.cpp.

◆ hasKeyword()

bool Isis::PvlContainer::hasKeyword ( const QString &  name) const
inherited

Check to see if a keyword exists.

Parameters
nameThe name of the keyword to check for.
Returns
True if the keyword exists, false if it doesn't.

Definition at line 175 of file PvlContainer.cpp.

Referenced by Isis::SerialNumberList::add(), Isis::Latitude::add(), Isis::ProjectionConfigDialog::addMissingKeywords(), Isis::PvlTranslationTable::AddTable(), Isis::Albedo::Albedo(), Isis::AlbedoAtm::AlbedoAtm(), Isis::AtmosModel::AtmosModel(), Isis::BulletShapeModel::BulletShapeModel(), Isis::Camera::Camera(), Isis::CameraFactory::CameraVersion(), IsisAml::CommandLine(), Isis::ControlNetDiff::compareGroups(), Isis::ControlPointV0001::copy(), Isis::ControlPointV0002::copy(), Isis::ControlPointV0003::copy(), Isis::ShapeModelFactory::create(), Isis::AtmosModelFactory::Create(), Isis::CameraFactory::Create(), Isis::PhotoModelFactory::Create(), Isis::NormModelFactory::Create(), Isis::ProcessExportPds4::createUnitMap(), Isis::ControlNetFilter::CubeConvexHullFilter(), Isis::ControlNetFilter::CubeDistanceFilter(), Isis::ControlNetFilter::CubeNameExpressionFilter(), Isis::ControlNetFilter::CubeNumPointsFilter(), Isis::DemShape::DemShape(), Isis::PvlToXmlTranslationManager::doTranslation(), Isis::PvlToPvlTranslationManager::DoTranslation(), Isis::SpectralPlotWindow::drawBandMarkers(), Isis::EmbreeShapeModel::EmbreeShapeModel(), Isis::Equirectangular::Equirectangular(), Isis::ProcessImportFits::extractFitsLabels(), Isis::KernelDb::findAll(), Isis::Kernels::findKernels(), Isis::FeatureNomenclatureTool::findMissingNomenclature(), Isis::CubeViewport::getBandFilterName(), Isis::Kernels::getCameraVersion(), Isis::SpectralPlotTool::getSpectralStatistics(), Isis::UniversalGroundMap::GroundRange(), Isis::Camera::GroundRange(), Isis::PvlTranslationTable::hasInputDefault(), Isis::Spice::hasKernels(), Isis::HiLab::HiLab(), Isis::IdealCamera::IdealCamera(), Isis::Equalization::importStatistics(), Isis::Spice::init(), Isis::Shape::initCamStats(), Isis::Image::initCamStats(), Isis::DatabaseFactory::initPreferences(), Isis::PvlTranslationTable::InputDefault(), Isis::PvlToXmlTranslationManager::InputHasKeyword(), Isis::PvlToPvlTranslationManager::InputHasKeyword(), Isis::PvlToXmlTranslationManager::InputKeyword(), Isis::PvlToPvlTranslationManager::InputKeyword(), Isis::PvlTranslationTable::InputKeywordName(), Isis::PvlTranslationTable::IsAuto(), Isis::PvlTranslationTable::IsOptional(), Isis::LambertConformal::LambertConformal(), Isis::Latitude::Latitude(), Isis::LoMediumCamera::LoMediumCamera(), Isis::RingPlaneProjection::Mapping(), Isis::TProjection::Mapping(), Isis::ProcessMosaic::MatchBandBinGroup(), Isis::ProcessMosaic::MatchDEMShapeModel(), Isis::KernelDb::matches(), Isis::Mercator::Mercator(), Isis::Mollweide::Mollweide(), Isis::NaifDskShape::NaifDskShape(), Isis::ObliqueCylindrical::ObliqueCylindrical(), Isis::operator<<(), Isis::Orthographic::Orthographic(), Isis::OsirisRexOcamsCamera::OsirisRexOcamsCamera(), Isis::PvlTranslationTable::OutputName(), Isis::PvlTranslationTable::OutputPosition(), Isis::LimitPolygonSeeder::Parse(), Isis::GridPolygonSeeder::Parse(), Isis::StripPolygonSeeder::Parse(), Isis::PolygonSeeder::Parse(), Isis::AutoReg::Parse(), Isis::PhotoModel::PhotoModel(), Isis::Planar::Planar(), Isis::ControlNetFilter::PointDistanceFilter(), Isis::ControlNetFilter::PointEditLockFilter(), Isis::ControlNetFilter::PointGoodnessOfFitFilter(), Isis::ControlNetFilter::PointLatLonFilter(), Isis::ControlNetFilter::PointMeasurePropertiesFilter(), Isis::ControlNetFilter::PointMeasuresFilter(), Isis::ControlNetFilter::PointNumMeasuresEditLockFilter(), Isis::PointPerspective::PointPerspective(), Isis::ControlNetFilter::PointPixelShiftFilter(), Isis::ControlNetFilter::PointPropertiesFilter(), Isis::ControlNetFilter::PointResMagnitudeFilter(), Isis::PolarStereographic::PolarStereographic(), Isis::Projection::Projection(), Isis::Target::radiiGroup(), Isis::MocLabels::ReadLabels(), Isis::ControlNetVersioner::readProtobuf(), Isis::ControlNetVersioner::readProtobufV0005(), Isis::AutoReg::RegTemplate(), Isis::RingCylindrical::RingCylindrical(), Isis::RingPlaneProjection::RingPlaneProjection(), Isis::Camera::ringRange(), Isis::ProcessMapMosaic::RingsSetOutputCube(), Isis::Robinson::Robinson(), Isis::ProcessImportFits::setFitsFile(), Isis::FileName::Data::setOriginal(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::ProcessImportFits::setProcessFileStructure(), Isis::ControlNet::SetTarget(), Isis::SimpleCylindrical::SimpleCylindrical(), Isis::Sinusoidal::Sinusoidal(), Isis::ProcessExportPds::StandardAllMapping(), Isis::ProcessImportFits::standardInstrumentGroup(), Isis::Target::Target(), Isis::ThemisIrCamera::ThemisIrCamera(), Isis::IException::toString(), Isis::TProjection::TProjection(), Isis::PvlToXmlTranslationManager::Translate(), Isis::PvlToPvlTranslationManager::Translate(), Isis::PvlTranslationTable::Translate(), Isis::XmlToPvlTranslationManager::Translate(), Isis::ProcessExportPds4::translateBandBinSpectrumBinSet(), Isis::ProcessExportPds4::translateBandBinSpectrumUniform(), Isis::ProcessImportPds::TranslateIsis2Instrument(), Isis::TransverseMercator::TransverseMercator(), Isis::SubArea::UpdateLabel(), Isis::SpectralPlotTool::updateTool(), Isis::TiffImporter::upperLeftXY(), Isis::PvlContainer::validateAllKeywords(), Isis::PvlObject::validateObject(), Isis::Pvl::validatePvl(), Isis::ControlNetValidMeasure::ValidatePvlDN(), Isis::ControlNetValidMeasure::ValidatePvlEmissionAngle(), Isis::ControlNetValidMeasure::ValidatePvlFromEdge(), Isis::ControlNetValidMeasure::ValidatePvlIncidenceAngle(), Isis::ControlNetValidMeasure::ValidatePvlResidualTolerances(), Isis::ControlNetValidMeasure::ValidatePvlResolution(), and Isis::ControlNetValidMeasure::ValidatePvlShiftTolerances().

◆ init()

void Isis::PvlContainer::init ( )
protectedinherited

Sets the filename to blank.

Definition at line 67 of file PvlContainer.cpp.

◆ isNamed()

bool Isis::PvlContainer::isNamed ( const QString &  match) const
inlineinherited

◆ keywords()

◆ name()

QString Isis::PvlContainer::name ( ) const
inlineinherited

Returns the container name.

Returns
The container name.

Definition at line 77 of file PvlContainer.h.

References Isis::PvlContainer::m_name.

Referenced by Isis::PvlTranslationTable::AddTable(), Isis::ControlNetDiff::addTolerances(), Isis::LabelTranslationManager::Auto(), Isis::PvlToXmlTranslationManager::Auto(), Isis::PvlToPvlTranslationManager::Auto(), Isis::Cube::copy(), Isis::FileTool::copyCubeDetails(), Isis::CorrelationMatrix::CorrelationMatrix(), Isis::ProcessExportPds4::createUnitMap(), Isis::Cube::deleteBlob(), Isis::PvlObject::deleteGroup(), Isis::PvlObject::deleteObject(), Isis::PvlToXmlTranslationManager::doTranslation(), Isis::KernelDb::files(), Isis::PvlObject::findGroup(), Isis::PvlObject::findObject(), Isis::ImageFileListWidget::fromPvl(), Isis::PvlObject::hasGroup(), Isis::PvlObject::hasObject(), Isis::Shape::initCamStats(), Isis::Image::initCamStats(), Isis::PvlFlatMap::loadGroup(), Isis::UserInterface::loadHistory(), Isis::ImportPdsTable::loadLabel(), Isis::ProcessMosaic::MatchBandBinGroup(), Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked(), Isis::PvlContainer::operator-=(), Isis::operator<<(), operator==(), Isis::PvlObject::operator==(), Isis::operator>>(), Isis::PvlContainer::operator[](), Isis::Cube::putGroup(), Isis::BandSpinBox::setBandBin(), Isis::BandTool::setBandBin(), Isis::PvlContainer::setName(), Isis::Process::SetOutputCube(), Isis::OverlapStatistics::toPvl(), Isis::Gui::UpdateHistory(), validateGroup(), Isis::PvlObject::validateObject(), Isis::Pvl::validatePvl(), and Isis::Blob::Write().

◆ operator+=()

void Isis::PvlContainer::operator+= ( const PvlKeyword keyword)
inlineinherited

When you use the += operator with a PvlKeyword, it will call the addKeyword() method.

Parameters
keywordThe PvlKeyword to be added.

Definition at line 124 of file PvlContainer.h.

References Isis::PvlContainer::addKeyword().

◆ operator-=() [1/2]

void Isis::PvlContainer::operator-= ( const QString &  name)
inlineinherited

When you use the -= operator with a (string) name, it will call the deleteKeyword() method.

Parameters
nameThe name of the keyword to remove.

Definition at line 230 of file PvlContainer.h.

References Isis::PvlContainer::deleteKeyword(), and Isis::PvlContainer::name().

◆ operator-=() [2/2]

void Isis::PvlContainer::operator-= ( const PvlKeyword key)
inlineinherited

When you use the -= operator with a PvlKeyword object, it will call the deleteKeyword() method.

Parameters
keyThe PvlKeyword object to remove.

Definition at line 238 of file PvlContainer.h.

References Isis::PvlContainer::deleteKeyword(), and Isis::PvlKeyword::name().

◆ operator=()

const PvlGroup & Isis::PvlGroup::operator= ( const PvlGroup other)

This is an assignment operator.

Definition at line 203 of file PvlGroup.cpp.

References Isis::PvlContainer::operator=().

◆ operator==()

bool Isis::PvlGroup::operator== ( const PvlGroup group) const
inline

Whenever the '==' operator is used on a PvlGroup object, it will call the stringEqual() method.

This returns a boolean value.

Parameters
groupThe PvlGroup object to compare.
Returns
True if the other PvlGroup has the same name as this one, false if not.

Definition at line 75 of file PvlGroup.h.

References Isis::PvlContainer::name(), and Isis::PvlKeyword::stringEqual().

◆ operator[]() [1/6]

PvlKeyword& Isis::PvlContainer::operator[] ( const QString &  name)
inlineinherited

When you use the [] operator with a (string) name, it will call the findKeyword() method.

Parameters
nameThe name of the keyword to find.

Definition at line 134 of file PvlContainer.h.

References Isis::PvlContainer::findKeyword(), and Isis::PvlContainer::name().

Referenced by Isis::PvlContainer::operator[]().

◆ operator[]() [2/6]

PvlKeyword & Isis::PvlContainer::operator[] ( const int  index)
inherited

Return the PvlKeyword object at the specified index.

Parameters
indexThe index to use.
Returns
The PvlKeyword at the specified index.
Exceptions
iException::MessageThe index is out of bounds.

Definition at line 188 of file PvlContainer.cpp.

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

◆ operator[]() [3/6]

PvlKeyword& Isis::PvlContainer::operator[] ( const char *  name)
inlineinherited

When you use the [] operator with a (char) name, it will call the findKeyword() method.

Parameters
nameThe name of the keyword to find.

Definition at line 144 of file PvlContainer.h.

References Isis::PvlContainer::name(), and Isis::PvlContainer::operator[]().

◆ operator[]() [4/6]

const PvlKeyword& Isis::PvlContainer::operator[] ( const QString &  name) const
inlineinherited

When you use the [] operator with a (string) name, it will call the findKeyword() method.

Parameters
nameThe name of the keyword to find.

Definition at line 155 of file PvlContainer.h.

References Isis::PvlContainer::findKeyword(), and Isis::PvlContainer::name().

◆ operator[]() [5/6]

const Isis::PvlKeyword & Isis::PvlContainer::operator[] ( const int  index) const
inherited

Return the PvlKeyword object at the specified index.

Parameters
indexThe index to use.
Returns
The PvlKeyword at the specified index.
Exceptions
iException::MessageThe index is out of bounds.

Definition at line 203 of file PvlContainer.cpp.

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

◆ operator[]() [6/6]

PvlKeyword Isis::PvlContainer::operator[] ( const char *  name) const
inlineinherited

When you use the [] operator with a (char) name, it will call the findKeyword() method.

Parameters
nameThe name of the keyword to find.

Definition at line 165 of file PvlContainer.h.

References Isis::PvlContainer::name(), and Isis::PvlContainer::operator[]().

◆ setFileName()

void Isis::PvlContainer::setFileName ( const QString &  filename)
inlineprotectedinherited

Sets the filename to the specified string.

Parameters
filenameThe new filename to use.

Definition at line 315 of file PvlContainer.h.

References Isis::PvlContainer::m_filename.

◆ setName()

void Isis::PvlContainer::setName ( const QString &  name)
inlineinherited

◆ type()

QString Isis::PvlContainer::type ( ) const
inlineinherited

Returns the container type.

Returns
The container type.

Definition at line 93 of file PvlContainer.h.

References Isis::PvlContainer::m_name, and Isis::PvlKeyword::name().

Referenced by Isis::PvlObject::deleteGroup(), Isis::PvlObject::deleteObject(), and Isis::operator<<().

◆ validateAllKeywords()

void Isis::PvlContainer::validateAllKeywords ( PvlContainer pPvlCont)
protectedinherited

Validate All the Keywords in a Container comparing with the Template.

Validate all the PvlKeywords in this container.

Author
Sharmila Prasad (9/24/2010)
Parameters
pPvlCont- Container to be Validated
History:
2010-10-18 Sharmila Prasad - Added options "Type", "Range", "Value" for the keyword validation

Definition at line 410 of file PvlContainer.cpp.

References _FILEINFO_, Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::hasKeyword(), Isis::PvlKeyword::name(), and Isis::PvlKeyword::validateKeyword().

Referenced by validateGroup(), Isis::PvlObject::validateObject(), and Isis::Pvl::validatePvl().

◆ validateGroup()

void Isis::PvlGroup::validateGroup ( PvlGroup pPvlGrp)

Validate a Group comparing with the Template Group.

Validate a PvlGroup, comparing against the corresponding PvlGroup in the Template file.

Template PvlGroup has the format: Group = (groupName, optional/required)

Author
Sharmila Prasad (9/22/2010)
Parameters
pPvlGrp- PvlGroup to be validated

Definition at line 220 of file PvlGroup.cpp.

References _FILEINFO_, Isis::PvlContainer::keywords(), Isis::PvlContainer::name(), Isis::IException::User, and Isis::PvlContainer::validateAllKeywords().

Referenced by Isis::PvlObject::validateObject(), and Isis::Pvl::validatePvl().

◆ validateRepeatOption()

void Isis::PvlContainer::validateRepeatOption ( PvlKeyword pPvlTmplKwrd,
PvlContainer pPvlCont 
)
protectedinherited

Validate the Repeat Option for a Keyword.

Validate Repeat Option in the Template Group.

This option indicates that a particular keyname can be repeated several times

Author
Sharmila Prasad (9/24/2010)
Parameters
pPvlTmplKwrd- Template Keyword wit
pPvlCont- Container with all the Keywords
History:
2010-10-18 Sharmila Prasad - Added option "Type" for the keyword validation

Definition at line 486 of file PvlContainer.cpp.

References Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::keywords(), Isis::PvlKeyword::name(), and Isis::PvlKeyword::validateKeyword().

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
PvlGroup group 
)
friend

Outputs the PvlGroup data to a specified output stream.

Parameters
osThe output stream to output to.
groupThe PvlGroup object to output.

Definition at line 158 of file PvlGroup.cpp.

◆ operator>>

std::istream& operator>> ( std::istream &  is,
PvlGroup result 
)
friend

Read in a group.

Parameters
isThe input stream
resultThe PvlGroup to read into (OUTPUT)

Definition at line 51 of file PvlGroup.cpp.

Member Data Documentation

◆ m_filename

QString Isis::PvlContainer::m_filename
protectedinherited

This contains the filename used to initialize the pvl object.

If the object was not initialized using a filename the string is empty.

Definition at line 297 of file PvlContainer.h.

Referenced by Isis::PvlObject::deleteGroup(), Isis::PvlObject::deleteObject(), Isis::PvlContainer::fileName(), Isis::PvlObject::findGroup(), Isis::PvlObject::findKeyword(), Isis::PvlObject::findObject(), Isis::Pvl::init(), Isis::PvlContainer::operator=(), Isis::Pvl::read(), and Isis::PvlContainer::setFileName().

◆ m_keywords

QList<PvlKeyword> Isis::PvlContainer::m_keywords
protectedinherited

This is the vector of PvlKeywords the container is holding.

Definition at line 304 of file PvlContainer.h.

Referenced by Isis::PvlContainer::begin(), Isis::PvlContainer::clear(), Isis::PvlContainer::end(), Isis::PvlContainer::keywords(), and Isis::PvlContainer::operator=().

◆ m_name

PvlKeyword Isis::PvlContainer::m_name
protectedinherited

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