USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::Pvl Class Reference
[Parsing]

Container for cube-like labels. More...

#include <Pvl.h>

Inherits Isis::PvlObject.

Inherited by Isis::Plugin, Isis::Preference, and Isis::SessionLog [private].

List of all members.

Public Types

enum  FindOptions { None, Traverse }
 

A collection of options to use when finding.

More...
typedef QList< Isis::PvlGroup >
::iterator 
PvlGroupIterator
 The counter for groups.
typedef QList< Isis::PvlGroup >
::const_iterator 
ConstPvlGroupIterator
typedef QList< PvlObject >
::iterator 
PvlObjectIterator
 The counter for objects.
typedef QList< PvlObject >
::const_iterator 
ConstPvlObjectIterator
enum  InsertMode { Append, Replace }
 

Contains both modes: Append or Replace.

More...
typedef QList< PvlKeyword >
::iterator 
PvlKeywordIterator
 The keyword iterator.
typedef QList< PvlKeyword >
::const_iterator 
ConstPvlKeywordIterator
 The const keyword iterator.

Public Member Functions

 Pvl ()
 Constructs an empty Pvl object.
 Pvl (const QString &file)
 Constructs a Pvl from a file.
 Pvl (const Pvl &other)
 Copy constructor.
 ~Pvl ()
void Read (const QString &file)
 Loads PVL information from a stream.
void Write (const QString &file)
 Opens and writes PVL information to a file and handles the end of line sequence.
void Append (const QString &file)
 Appends PVL information to a file and handles the end of line sequence.
void SetTerminator (const QString &term)
 Sets the terminator used to signify the end of the PVL informationDefaults to "END".
QString Terminator () const
 Returns the terminator used to signify the end of the PVL informationDefaults to "END".
void SetFormatTemplate (Isis::Pvl &temp)
void SetFormatTemplate (const QString &filename)
const Pvloperator= (const Pvl &other)
 This is an assignment operator.
void ValidatePvl (const Pvl &pPvl, Pvl &pPvlResults)
 Validate a Pvl with the Template Pvl.
int Groups () const
 Returns the number of groups contained.
PvlGroupGroup (const int index)
 Return the group at the specified index.
const PvlGroupGroup (const int index) const
 Return the group at the specified index.
PvlGroupIterator BeginGroup ()
 Returns the beginning group index.
ConstPvlGroupIterator BeginGroup () const
 Returns the beginning group index.
PvlGroupIterator EndGroup ()
 Returns the ending group index.
ConstPvlGroupIterator EndGroup () const
 Returns the const ending group index.
PvlGroupIterator FindGroup (const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
 Find a group with the specified name, within these indexes.
ConstPvlGroupIterator FindGroup (const QString &name, ConstPvlGroupIterator beg, ConstPvlGroupIterator end) const
 Find a group with the specified name, within these indexes.
Isis::PvlGroupFindGroup (const QString &name, FindOptions opts=None)
 Finds a group within the current PvlObject.
const Isis::PvlGroupFindGroup (const QString &name, FindOptions opts=None) const
 Finds a group within the current PvlObject.
PvlKeywordFindKeyword (const QString &kname, FindOptions opts)
 Finds a keyword in the current PvlObject, or deeper inside other PvlObjects and PvlGroups within this one.
PvlKeywordFindKeyword (const QString &name)
 Find a keyword with a specified name.
const PvlKeywordFindKeyword (const QString &name) const
 Find a keyword with a specified name.
PvlKeywordIterator FindKeyword (const QString &name, PvlKeywordIterator beg, PvlKeywordIterator end)
 Find the index of a keyword, using iterators.
ConstPvlKeywordIterator FindKeyword (const QString &name, ConstPvlKeywordIterator beg, ConstPvlKeywordIterator end) const
 Find the index of a keyword, using iterators.
bool HasKeyword (const QString &kname, FindOptions opts) const
 See if a keyword is in the current PvlObject, or deeper inside other PvlObjects and PvlGroups within this one.
bool HasKeyword (const QString &name) const
 Check to see if a keyword exists.
void AddGroup (const Isis::PvlGroup &group)
 Add a group to the object.
void operator+= (const Isis::PvlGroup &group)
void operator+= (const Isis::PvlObject &obj)
void operator+= (const PvlKeyword &keyword)
 When you use the += operator with a PvlKeyword, it will call the AddKeyword() method.
void DeleteGroup (const QString &name)
 Remove a group from the current PvlObject.
void DeleteGroup (const int index)
 Remove a group from the current PvlObject.
bool HasGroup (const QString &name) const
 Returns a boolean value based on whether the object has the specified group or not.
int Objects () const
 Returns the number of objects.
PvlObjectObject (const int index)
 Return the object at the specified index.
const PvlObjectObject (const int index) const
 Return the object at the specified index.
PvlObjectIterator BeginObject ()
 Returns the index of the beginning object.
ConstPvlObjectIterator BeginObject () const
 Returns the const index of the beginning object.
PvlObjectIterator EndObject ()
 Returns the index of the ending object.
ConstPvlObjectIterator EndObject () const
 Returns the const index of the ending object.
PvlObjectIterator FindObject (const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
 Find the index of object with a specified name, between two indexes.
ConstPvlObjectIterator FindObject (const QString &name, ConstPvlObjectIterator beg, ConstPvlObjectIterator end) const
 Find the index of object with a specified name, between two indexes.
PvlObjectFindObject (const QString &name, FindOptions opts=None)
 Find an object within the current PvlObject.
const PvlObjectFindObject (const QString &name, FindOptions opts=None) const
 Find an object within the current PvlObject.
void AddObject (const PvlObject &object)
 Add a PvlObject.
void DeleteObject (const QString &name)
 Remove an object from the current PvlObject.
void DeleteObject (const int index)
 Remove an object from the current PvlObject.
bool HasObject (const QString &name) const
 Returns a boolean value based on whether the object exists in the current PvlObject or not.
bool operator== (const PvlObject &object) const
 Compares two PvlObjects.
void Clear ()
 Remove everything from the current PvlObject.
void ValidateObject (PvlObject &pPvlObj)
 Validate Object.
void SetName (const QString &name)
 Set the name of the container.
QString Name () const
 Returns the container name.
bool IsNamed (const QString &match) const
 Returns whether the given string is equal to the container name or not.
QString Type () const
 Returns the container type.
int Keywords () const
 Returns the number of keywords contained in the PvlContainer.
void AddKeyword (const PvlKeyword &keyword, const InsertMode mode=Append)
 Add a keyword to the container.
PvlKeywordIterator AddKeyword (const PvlKeyword &keyword, PvlKeywordIterator pos)
 Insert a keyword at the specified iterator position.
PvlKeywordoperator[] (const QString &name)
 When you use the [] operator with a (string) name, it will call the FindKeyword() method.
PvlKeywordoperator[] (const int index)
 Return the PvlKeyword object at the specified index.
PvlKeywordoperator[] (const char *name)
 When you use the [] operator with a (char) name, it will call the FindKeyword() method.
const PvlKeywordoperator[] (const QString &name) const
 When you use the [] operator with a (string) name, it will call the FindKeyword() method.
const PvlKeywordoperator[] (const int index) const
 Return the PvlKeyword object at the specified index.
PvlKeyword operator[] (const char *name) const
 When you use the [] operator with a (char) name, it will call the FindKeyword() method.
PvlKeywordIterator Begin ()
 Return the beginning iterator.
ConstPvlKeywordIterator Begin () const
 Return the const beginning iterator.
PvlKeywordIterator End ()
 Return the ending iterator.
ConstPvlKeywordIterator End () const
 Return the const ending iterator.
void DeleteKeyword (const QString &name)
 Remove a specified keyword.
void DeleteKeyword (const int index)
 Remove the specified keyword.
bool CleanDuplicateKeywords ()
 Removes keywords from the container that have BOTH the same name and value.
void operator-= (const QString &name)
 When you use the -= operator with a (string) name, it will call the DeleteKeyword() method.
void operator-= (const PvlKeyword &key)
 When you use the -= operator with a PvlKeyword object, it will call the DeleteKeyword() method.
QString FileName () const
 Returns the filename used to initialise the Pvl object.
bool HasFormatTemplate ()
PvlContainerFormatTemplate ()
PvlFormatGetFormat ()
void SetFormat (PvlFormat *format)
int Indent ()
void SetIndent (int indent)
int Comments () const
QString Comment (const int index) const
void AddComment (const QString &comment)
PvlKeywordGetNameKeyword ()
const PvlKeywordGetNameKeyword () const

Protected Member Functions

void SetFileName (const QString &filename)
 Sets the filename to the specified string.
void ValidateAllKeywords (PvlContainer &pPvlCont)
 Validate All the Keywords in a Container comparing with the Template.
void ValidateRepeatOption (PvlKeyword &pPvlTmplKwrd, PvlContainer &pPvlCont)
 Validate the Repeat Option for a Keyword.

Protected Attributes

QString p_filename
 This contains the filename used to initialize the pvl object.
PvlKeyword p_name
 This is the name keyword.
QList< PvlKeywordp_keywords
 This is the vector of PvlKeywords the container is holding.
PvlContainerp_formatTemplate

Friends

std::istream & operator>> (std::istream &is, Pvl &pvl)
std::ostream & operator<< (std::ostream &os, Isis::Pvl &pvl)

Detailed Description

Container for cube-like labels.

This class is used for creating, reading, and writing grouped labels generally from a file. An example of a label is:

     Group = Cube
       Samples = 512
       Lines = 512
       Bands = 1
     EndGroup

There are three different groupings, "root", "object", and "group". The information is stored in "keywords". The root grouping can contain objects, groups, and keywords. Object groupings can contain other objects, groups and keywords. Group groupings can only contain keywords. Contents within the group are called keywords which can have integer, double, string values or no value. A keyword with no value is treated as a boolean.

If you would like to see Pvl being used in implementation, see class Cube or Preference

Author:
2002-10-11 Jeff Anderson

Member Typedef Documentation

typedef QList<Isis::PvlGroup>::const_iterator Isis::PvlObject::ConstPvlGroupIterator [inherited]
typedef QList<PvlKeyword>::const_iterator Isis::PvlContainer::ConstPvlKeywordIterator [inherited]

The const keyword iterator.

typedef QList<PvlObject>::const_iterator Isis::PvlObject::ConstPvlObjectIterator [inherited]

The counter for groups.

The keyword iterator.

The counter for objects.


Member Enumeration Documentation

enum Isis::PvlObject::FindOptions [inherited]

A collection of options to use when finding.

Enumerator:
None 

Search only the current level.

Traverse 

Search child objects.

Contains both modes: Append or Replace.

Enumerator:
Append 
Replace 

Constructor & Destructor Documentation

Isis::Pvl::Pvl (  ) 

Constructs an empty Pvl object.

Referenced by SetFormatTemplate(), and ValidatePvl().

Isis::Pvl::Pvl ( const QString &  file  ) 

Constructs a Pvl from a file.

Parameters:
file The file containing the pvl formatted information

References Read().

Isis::Pvl::Pvl ( const Pvl other  ) 

Copy constructor.

Isis::Pvl::~Pvl (  )  [inline]

Member Function Documentation

void Isis::PvlContainer::AddComment ( const QString &  comment  )  [inline, inherited]
void Isis::PvlObject::AddGroup ( const Isis::PvlGroup group  )  [inline, inherited]
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:
key Keyword to insert
pos Iterator position where to insert the new keyword
Returns:
PvlContainer::PvlKeywordIterator Returns the position of the inserted keyword per the STL vector documentation.

References Isis::PvlContainer::p_keywords.

void Isis::PvlContainer::AddKeyword ( const PvlKeyword keyword,
const InsertMode  mode = Append 
) [inherited]
void Isis::PvlObject::AddObject ( const PvlObject object  )  [inline, inherited]
void Isis::Pvl::Append ( const QString &  file  ) 

Appends PVL information to a file and handles the end of line sequence.

Parameters:
file Name of the file to append to.
Exceptions:
Isis::iException::Io 

References _FILEINFO_, Isis::FileName::expanded(), Isis::Message::FileOpen(), Isis::PvlFormat::FormatEOL(), Isis::PvlContainer::GetFormat(), Isis::IException::Io, Isis::PvlContainer::SetFormat(), and Terminator().

Referenced by Isis::SessionLog::Write().

ConstPvlKeywordIterator Isis::PvlContainer::Begin (  )  const [inline, inherited]

Return the const beginning iterator.

Returns:
The const beginning iterator.

References Isis::PvlContainer::p_keywords.

PvlKeywordIterator Isis::PvlContainer::Begin (  )  [inline, inherited]
ConstPvlGroupIterator Isis::PvlObject::BeginGroup (  )  const [inline, inherited]

Returns the beginning group index.

Returns:
The iterator of the beginning group..
PvlGroupIterator Isis::PvlObject::BeginGroup (  )  [inline, inherited]

Returns the beginning group index.

Returns:
The iterator of the beginning group..

Referenced by Isis::PvlObject::DeleteGroup(), Isis::PvlObject::FindGroup(), Isis::PvlObject::HasGroup(), and Isis::DbAccess::load().

ConstPvlObjectIterator Isis::PvlObject::BeginObject (  )  const [inline, inherited]

Returns the const index of the beginning object.

Returns:
The beginning object's index.
PvlObjectIterator Isis::PvlObject::BeginObject (  )  [inline, inherited]

Returns the index of the beginning object.

Returns:
The beginning object's index.

Referenced by Isis::PvlObject::DeleteObject(), Isis::PvlObject::FindObject(), and Isis::PvlObject::HasObject().

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.

References Isis::PvlContainer::Begin(), Isis::PvlContainer::End(), and Isis::PvlContainer::p_keywords.

void Isis::PvlObject::Clear (  )  [inline, inherited]

Remove everything from the current PvlObject.

Reimplemented from Isis::PvlContainer.

Referenced by IsisAml::CommandLine(), and Isis::Preference::Preferences().

QString Isis::PvlContainer::Comment ( const int  index  )  const [inline, inherited]
int Isis::PvlContainer::Comments (  )  const [inline, inherited]
void Isis::PvlObject::DeleteGroup ( const int  index  )  [inherited]

Remove a group from the current PvlObject.

Parameters:
index The index of the PvlGroup to remove.
Exceptions:
IException 

References _FILEINFO_, Isis::PvlObject::BeginGroup(), Isis::PvlContainer::Name(), Isis::PvlContainer::p_filename, Isis::PvlContainer::Type(), and Isis::IException::Unknown.

void Isis::PvlObject::DeleteGroup ( const QString &  name  )  [inherited]
void Isis::PvlContainer::DeleteKeyword ( const int  index  )  [inherited]

Remove the specified keyword.

Parameters:
index The index of the keyword to remove.
Exceptions:
iException::Pvl Keyword doesn't exist.

References _FILEINFO_, Isis::PvlContainer::Begin(), Isis::PvlContainer::Name(), Isis::PvlContainer::p_filename, Isis::PvlContainer::p_keywords, Isis::PvlContainer::Type(), and Isis::IException::Unknown.

void Isis::PvlContainer::DeleteKeyword ( const QString &  name  )  [inherited]
void Isis::PvlObject::DeleteObject ( const int  index  )  [inherited]

Remove an object from the current PvlObject.

Parameters:
index The index of the PvlObject to remove.
Exceptions:
IException 

References _FILEINFO_, Isis::PvlObject::BeginObject(), Isis::PvlContainer::Name(), Isis::PvlContainer::p_filename, Isis::PvlContainer::Type(), and Isis::IException::Unknown.

void Isis::PvlObject::DeleteObject ( const QString &  name  )  [inherited]
ConstPvlKeywordIterator Isis::PvlContainer::End (  )  const [inline, inherited]

Return the const ending iterator.

Returns:
The const ending iterator.

References Isis::PvlContainer::p_keywords.

PvlKeywordIterator Isis::PvlContainer::End (  )  [inline, inherited]
ConstPvlGroupIterator Isis::PvlObject::EndGroup (  )  const [inline, inherited]

Returns the const ending group index.

Returns:
The iterator of the ending group.
PvlGroupIterator Isis::PvlObject::EndGroup (  )  [inline, inherited]

Returns the ending group index.

Returns:
The iterator of the ending group.

Referenced by Isis::PvlObject::DeleteGroup(), Isis::PvlObject::FindGroup(), Isis::PvlObject::HasGroup(), and Isis::DbAccess::load().

ConstPvlObjectIterator Isis::PvlObject::EndObject (  )  const [inline, inherited]

Returns the const index of the ending object.

Returns:
The ending object's index.
PvlObjectIterator Isis::PvlObject::EndObject (  )  [inline, inherited]

Returns the index of the ending object.

Returns:
The ending object's index.

Referenced by Isis::PvlObject::DeleteObject(), Isis::PvlObject::FindObject(), and Isis::PvlObject::HasObject().

QString Isis::PvlContainer::FileName (  )  const [inline, inherited]
const Isis::PvlGroup & Isis::PvlObject::FindGroup ( const QString &  name,
PvlObject::FindOptions  opts = None 
) const [inherited]

Finds a group within the current PvlObject.

Parameters:
name The name of the group to look for.
opts The FindOptions option (None or Traverse).
Returns:
The PvlGroup object sought for.
Exceptions:
IException 

References _FILEINFO_, Isis::PvlObject::BeginGroup(), Isis::PvlObject::EndGroup(), Isis::PvlObject::Object(), Isis::PvlContainer::p_filename, Isis::PvlObject::Traverse, and Isis::IException::Unknown.

Isis::PvlGroup & Isis::PvlObject::FindGroup ( const QString &  name,
PvlObject::FindOptions  opts = None 
) [inherited]

Finds a group within the current PvlObject.

Parameters:
name The name of the group to look for.
opts The FindOptions option (None or Traverse).
Returns:
The PvlGroup object sought for.
Exceptions:
IException 

References _FILEINFO_, Isis::PvlObject::BeginGroup(), Isis::PvlObject::EndGroup(), Isis::PvlObject::Object(), Isis::PvlContainer::p_filename, Isis::PvlObject::Traverse, and Isis::IException::Unknown.

ConstPvlGroupIterator Isis::PvlObject::FindGroup ( const QString &  name,
ConstPvlGroupIterator  beg,
ConstPvlGroupIterator  end 
) const [inline, inherited]

Find a group with the specified name, within these indexes.

Parameters:
name The name of the group to look for.
beg The lower index
end The higher index
PvlGroupIterator Isis::PvlObject::FindGroup ( const QString &  name,
PvlGroupIterator  beg,
PvlGroupIterator  end 
) [inline, inherited]

Find a group with the specified name, within these indexes.

Parameters:
name The name of the group to look for.
beg The lower index
end The higher index

Referenced by Isis::SerialNumberList::Add(), Isis::ControlNetDiff::addTolerances(), Isis::AlphaCube::AlphaCube(), Isis::ApolloMetricCamera::ApolloMetricCamera(), Isis::ApolloPanoramicCamera::ApolloPanoramicCamera(), Isis::CameraFactory::CameraVersion(), Isis::InterestOperatorFactory::Create(), Isis::ShapeModelFactory::create(), Isis::ProjectionFactory::Create(), Isis::PolygonSeederFactory::Create(), Isis::Gui::Create(), Isis::Cube::create(), Isis::CameraFactory::Create(), Isis::AutoRegFactory::Create(), Isis::ProjectionFactory::CreateForCube(), Isis::ProjectionFactory::CreateFromCube(), Isis::CrismCamera::CrismCamera(), Isis::CTXCamera::CTXCamera(), Isis::CubeIoHandler::CubeIoHandler(), Isis::DawnFcCamera::DawnFcCamera(), Isis::DawnVirCamera::DawnVirCamera(), Isis::PvlObject::DeleteGroup(), Isis::DemShape::DemShape(), Isis::Equirectangular::Equirectangular(), Isis::KernelDb::findAll(), Isis::CubeViewport::getBandFilterName(), Isis::Plugin::GetPlugin(), Isis::GroundGrid::GroundGrid(), Isis::Camera::GroundRange(), Isis::Cube::group(), Isis::PvlObject::HasGroup(), Isis::Spice::hasKernels(), Isis::HiresCamera::HiresCamera(), Isis::HiriseCamera::HiriseCamera(), Isis::HrscCamera::HrscCamera(), Isis::IdealCamera::IdealCamera(), Isis::VimsSkyMap::Init(), Isis::VimsGroundMap::Init(), Isis::PvlTranslationTable::InputDefault(), Isis::PvlTranslationTable::InputGroup(), Isis::PvlTranslationTable::InputKeywordName(), Isis::PvlTranslationTable::IsAuto(), Isis::PvlTranslationTable::IsOptional(), Isis::IssNACamera::IssNACamera(), Isis::IssWACamera::IssWACamera(), Isis::LambertConformal::LambertConformal(), Isis::DbAccess::load(), Isis::Stretch::Load(), Isis::Preference::Load(), Isis::KernelDb::loadSystemDb(), Isis::LoHighCamera::LoHighCamera(), Isis::LoMediumCamera::LoMediumCamera(), Isis::LroNarrowAngleCamera::LroNarrowAngleCamera(), Isis::LroWideAngleCamera::LroWideAngleCamera(), Isis::LunarAzimuthalEqualArea::LunarAzimuthalEqualArea(), Isis::LwirCamera::LwirCamera(), Isis::MarciCamera::MarciCamera(), Isis::Mariner10Camera::Mariner10Camera(), Isis::KernelDb::matches(), Isis::MdisCamera::MdisCamera(), Isis::Mercator::Mercator(), Isis::MiniRF::MiniRF(), Isis::Process::MissionData(), Isis::MocNarrowAngleCamera::MocNarrowAngleCamera(), Isis::MocWideAngleCamera::MocWideAngleCamera(), Isis::NirCamera::NirCamera(), Isis::ObliqueCylindrical::ObliqueCylindrical(), Isis::Orthographic::Orthographic(), Isis::PvlTranslationTable::OutputName(), Isis::PvlTranslationTable::OutputPosition(), Isis::InterestOperator::Parse(), Isis::ControlNetValidMeasure::Parse(), Isis::StripPolygonSeeder::Parse(), Isis::PolygonSeeder::Parse(), Isis::LimitPolygonSeeder::Parse(), Isis::GridPolygonSeeder::Parse(), Isis::AutoReg::Parse(), Isis::PointPerspective::PointPerspective(), Isis::PolarStereographic::PolarStereographic(), Isis::MosaicSceneWidget::preloadFromPvl(), Isis::ProcessImportPds::ProcessImportPds(), Isis::Progress::Progress(), Isis::Projection::Projection(), Isis::Cube::putGroup(), Isis::PvlKeyword::Reform(), Isis::AutoReg::RegTemplate(), Isis::ReseauDistortionMap::ReseauDistortionMap(), Isis::Robinson::Robinson(), Isis::UserInterface::SaveHistory(), Isis::ProcessMosaic::SetInputCube(), Isis::ProcessMosaic::SetMosaicOrigin(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::ProcessGroundPolygons::SetOutputCube(), Isis::SimpleCylindrical::SimpleCylindrical(), Isis::Sinusoidal::Sinusoidal(), Isis::Spice::Spice(), Isis::SsiCamera::SsiCamera(), Isis::Target::Target(), Isis::Projection::TargetRadii(), Isis::Pipeline::TemporaryFolder(), Isis::ThemisIrCamera::ThemisIrCamera(), Isis::ThemisVisCamera::ThemisVisCamera(), Isis::IException::toString(), Isis::PvlTranslationTable::Translate(), Isis::ProcessImportPds::TranslatePdsProjection(), Isis::TransverseMercator::TransverseMercator(), Isis::AlphaCube::UpdateGroup(), Isis::UvvisCamera::UvvisCamera(), Isis::PvlObject::ValidateObject(), ValidatePvl(), Isis::VikingCamera::VikingCamera(), Isis::VimsCamera::VimsCamera(), and Isis::VoyagerCamera::VoyagerCamera().

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:
name The name of the keyword.
beg The beginning iterator.
end The ending iterator.
Returns:
The keyword index.
PvlContainer::PvlKeywordIterator Isis::PvlContainer::FindKeyword ( const QString &  name,
PvlContainer::PvlKeywordIterator  beg,
PvlContainer::PvlKeywordIterator  end 
) [inherited]

Find the index of a keyword, using iterators.

Parameters:
name The name of the keyword.
beg The beginning iterator.
end The ending iterator.
Returns:
The keyword index.
const Isis::PvlKeyword & Isis::PvlContainer::FindKeyword ( const QString &  name  )  const [inherited]

Find a keyword with a specified name.

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

References _FILEINFO_, Isis::PvlContainer::Begin(), Isis::PvlContainer::End(), Isis::PvlContainer::FindKeyword(), Isis::PvlContainer::Name(), Isis::PvlContainer::p_filename, Isis::PvlContainer::Type(), and Isis::IException::Unknown.

Isis::PvlKeyword & Isis::PvlContainer::FindKeyword ( const QString &  name  )  [inherited]
PvlKeyword & Isis::PvlObject::FindKeyword ( const QString &  kname,
FindOptions  opts 
) [inherited]

Finds a keyword in the current PvlObject, or deeper inside other PvlObjects and PvlGroups within this one.

Note: This member has the same name as the PvlContainer and hides those implementations, but with the using statement the parents FindKeyword members ar made visible. Note: If more than one occurance of a Keyword appears below this Object no guarantee is made as to which one is returned.

Parameters:
kname The name of the keyword to look for.
opts The FindOptions option (None or Traverse).
Returns:
The keyword sought
Exceptions:
IException 

References _FILEINFO_, Isis::PvlContainer::Begin(), Isis::PvlContainer::End(), g, Isis::PvlObject::Group(), Isis::PvlObject::None, Isis::PvlObject::Object(), Isis::PvlContainer::p_filename, and Isis::IException::Unknown.

Referenced by Isis::PvlFormat::Accuracy(), Isis::ControlNetDiff::compare(), Isis::CubeIoHandler::CubeIoHandler(), Isis::Cube::deleteBlob(), Isis::SpicePosition::LoadCache(), Isis::LroWideAngleCamera::LroWideAngleCamera(), Isis::Spice::readStoredValue(), Isis::ProcessMosaic::SetMosaicOrigin(), Isis::SsiCamera::SsiCamera(), Isis::Spice::storeValue(), Isis::PvlFormat::Type(), Isis::PvlObject::ValidateObject(), and ValidatePvl().

const PvlObject & Isis::PvlObject::FindObject ( const QString &  name,
FindOptions  opts = None 
) const [inherited]

Find an object within the current PvlObject.

Parameters:
name The object name to look for.
opts The FindOptions option (None or Traverse).
Returns:
The PvlObject sought for.
Exceptions:
IException 

References _FILEINFO_, Isis::PvlObject::BeginObject(), Isis::PvlObject::EndObject(), Isis::PvlObject::Object(), Isis::PvlContainer::p_filename, Isis::PvlObject::Traverse, and Isis::IException::Unknown.

PvlObject & Isis::PvlObject::FindObject ( const QString &  name,
PvlObject::FindOptions  opts = None 
) [inherited]

Find an object within the current PvlObject.

Parameters:
name The object name to look for.
opts The FindOptions option (None or Traverse).
Returns:
The PvlObject sought for.
Exceptions:
IException 

References _FILEINFO_, Isis::PvlObject::BeginObject(), Isis::PvlObject::EndObject(), Isis::PvlObject::Object(), Isis::PvlContainer::p_filename, Isis::PvlObject::Traverse, and Isis::IException::Unknown.

ConstPvlObjectIterator Isis::PvlObject::FindObject ( const QString &  name,
ConstPvlObjectIterator  beg,
ConstPvlObjectIterator  end 
) const [inline, inherited]

Find the index of object with a specified name, between two indexes.

Parameters:
name The name of the object to find.
beg The lower index.
end The higher index.
Returns:
The index of the object.
PvlObjectIterator Isis::PvlObject::FindObject ( const QString &  name,
PvlObjectIterator  beg,
PvlObjectIterator  end 
) [inline, inherited]

Find the index of object with a specified name, between two indexes.

Parameters:
name The name of the object to find.
beg The lower index.
end The higher index.
Returns:
The index of the object.

Referenced by Isis::SerialNumberList::Add(), Isis::Albedo::Albedo(), Isis::AlbedoAtm::AlbedoAtm(), Isis::AlphaCube::AlphaCube(), Isis::AtmosModel::AtmosModel(), Isis::AutoReg::AutoReg(), Isis::Camera::Camera(), Isis::Cube::copy(), Isis::PhotoModelFactory::Create(), Isis::NormModelFactory::Create(), Isis::AtmosModelFactory::Create(), Isis::CubeIoHandler::CubeIoHandler(), Isis::CubeTileHandler::CubeTileHandler(), Isis::Cube::deleteGroup(), Isis::PvlObject::DeleteObject(), Isis::KernelDb::findAll(), Isis::MosaicSceneWidget::fromPvl(), Isis::CubeViewport::getBandFilterName(), Isis::Cube::group(), Isis::Hapke::Hapke(), Isis::Cube::hasGroup(), Isis::PvlObject::HasObject(), Isis::Equalization::importStatistics(), Isis::Cube::isProjected(), Isis::DbAccess::load(), Isis::LunarLambert::LunarLambert(), Isis::LunarLambertEmpirical::LunarLambertEmpirical(), Isis::KernelDb::matches(), Isis::Minnaert::Minnaert(), Isis::MinnaertEmpirical::MinnaertEmpirical(), Isis::Mixed::Mixed(), Isis::MoonAlbedo::MoonAlbedo(), Isis::Cube::open(), Isis::AutoReg::Parse(), Isis::PhotoModel::PhotoModel(), Isis::Process::PropagateLabels(), Isis::Cube::putGroup(), Isis::ControlNetFileV0002::Read(), Isis::ControlNetFileV0001::Read(), Isis::MosaicController::readProject(), Isis::BandSpinBox::setBandBin(), Isis::ProcessMosaic::SetOutputCube(), Isis::Process::SetOutputCube(), Isis::Shade::Shade(), Isis::ShadeAtm::ShadeAtm(), Isis::ProcessMosaic::StartProcess(), Isis::Topo::Topo(), Isis::TopoAtm::TopoAtm(), Isis::ControlNetFileV0002::ToPvl(), Isis::ControlNetFileV0001::ToPvl(), Isis::AlphaCube::UpdateGroup(), Isis::SubArea::UpdateLabel(), Isis::CubeTileHandler::updateLabels(), Isis::CubeBsqHandler::updateLabels(), Isis::SpectralPlotTool::updateTool(), Isis::PvlObject::ValidateObject(), ValidatePvl(), and Isis::Blob::Write().

PvlContainer* Isis::PvlContainer::FormatTemplate (  )  [inline, inherited]
PvlFormat* Isis::PvlContainer::GetFormat (  )  [inline, inherited]
const PvlKeyword& Isis::PvlContainer::GetNameKeyword (  )  const [inline, inherited]
PvlKeyword& Isis::PvlContainer::GetNameKeyword (  )  [inline, inherited]

References Isis::PvlContainer::p_name.

Referenced by Isis::operator<<().

const Isis::PvlGroup & Isis::PvlObject::Group ( const int  index  )  const [inherited]

Return the group at the specified index.

Parameters:
index The index of the group.
Returns:
The PvlGroup sought for.
Exceptions:
IException 

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

Isis::PvlGroup & Isis::PvlObject::Group ( const int  index  )  [inherited]
int Isis::PvlObject::Groups (  )  const [inline, inherited]
bool Isis::PvlContainer::HasFormatTemplate (  )  [inline, inherited]
bool Isis::PvlObject::HasGroup ( const QString &  name  )  const [inline, inherited]
bool Isis::PvlContainer::HasKeyword ( const QString &  name  )  const [inherited]

Check to see if a keyword exists.

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

References Isis::PvlContainer::Begin(), Isis::PvlContainer::End(), and Isis::PvlContainer::FindKeyword().

Referenced by Isis::Latitude::add(), Isis::PvlContainer::AddKeyword(), Isis::PvlTranslationTable::AddTable(), Isis::Albedo::Albedo(), Isis::AlbedoAtm::AlbedoAtm(), Isis::AtmosModel::AtmosModel(), Isis::Camera::Camera(), Isis::CameraFactory::CameraVersion(), IsisAml::CommandLine(), Isis::ControlNetDiff::compareGroups(), Isis::ShapeModelFactory::create(), Isis::PhotoModelFactory::Create(), Isis::NormModelFactory::Create(), Isis::Gui::Create(), Isis::CameraFactory::Create(), Isis::AtmosModelFactory::Create(), Isis::ControlNetFilter::CubeConvexHullFilter(), Isis::ControlNetFilter::CubeDistanceFilter(), Isis::ControlNetFilter::CubeNameExpressionFilter(), Isis::ControlNetFilter::CubeNumPointsFilter(), Isis::DemShape::DemShape(), Isis::Equirectangular::Equirectangular(), Isis::KernelDb::findAll(), Isis::CubeViewport::getBandFilterName(), Isis::GroundGrid::GroundGrid(), Isis::UniversalGroundMap::GroundRange(), Isis::Camera::GroundRange(), Isis::Hapke::Hapke(), Isis::Spice::hasKernels(), Isis::HiLab::HiLab(), Isis::IdealCamera::IdealCamera(), Isis::PvlTranslationTable::InputDefault(), Isis::PvlTranslationManager::InputHasKeyword(), Isis::PvlTranslationManager::InputKeyword(), Isis::PvlTranslationTable::InputKeywordName(), Isis::PvlTranslationTable::IsAuto(), Isis::PvlTranslationTable::IsOptional(), Isis::LambertConformal::LambertConformal(), Isis::Latitude::Latitude(), Isis::Preference::Load(), Isis::LoMediumCamera::LoMediumCamera(), Isis::LunarLambert::LunarLambert(), Isis::LunarLambertEmpirical::LunarLambertEmpirical(), Isis::Projection::Mapping(), Isis::KernelDb::matches(), Isis::Mercator::Mercator(), Isis::Minnaert::Minnaert(), Isis::MinnaertEmpirical::MinnaertEmpirical(), Isis::Mixed::Mixed(), Isis::MoonAlbedo::MoonAlbedo(), Isis::ObliqueCylindrical::ObliqueCylindrical(), Isis::Orthographic::Orthographic(), Isis::PvlTranslationTable::OutputName(), Isis::PvlTranslationTable::OutputPosition(), Isis::StripPolygonSeeder::Parse(), Isis::PolygonSeeder::Parse(), Isis::LimitPolygonSeeder::Parse(), Isis::GridPolygonSeeder::Parse(), Isis::AutoReg::Parse(), Isis::PhotoModel::PhotoModel(), 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::AutoReg::RegTemplate(), Isis::Robinson::Robinson(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::Shade::Shade(), Isis::ShadeAtm::ShadeAtm(), Isis::SimpleCylindrical::SimpleCylindrical(), Isis::Sinusoidal::Sinusoidal(), Isis::Target::Target(), Isis::Projection::TargetRadii(), Isis::ThemisIrCamera::ThemisIrCamera(), Isis::Topo::Topo(), Isis::TopoAtm::TopoAtm(), Isis::ControlNetFileV0002::ToPvl(), Isis::IException::toString(), Isis::PvlTranslationTable::Translate(), Isis::PvlTranslationManager::Translate(), Isis::TransverseMercator::TransverseMercator(), Isis::SubArea::UpdateLabel(), Isis::SpectralPlotTool::updateTool(), Isis::PvlContainer::ValidateAllKeywords(), Isis::PvlObject::ValidateObject(), ValidatePvl(), Isis::ControlNetValidMeasure::ValidatePvlDN(), Isis::ControlNetValidMeasure::ValidatePvlEmissionAngle(), Isis::ControlNetValidMeasure::ValidatePvlFromEdge(), Isis::ControlNetValidMeasure::ValidatePvlIncidenceAngle(), Isis::ControlNetValidMeasure::ValidatePvlResidualTolerances(), Isis::ControlNetValidMeasure::ValidatePvlResolution(), Isis::ControlNetValidMeasure::ValidatePvlShiftTolerances(), and Isis::PvlContainer::ValidateRepeatOption().

bool Isis::PvlObject::HasKeyword ( const QString &  kname,
FindOptions  opts 
) const [inherited]

See if a keyword is in the current PvlObject, or deeper inside other PvlObjects and PvlGroups within this one.

Note: This member has the same name as the PvlContainer and hides those implementations, but with the using statement the parents FindKeyword members ar made visible.

Parameters:
kname The name of the keyword to look for.
opts The FindOptions option (None or Traverse).
Returns:
True if the Keyword exists False otherwise.

References Isis::PvlContainer::Begin(), Isis::PvlContainer::End(), g, Isis::PvlObject::Group(), Isis::PvlObject::None, and Isis::PvlObject::Object().

Referenced by Isis::PvlFormat::Accuracy(), Isis::PvlFormat::Add(), Isis::CubeTileHandler::CubeTileHandler(), Isis::Blob::Find(), Isis::MosaicGridTool::fromPvl(), Isis::MosaicControlNetTool::fromPvl(), Isis::MosaicAreaTool::fromPvl(), Isis::MosaicFileListWidget::fromPvl(), Isis::Cube::hasTable(), Isis::SpicePosition::LoadCache(), Isis::Cube::open(), Isis::operator<<(), Isis::Table::ReadInit(), Isis::Spice::readStoredValue(), Isis::ProcessMosaic::SetMosaicOrigin(), Isis::Spice::storeValue(), Isis::PvlFormat::Type(), Isis::PvlObject::ValidateObject(), ValidatePvl(), and Isis::Table::WriteInit().

bool Isis::PvlObject::HasObject ( const QString &  name  )  const [inline, inherited]
int Isis::PvlContainer::Indent (  )  [inline, inherited]
bool Isis::PvlContainer::IsNamed ( const QString &  match  )  const [inline, inherited]

Returns whether the given string is equal to the container name or not.

Parameters:
match The string to compare to the name.
Returns:
True if the name and string are the same, false if they are not.

References Isis::PvlContainer::p_name, and Isis::PvlKeyword::StringEqual().

Referenced by Isis::SessionLog::AddError(), Isis::Cube::copy(), Isis::Blob::Find(), Isis::KernelDb::findAll(), Isis::Cube::hasTable(), Isis::Table::ReadInit(), Isis::Process::SetOutputCube(), and Isis::Process::WriteHistory().

int Isis::PvlContainer::Keywords (  )  const [inline, inherited]
QString Isis::PvlContainer::Name (  )  const [inline, inherited]
const PvlObject & Isis::PvlObject::Object ( const int  index  )  const [inherited]

Return the object at the specified index.

Parameters:
index The index of the object.
Returns:
The PvlObject sought for.
Exceptions:
IException::Programmer 

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

PvlObject & Isis::PvlObject::Object ( const int  index  )  [inherited]
int Isis::PvlObject::Objects (  )  const [inline, inherited]
void Isis::PvlContainer::operator+= ( const PvlKeyword keyword  )  [inline, inherited]

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

Parameters:
keyword The PvlKeyword to be added.

References Isis::PvlContainer::AddKeyword().

void Isis::PvlObject::operator+= ( const Isis::PvlObject obj  )  [inline, inherited]
void Isis::PvlObject::operator+= ( const Isis::PvlGroup group  )  [inline, inherited]
void Isis::PvlContainer::operator-= ( const PvlKeyword key  )  [inline, inherited]

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

Parameters:
key The PvlKeyword object to remove.

References Isis::PvlContainer::DeleteKeyword(), and Isis::PvlKeyword::Name().

void Isis::PvlContainer::operator-= ( const QString &  name  )  [inline, inherited]

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

Parameters:
name The name of the keyword to remove.

References Isis::PvlContainer::DeleteKeyword().

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

This is an assignment operator.

Reimplemented from Isis::PvlObject.

bool Isis::PvlObject::operator== ( const PvlObject object  )  const [inline, inherited]

Compares two PvlObjects.

Returns a boolean value based on the StringEqual() method.

Parameters:
object The PvlObject to compare.
Returns:
True if they are equal, false if not.

References Isis::PvlContainer::Name(), and Isis::PvlKeyword::StringEqual().

PvlKeyword Isis::PvlContainer::operator[] ( const char *  name  )  const [inline, inherited]

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

Parameters:
name The name of the keyword to find.

References Isis::PvlContainer::operator[]().

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

Return the PvlKeyword object at the specified index.

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

References _FILEINFO_, Isis::Message::ArraySubscriptNotInRange(), Isis::PvlContainer::p_keywords, and Isis::IException::Programmer.

const PvlKeyword& Isis::PvlContainer::operator[] ( const QString &  name  )  const [inline, inherited]

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

Parameters:
name The name of the keyword to find.

References Isis::PvlContainer::FindKeyword().

PvlKeyword& Isis::PvlContainer::operator[] ( const char *  name  )  [inline, inherited]

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

Parameters:
name The name of the keyword to find.

References Isis::PvlContainer::operator[]().

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

Return the PvlKeyword object at the specified index.

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

References _FILEINFO_, Isis::Message::ArraySubscriptNotInRange(), Isis::PvlContainer::p_keywords, and Isis::IException::Programmer.

PvlKeyword& Isis::PvlContainer::operator[] ( const QString &  name  )  [inline, inherited]

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

Parameters:
name The name of the keyword to find.

References Isis::PvlContainer::FindKeyword().

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

void Isis::Pvl::Read ( const QString &  file  ) 
void Isis::PvlContainer::SetFileName ( const QString &  filename  )  [inline, protected, inherited]

Sets the filename to the specified string.

Parameters:
filename The new filename to use.

References Isis::PvlContainer::p_filename.

void Isis::PvlContainer::SetFormat ( PvlFormat format  )  [inline, inherited]
void Isis::Pvl::SetFormatTemplate ( const QString &  filename  ) 
void Isis::Pvl::SetFormatTemplate ( Isis::Pvl temp  ) 
void Isis::PvlContainer::SetIndent ( int  indent  )  [inline, inherited]
void Isis::PvlContainer::SetName ( const QString &  name  )  [inline, inherited]
void Isis::Pvl::SetTerminator ( const QString &  term  )  [inline]

Sets the terminator used to signify the end of the PVL informationDefaults to "END".

Parameters:
term The user-defined terminator

Referenced by Isis::History::History(), Isis::OriginalLabel::OriginalLabel(), Isis::Equalization::setResults(), and Isis::SessionLog::Write().

QString Isis::Pvl::Terminator (  )  const [inline]

Returns the terminator used to signify the end of the PVL informationDefaults to "END".

Returns:
The terminator used by the Pvl object.

Referenced by Append(), Isis::operator<<(), and Write().

QString Isis::PvlContainer::Type (  )  const [inline, inherited]
void Isis::PvlContainer::ValidateAllKeywords ( PvlContainer pPvlCont  )  [protected, inherited]

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

References _FILEINFO_, Isis::PvlContainer::DeleteKeyword(), Isis::PvlContainer::FindKeyword(), Isis::PvlContainer::HasKeyword(), Isis::PvlContainer::Keywords(), Isis::PvlKeyword::Name(), Isis::IException::User, Isis::PvlKeyword::ValidateKeyword(), and Isis::PvlContainer::ValidateRepeatOption().

Referenced by Isis::PvlGroup::ValidateGroup(), Isis::PvlObject::ValidateObject(), and ValidatePvl().

void Isis::PvlObject::ValidateObject ( PvlObject pPvlObj  )  [inherited]
void Isis::Pvl::ValidatePvl ( const Pvl pPvl,
Pvl pPvlResults 
)
void Isis::PvlContainer::ValidateRepeatOption ( PvlKeyword pPvlTmplKwrd,
PvlContainer pPvlCont 
) [protected, inherited]

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

References Isis::PvlContainer::DeleteKeyword(), Isis::PvlContainer::FindKeyword(), Isis::PvlContainer::HasKeyword(), Isis::PvlContainer::Keywords(), Isis::PvlKeyword::Name(), and Isis::PvlKeyword::ValidateKeyword().

Referenced by Isis::PvlContainer::ValidateAllKeywords().

void Isis::Pvl::Write ( const QString &  file  ) 

Opens and writes PVL information to a file and handles the end of line sequence.

Parameters:
file Name of the file to create. The method will overwrite any existing file.
Exceptions:
Isis::iException::Io 

References _FILEINFO_, Isis::FileName::expanded(), Isis::Message::FileCreate(), Isis::PvlFormat::FormatEOL(), Isis::PvlContainer::GetFormat(), Isis::IException::Io, Isis::PvlContainer::SetFormat(), and Terminator().

Referenced by Isis::Stretch::Save(), Isis::UserInterface::SaveHistory(), Isis::FileTool::saveInfo(), Isis::MosaicController::saveProject(), Isis::ControlNetVersioner::Write(), Isis::Equalization::write(), and Isis::Blob::Write().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
Isis::Pvl pvl 
) [friend]

Reimplemented from Isis::PvlObject.

Reimplemented in Isis::SessionLog.

std::istream& operator>> ( std::istream &  is,
Pvl pvl 
) [friend]

Reimplemented from Isis::PvlObject.


Member Data Documentation

QString Isis::PvlContainer::p_filename [protected, inherited]
PvlKeyword Isis::PvlContainer::p_name [protected, inherited]

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