Isis 3 Programmer Reference
Isis::Preference Class Reference

Reads user preferences from a data file. More...

#include <Preference.h>

Inheritance diagram for Isis::Preference:
Inheritance graph
Collaboration diagram for Isis::Preference:
Collaboration graph

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

void Load (const QString &file)
 
bool IsUnitTest ()
 Tests whether or not a file is a unitTest.
 
void fromString (const std::string &str)
 Load PVL information from a string.
 
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)
 
void setFormatTemplate (PvlContainer &ref)
 
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 addLogGroup (Isis::PvlGroup &group)
 Add a group to the object and report it to the log/terminal.
 
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 ()
 
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
 

Static Public Member Functions

static PreferencePreferences (bool unitTest=false)
 

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 m_filename
 This contains the filename used to initialize the pvl object.
 
PvlKeyword m_name
 This is the name keyword.
 
QList< PvlKeywordm_keywords
 This is the vector of PvlKeywords the container is holding.
 
PvlContainerm_formatTemplate
 

Private Member Functions

 Preference ()
 Constructs a Preference object.
 
 ~Preference ()
 Destroys the Preference object.
 
 Preference (const Preference &p)
 
Preferenceoperator= (const Preference &p)
 
void init ()
 initializes the class
 

Static Private Member Functions

static void Shutdown ()
 

Private Attributes

bool m_internalTemplate
 
QString m_terminator
 Terminator used to signify the end of the PVL informationDefaults to "END".
 
QList< PvlObjectm_objects
 A vector of PvlObjects contained in the current PvlObject.
 
QList< PvlGroupm_groups
 A vector of PvlGroups contained in the current PvlObject.
 

Static Private Attributes

static Preferencep_preference = NULL
 Pointer to a Preference object.
 
static bool p_unitTest = false
 Flag indicating whether the file is a unitTest or not.
 

Detailed Description

Reads user preferences from a data file.

This class is used to load, set, and obtain user preferences for the operation of Isis. User preferences for Isis are items such as the name of the log file, default data directories, and processing status. This is essentially a specialized version of a Label object. It reads a system-wide preference file and overwrites values in the label with a user preference file. This object does not need to be modified to add new prefences ... simply edit the system wide preference file, add the new group and keywords, update the preference document (user documentation) explaining the new keywords.

Author
2002-03-13 Jeff Anderson
Todo
The Preference class needs private methods & variables documented. The documentation shows methods that don't exist in the code. It also needs an example.
History

2003-04-23 Jeff Anderson - reworked the class to use the Label object.

2003-05-16 Stuart Sides - Modified schema from astrogeoloy... isis.astrogeology

2003-12-03 Stuart Sides - added HasGroup member.

2005-10-03 Elizabeth Miller - changed

2008-01-09 Steven Lambright - Made Application a friend for destruction purposes

2008-07-08 Steven Lambright - Now uses atexit for destruction

2010-05-28 Steven Lambright - More resilient to $HOME/.Isis problems

2010-07-19 Jeannie Walldren - Added FileCustomization group to TestPreferences file

2012-02-24 Steven Lambright - This class now sets the thread limit in the Qt global thread pool.

2013-03-27 Jeannie Backer - Added Near mission to DataDirectory group to TestPreferences file. References #1248.

2015-05-27 Andrew Stebenne - Backwards Compatibility Issue: Preference now throws an exception when Preference.Load() is called on a nonexistent preference file. This may cause issues for anyone who has been using a nonexistent preference file.

Definition at line 60 of file Preference.h.

Member Typedef Documentation

◆ ConstPvlGroupIterator

typedef QList<Isis::PvlGroup>::const_iterator Isis::PvlObject::ConstPvlGroupIterator
inherited

Definition at line 84 of file PvlObject.h.

◆ ConstPvlKeywordIterator

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

The const keyword iterator.

Definition at line 160 of file PvlContainer.h.

◆ ConstPvlObjectIterator

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

Definition at line 230 of file PvlObject.h.

◆ PvlGroupIterator

The counter for groups.

Definition at line 83 of file PvlObject.h.

◆ PvlKeywordIterator

The keyword iterator.

Definition at line 157 of file PvlContainer.h.

◆ PvlObjectIterator

typedef QList<PvlObject>::iterator Isis::PvlObject::PvlObjectIterator
inherited

The counter for objects.

Definition at line 229 of file PvlObject.h.

Member Enumeration Documentation

◆ FindOptions

A collection of options to use when finding.

Enumerator
None 

Search only the current level.

Traverse 

Search child objects.

Definition at line 154 of file PvlObject.h.

◆ InsertMode

Contains both modes: Append or Replace.

Definition at line 95 of file PvlContainer.h.

Constructor & Destructor Documentation

◆ Preference()

Isis::Preference::Preference ( )
private

Constructs a Preference object.

Definition at line 24 of file Preference.cpp.

◆ ~Preference()

Isis::Preference::~Preference ( )
inlineprivate

Destroys the Preference object.

Definition at line 80 of file Preference.h.

Member Function Documentation

◆ addComment()

void Isis::PvlContainer::addComment ( const QString & comment)
inlineinherited

Definition at line 269 of file PvlContainer.h.

◆ addGroup()

◆ 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 202 of file PvlContainer.cpp.

References Isis::PvlContainer::findKeyword(), Isis::PvlContainer::hasKeyword(), Isis::PvlContainer::m_keywords, and Isis::PvlKeyword::name().

Referenced by Isis::ControlNetDiff::addUniquePoint(), Isis::CameraFactory::Create(), Isis::ControlNetDiff::diff(), Isis::ControlNetDiff::diff(), Isis::ProcessImportPds::ExtractPdsProjection(), Isis::PvlContainer::operator+=(), Isis::PvlObject::PvlObject(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::Projection::SetUpperLeftCorner(), and Isis::SubArea::UpdateLabel().

◆ 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 233 of file PvlContainer.cpp.

References Isis::PvlContainer::m_keywords.

◆ addLogGroup()

void Isis::PvlObject::addLogGroup ( Isis::PvlGroup & group)
inherited

Add a group to the object and report it to the log/terminal.

Parameters
groupThe PvlGroup object to add.

Definition at line 159 of file PvlObject.cpp.

References Isis::PvlObject::addGroup(), Isis::PvlObject::group(), and Isis::Application::Log().

◆ addObject()

◆ append()

void Isis::Pvl::append ( const QString & file)
inherited

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

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

Definition at line 184 of file Pvl.cpp.

References Isis::Message::FileOpen(), Isis::IException::Io, and Isis::Pvl::terminator().

Referenced by Isis::IException::toPvl().

◆ 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 186 of file PvlContainer.h.

References Isis::PvlContainer::m_keywords.

◆ beginGroup() [1/2]

PvlGroupIterator Isis::PvlObject::beginGroup ( )
inlineinherited

Returns the beginning group index.

Returns
The iterator of the beginning group..

Definition at line 91 of file PvlObject.h.

References Isis::PvlObject::m_groups.

Referenced by Isis::PvlObject::deleteGroup(), Isis::PvlObject::deleteGroup(), Isis::PvlObject::findGroup(), Isis::PvlObject::findGroup(), and Isis::PvlObject::hasGroup().

◆ beginGroup() [2/2]

ConstPvlGroupIterator Isis::PvlObject::beginGroup ( ) const
inlineinherited

Returns the beginning group index.

Returns
The iterator of the beginning group..

Definition at line 100 of file PvlObject.h.

References Isis::PvlObject::m_groups.

◆ beginObject() [1/2]

PvlObjectIterator Isis::PvlObject::beginObject ( )
inlineinherited

Returns the index of the beginning object.

Returns
The beginning object's index.

Definition at line 237 of file PvlObject.h.

References Isis::PvlObject::m_objects.

Referenced by Isis::PvlObject::deleteObject(), Isis::PvlObject::deleteObject(), Isis::PvlObject::findObject(), Isis::PvlObject::findObject(), and Isis::PvlObject::hasObject().

◆ beginObject() [2/2]

ConstPvlObjectIterator Isis::PvlObject::beginObject ( ) const
inlineinherited

Returns the const index of the beginning object.

Returns
The beginning object's index.

Definition at line 246 of file PvlObject.h.

References Isis::PvlObject::m_objects.

◆ 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 136 of file PvlContainer.cpp.

References Isis::PvlContainer::begin(), Isis::PvlContainer::end(), and Isis::PvlContainer::m_keywords.

◆ clear()

void Isis::PvlObject::clear ( )
inlineinherited

Remove everything from the current PvlObject.

Definition at line 343 of file PvlObject.h.

References Isis::PvlContainer::clear(), Isis::PvlObject::m_groups, and Isis::PvlObject::m_objects.

Referenced by Isis::PvlFormat::init(), and Isis::SpiceRotation::LoadCache().

◆ comment()

QString Isis::PvlContainer::comment ( const int index) const
inlineinherited

Definition at line 265 of file PvlContainer.h.

◆ comments()

int Isis::PvlContainer::comments ( ) const
inlineinherited

Definition at line 262 of file PvlContainer.h.

◆ deleteGroup() [1/2]

void Isis::PvlObject::deleteGroup ( const int index)
inherited

Remove a group from the current PvlObject.

Parameters
indexThe index of the PvlGroup to remove.
Exceptions
IException

Definition at line 434 of file PvlObject.cpp.

References Isis::PvlObject::beginGroup(), Isis::PvlContainer::m_filename, Isis::PvlObject::m_groups, Isis::PvlContainer::name(), Isis::PvlContainer::type(), and Isis::IException::Unknown.

◆ deleteGroup() [2/2]

void Isis::PvlObject::deleteGroup ( const QString & name)
inherited

◆ deleteKeyword() [1/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 115 of file PvlContainer.cpp.

References Isis::PvlContainer::begin(), Isis::PvlContainer::m_filename, Isis::PvlContainer::m_keywords, Isis::PvlContainer::name(), Isis::PvlContainer::type(), and Isis::IException::Unknown.

◆ deleteKeyword() [2/2]

◆ deleteObject() [1/2]

void Isis::PvlObject::deleteObject ( const int index)
inherited

Remove an object from the current PvlObject.

Parameters
indexThe index of the PvlObject to remove.
Exceptions
IException

Definition at line 392 of file PvlObject.cpp.

References Isis::PvlObject::beginObject(), Isis::PvlContainer::m_filename, Isis::PvlObject::m_objects, Isis::PvlContainer::name(), Isis::PvlContainer::type(), and Isis::IException::Unknown.

◆ deleteObject() [2/2]

void Isis::PvlObject::deleteObject ( const QString & name)
inherited

◆ 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 202 of file PvlContainer.h.

References Isis::PvlContainer::m_keywords.

◆ endGroup() [1/2]

PvlGroupIterator Isis::PvlObject::endGroup ( )
inlineinherited

Returns the ending group index.

Returns
The iterator of the ending group.

Definition at line 109 of file PvlObject.h.

References Isis::PvlObject::m_groups.

Referenced by Isis::PvlObject::deleteGroup(), Isis::PvlObject::findGroup(), Isis::PvlObject::findGroup(), and Isis::PvlObject::hasGroup().

◆ endGroup() [2/2]

ConstPvlGroupIterator Isis::PvlObject::endGroup ( ) const
inlineinherited

Returns the const ending group index.

Returns
The iterator of the ending group.

Definition at line 118 of file PvlObject.h.

References Isis::PvlObject::m_groups.

◆ endObject() [1/2]

PvlObjectIterator Isis::PvlObject::endObject ( )
inlineinherited

Returns the index of the ending object.

Returns
The ending object's index.

Definition at line 255 of file PvlObject.h.

References Isis::PvlObject::m_objects.

Referenced by Isis::PvlObject::deleteObject(), Isis::PvlObject::findObject(), Isis::PvlObject::findObject(), and Isis::PvlObject::hasObject().

◆ endObject() [2/2]

ConstPvlObjectIterator Isis::PvlObject::endObject ( ) const
inlineinherited

Returns the const index of the ending object.

Returns
The ending object's index.

Definition at line 264 of file PvlObject.h.

References Isis::PvlObject::m_objects.

◆ fileName()

◆ findGroup() [1/4]

ConstPvlGroupIterator Isis::PvlObject::findGroup ( const QString & name,
ConstPvlGroupIterator beg,
ConstPvlGroupIterator end ) const
inlineinherited

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

Parameters
nameThe name of the group to look for.
begThe lower index
endThe higher index

Definition at line 143 of file PvlObject.h.

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

◆ findGroup() [2/4]

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

Finds a group within the current PvlObject.

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

Definition at line 95 of file PvlObject.cpp.

References Isis::PvlObject::beginGroup(), Isis::PvlObject::endGroup(), Isis::PvlContainer::m_filename, Isis::PvlContainer::name(), Isis::PvlObject::Traverse, and Isis::IException::Unknown.

◆ findGroup() [3/4]

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

Finds a group within the current PvlObject.

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

Definition at line 130 of file PvlObject.cpp.

References Isis::PvlObject::beginGroup(), Isis::PvlObject::endGroup(), Isis::PvlContainer::m_filename, Isis::PvlContainer::name(), Isis::PvlObject::Traverse, and Isis::IException::Unknown.

◆ findGroup() [4/4]

PvlGroupIterator Isis::PvlObject::findGroup ( const QString & name,
PvlGroupIterator beg,
PvlGroupIterator end )
inlineinherited

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

Parameters
nameThe name of the group to look for.
begThe lower index
endThe higher index

Definition at line 129 of file PvlObject.h.

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

Referenced by Isis::ApolloMetricCamera::ApolloMetricCamera(), Isis::ApolloPanoramicCamera::ApolloPanoramicCamera(), Isis::Camera::Camera(), Isis::MdisCamera::computeFocalLength(), Isis::ProjectionFactory::Create(), Isis::ProjectionFactory::CreateForCube(), Isis::ProjectionFactory::CreateForCube(), Isis::ProjectionFactory::CreateFromCube(), Isis::PvlObject::deleteGroup(), Isis::DemShape::DemShape(), Isis::PvlToPvlTranslationManager::DoTranslation(), Isis::Equirectangular::Equirectangular(), Isis::KernelDb::findAll(), Isis::PvlTranslationTable::findTranslationGroup(), Isis::MosaicSceneWidget::fromPvl(), Isis::Plugin::GetPlugin(), Isis::PvlObject::hasGroup(), Isis::IdealCamera::IdealCamera(), Isis::ImportImagesWorkOrder::importConfirmedImages(), Isis::LambertConformal::LambertConformal(), Isis::LunarAzimuthalEqualArea::LunarAzimuthalEqualArea(), Isis::KernelDb::matches(), Isis::Mercator::Mercator(), Isis::Mollweide::Mollweide(), Isis::ObliqueCylindrical::ObliqueCylindrical(), Isis::Orthographic::Orthographic(), Isis::GridPolygonSeeder::Parse(), Isis::LimitPolygonSeeder::Parse(), Isis::PolygonSeeder::Parse(), Isis::StripPolygonSeeder::Parse(), Isis::Planar::Planar(), Isis::PointPerspective::PointPerspective(), Isis::PolarStereographic::PolarStereographic(), Isis::Projection::Projection(), Isis::AutoReg::RegTemplate(), Isis::RingCylindrical::RingCylindrical(), Isis::ProjectionFactory::RingsCreate(), Isis::ProjectionFactory::RingsCreateForCube(), Isis::ProjectionFactory::RingsCreateForCube(), Isis::ProjectionFactory::RingsCreateFromCube(), Isis::ProcessMapMosaic::RingsSetOutputCube(), Isis::Robinson::Robinson(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::ControlNet::SetTarget(), Isis::SimpleCylindrical::SimpleCylindrical(), Isis::Sinusoidal::Sinusoidal(), Isis::Target::Target(), and Isis::TransverseMercator::TransverseMercator().

◆ findKeyword() [1/5]

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
knameThe name of the keyword to look for.
optsThe FindOptions option (None or Traverse).
Returns
The keyword sought
Exceptions
IException

Definition at line 183 of file PvlObject.cpp.

References Isis::PvlContainer::begin(), Isis::PvlContainer::end(), Isis::PvlObject::findKeyword(), Isis::PvlObject::group(), Isis::PvlContainer::m_filename, Isis::PvlObject::None, and Isis::IException::Unknown.

Referenced by Isis::ControlNetDiff::compare(), Isis::CSMCamera::CSMCamera(), Isis::PvlObject::findKeyword(), Isis::SpicePosition::LoadCache(), Isis::SpiceRotation::LoadCache(), Isis::ImportPdsTable::loadLabel(), and Isis::ProcessImportPds::ProcessPdsQubeLabel().

◆ findKeyword() [2/5]

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

Find a keyword with a specified name.

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

Definition at line 114 of file PvlContainer.cpp.

◆ findKeyword() [3/5]

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 134 of file PvlContainer.cpp.

◆ findKeyword() [4/5]

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 167 of file PvlContainer.cpp.

◆ findKeyword() [5/5]

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 163 of file PvlContainer.cpp.

◆ findObject() [1/4]

ConstPvlObjectIterator Isis::PvlObject::findObject ( const QString & name,
ConstPvlObjectIterator beg,
ConstPvlObjectIterator end ) const
inlineinherited

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

Parameters
nameThe name of the object to find.
begThe lower index.
endThe higher index.
Returns
The index of the object.

Definition at line 291 of file PvlObject.h.

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

◆ findObject() [2/4]

PvlObject & Isis::PvlObject::findObject ( const QString & name,
PvlObject::FindOptions opts = None )
inherited

Find an object within the current PvlObject.

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

Definition at line 296 of file PvlObject.cpp.

References Isis::PvlObject::beginObject(), Isis::PvlObject::endObject(), Isis::PvlObject::findObject(), Isis::PvlContainer::m_filename, Isis::PvlContainer::name(), Isis::PvlObject::Traverse, and Isis::IException::Unknown.

◆ findObject() [3/4]

const PvlObject & Isis::PvlObject::findObject ( const QString & name,
FindOptions opts = None ) const
inherited

Find an object within the current PvlObject.

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

Definition at line 331 of file PvlObject.cpp.

References Isis::PvlObject::beginObject(), Isis::PvlObject::endObject(), Isis::PvlObject::findObject(), Isis::PvlContainer::m_filename, Isis::PvlContainer::name(), Isis::PvlObject::Traverse, and Isis::IException::Unknown.

◆ findObject() [4/4]

PvlObjectIterator Isis::PvlObject::findObject ( const QString & name,
PvlObjectIterator beg,
PvlObjectIterator end )
inlineinherited

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

Parameters
nameThe name of the object to find.
begThe lower index.
endThe higher index.
Returns
The index of the object.

Definition at line 276 of file PvlObject.h.

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

Referenced by Isis::SerialNumberList::add(), Isis::SerialNumberList::add(), Isis::AlphaCube::AlphaCube(), Isis::Cube::applyVirtualBandsToLabel(), Isis::AutoReg::AutoReg(), Isis::ControlNetDiff::compare(), Isis::MosaicController::convertV1ToV2(), Isis::Cube::copy(), Isis::FileTool::copyCubeDetails(), Isis::CubeIoHandler::CubeIoHandler(), Isis::CubeTileHandler::CubeTileHandler(), Isis::Cube::deleteGroup(), Isis::PvlObject::deleteObject(), Isis::Cube::externalCubeFileName(), Isis::ProcessExportPds4::fileAreaObservational(), Isis::KernelDb::findAll(), Isis::PvlObject::findObject(), Isis::PvlObject::findObject(), Isis::SerialNumber::FindSerialTranslation(), Isis::Cube::fromLabel(), Isis::MosaicSceneWidget::fromPvl(), Isis::Equalization::fromPvl(), Isis::OverlapStatistics::fromPvl(), Isis::CubeViewport::getBandFilterName(), Isis::PvlToPvlTranslationManager::GetContainer(), Isis::PvlToXmlTranslationManager::GetContainer(), Isis::ProcessImportPds::GetProjectionOffsetMults(), Isis::Equalization::getResults(), Isis::Cube::group(), Isis::Cube::hasGroup(), Isis::PvlObject::hasObject(), Isis::ImageImporter::import(), Isis::Equalization::importStatistics(), Isis::Spice::init(), Isis::Cube::initCoreFromLabel(), Isis::Cube::isProjected(), Isis::DbAccess::load(), Isis::KernelDb::loadKernelDbFiles(), Isis::ImportPdsTable::loadLabel(), Isis::ProcessMosaic::MatchDEMShapeModel(), Isis::KernelDb::matches(), Isis::Cube::open(), Isis::AutoReg::Parse(), Isis::ProcessImportPds::ProcessLabel(), Isis::Process::PropagateLabels(), Isis::Cube::putGroup(), Isis::Target::radiiGroup(), Isis::ControlNetVersioner::readProtobuf(), Isis::ControlNetVersioner::readProtobufV0001(), Isis::ControlNetVersioner::readProtobufV0002(), Isis::ControlNetVersioner::readProtobufV0005(), Isis::ControlNetVersioner::readPvl(), Isis::Cube::realDataFileLabel(), Isis::Cube::realDataFileName(), Isis::Cube::relocateDnData(), Isis::BandTool::setBandBin(), Isis::BandTool::setList(), Isis::Process::SetOutputCube(), Isis::ControlNet::SetTarget(), Isis::ProcessExportPds::StandardAllMapping(), Isis::ProcessExportPds::StandardImageImage(), Isis::ProcessExportPds::StandardJP2Image(), Isis::ControlNetVersioner::toPvl(), Isis::AdvancedTrackTool::TrackMosaicOrigin(), Isis::AlphaCube::UpdateGroup(), Isis::SubArea::UpdateLabel(), Isis::CubeTileHandler::updateLabels(), Isis::CubeBsqHandler::updateLabels(), Isis::SpectralPlotTool::updateTool(), Isis::Equalization::validateInputStatistics(), Isis::PvlObject::validateObject(), and Isis::Pvl::validatePvl().

◆ format()

PvlFormat * Isis::PvlContainer::format ( )
inlineinherited

Definition at line 248 of file PvlContainer.h.

◆ formatTemplate()

PvlContainer * Isis::PvlContainer::formatTemplate ( )
inlineinherited

Definition at line 244 of file PvlContainer.h.

◆ fromString()

void Isis::Pvl::fromString ( const std::string & str)
inherited

Load PVL information from a string.

TODO: fully document

Definition at line 60 of file Pvl.cpp.

References Isis::IException::Io, and Isis::IException::Unknown.

◆ group() [1/2]

◆ group() [2/2]

const Isis::PvlGroup & Isis::PvlObject::group ( const int index) const
inherited

Return the group at the specified index.

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

Definition at line 477 of file PvlObject.cpp.

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

◆ groups()

◆ hasFormatTemplate()

bool Isis::PvlContainer::hasFormatTemplate ( )
inlineinherited

Definition at line 240 of file PvlContainer.h.

◆ hasGroup()

bool Isis::PvlObject::hasGroup ( const QString & name) const
inlineinherited

Returns a boolean value based on whether the object has the specified group or not.

Parameters
nameThe name of the group to look for.
Returns
True if the object has the group, false if not.

Definition at line 212 of file PvlObject.h.

References Isis::PvlObject::beginGroup(), Isis::PvlObject::endGroup(), Isis::PvlObject::findGroup(), and Isis::PvlContainer::name().

Referenced by Isis::KernelDb::findAll(), Isis::PvlTranslationTable::findTranslationGroup(), Isis::AutoReg::RegTemplate(), and Isis::ControlNet::SetTarget().

◆ hasKeyword() [1/2]

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
knameThe name of the keyword to look for.
optsThe FindOptions option (None or Traverse).
Returns
True if the Keyword exists False otherwise.

Definition at line 242 of file PvlObject.cpp.

References Isis::PvlContainer::begin(), Isis::PvlContainer::end(), Isis::PvlObject::group(), Isis::PvlObject::hasKeyword(), and Isis::PvlObject::None.

Referenced by Isis::Blob::Find(), Isis::ProcessImportPds::GetProjectionOffsetMults(), Isis::PvlObject::hasKeyword(), Isis::Spice::init(), Isis::Table::initFromBlob(), Isis::Cube::initLabelFromFile(), Isis::SpicePosition::LoadCache(), Isis::SpiceRotation::LoadCache(), Isis::ImportPdsTable::loadLabel(), Isis::SpiceRotation::loadPCFromTable(), and Isis::ProcessExportPds::OutputLabel().

◆ hasKeyword() [2/2]

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 155 of file PvlContainer.cpp.

◆ hasObject()

bool Isis::PvlObject::hasObject ( const QString & name) const
inlineinherited

Returns a boolean value based on whether the object exists in the current PvlObject or not.

Parameters
nameThe name of the object to search for.
Returns
True if the current PvlObject has the specified object, false if it does not.

Definition at line 325 of file PvlObject.h.

References Isis::PvlObject::beginObject(), Isis::PvlObject::endObject(), Isis::PvlObject::findObject(), and Isis::PvlContainer::name().

Referenced by Isis::ProjectionFactory::CreateForCube(), Isis::KernelDb::findAll(), Isis::MosaicSceneWidget::fromPvl(), Isis::ImportPdsTable::loadLabel(), Isis::ProjectionFactory::RingsCreateForCube(), and Isis::ControlNet::SetTarget().

◆ indent()

int Isis::PvlContainer::indent ( )
inlineinherited

Definition at line 255 of file PvlContainer.h.

◆ init()

void Isis::Pvl::init ( )
privateinherited

initializes the class

Definition at line 48 of file Pvl.cpp.

References Isis::PvlContainer::m_filename, and Isis::Pvl::m_terminator.

Referenced by Isis::Pvl::Pvl(), and Isis::Pvl::Pvl().

◆ isNamed()

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

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

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

Definition at line 72 of file PvlContainer.h.

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

Referenced by Isis::KernelDb::findAll(), Isis::Table::initFromBlob(), and Isis::RemoveHiBlobs().

◆ IsUnitTest()

bool Isis::Preference::IsUnitTest ( )
inline

Tests whether or not a file is a unitTest.

Returns
bool True if it is a unitTest, and false if it is not

Definition at line 70 of file Preference.h.

References p_unitTest.

◆ keywords()

int Isis::PvlContainer::keywords ( ) const
inlineinherited

◆ Load()

void Isis::Preference::Load ( const QString & file)

Definition at line 28 of file Preference.cpp.

◆ name()

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

Returns the container name.

Returns
The container name.

Definition at line 63 of file PvlContainer.h.

References Isis::PvlContainer::m_name.

Referenced by Isis::ControlNetDiff::compare(), Isis::ControlPointV0001::ControlPointV0001(), Isis::ControlPointV0002::ControlPointV0002(), Isis::ControlPointV0003::ControlPointV0003(), Isis::ProcessExportPds4::createUnitMap(), Isis::PvlObject::deleteGroup(), Isis::PvlObject::deleteGroup(), Isis::PvlContainer::deleteKeyword(), Isis::PvlContainer::deleteKeyword(), Isis::PvlObject::deleteObject(), Isis::PvlObject::deleteObject(), Isis::PvlObject::findGroup(), Isis::PvlObject::findGroup(), Isis::PvlObject::findGroup(), Isis::PvlObject::findGroup(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::findKeyword(), Isis::PvlContainer::findKeyword(), Isis::PvlObject::findObject(), Isis::PvlObject::findObject(), Isis::PvlObject::findObject(), Isis::PvlObject::findObject(), Isis::PvlObject::hasGroup(), Isis::PvlContainer::hasKeyword(), Isis::PvlObject::hasObject(), Isis::PvlFlatMap::loadGroup(), Isis::UserInterface::loadHistory(), Isis::ImportPdsTable::loadLabel(), Isis::PvlContainer::operator-=(), Isis::operator<<(), Isis::PvlGroup::operator==(), Isis::PvlObject::operator==(), Isis::PvlContainer::operator[](), Isis::PvlContainer::operator[](), Isis::PvlContainer::operator[](), Isis::PvlContainer::operator[](), Isis::Cube::putGroup(), Isis::PvlContainer::PvlContainer(), Isis::PvlObject::PvlObject(), Isis::PvlContainer::setName(), Isis::Table::toBlob(), Isis::Gui::UpdateHistory(), Isis::Cube::write(), and Isis::Blob::Write().

◆ nameKeyword() [1/2]

PvlKeyword & Isis::PvlContainer::nameKeyword ( )
inlineinherited

Definition at line 273 of file PvlContainer.h.

◆ nameKeyword() [2/2]

const PvlKeyword & Isis::PvlContainer::nameKeyword ( ) const
inlineinherited

Definition at line 276 of file PvlContainer.h.

◆ object() [1/2]

◆ object() [2/2]

const PvlObject & Isis::PvlObject::object ( const int index) const
inherited

Return the object at the specified index.

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

Definition at line 513 of file PvlObject.cpp.

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

◆ objects()

◆ operator+=() [1/3]

void Isis::PvlObject::operator+= ( const Isis::PvlGroup & group)
inlineinherited

Definition at line 194 of file PvlObject.h.

◆ operator+=() [2/3]

void Isis::PvlObject::operator+= ( const Isis::PvlObject & obj)
inlineinherited

Definition at line 197 of file PvlObject.h.

◆ operator+=() [3/3]

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 110 of file PvlContainer.h.

◆ operator-=() [1/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 224 of file PvlContainer.h.

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

◆ operator-=() [2/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 216 of file PvlContainer.h.

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

◆ operator==()

bool Isis::PvlObject::operator== ( const PvlObject & object) const
inlineinherited

Compares two PvlObjects.

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

Parameters
objectThe PvlObject to compare.
Returns
True if they are equal, false if not.

Definition at line 337 of file PvlObject.h.

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

◆ operator[]() [1/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 130 of file PvlContainer.h.

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

◆ operator[]() [2/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 151 of file PvlContainer.h.

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

◆ operator[]() [3/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 172 of file PvlContainer.cpp.

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

◆ operator[]() [4/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 187 of file PvlContainer.cpp.

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

◆ operator[]() [5/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 120 of file PvlContainer.h.

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

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

◆ operator[]() [6/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 141 of file PvlContainer.h.

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

◆ Preferences()

Preference & Isis::Preference::Preferences ( bool unitTest = false)
static

Definition at line 86 of file Preference.cpp.

◆ read()

◆ 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 301 of file PvlContainer.h.

References Isis::PvlContainer::m_filename.

◆ setFormat()

void Isis::PvlContainer::setFormat ( PvlFormat * format)
inlineinherited

Definition at line 251 of file PvlContainer.h.

◆ setFormatTemplate() [1/3]

void Isis::Pvl::setFormatTemplate ( const QString & filename)
inherited

Definition at line 234 of file Pvl.cpp.

◆ setFormatTemplate() [2/3]

void Isis::Pvl::setFormatTemplate ( Isis::Pvl & temp)
inherited

Definition at line 227 of file Pvl.cpp.

◆ setFormatTemplate() [3/3]

void Isis::PvlContainer::setFormatTemplate ( PvlContainer & ref)
inlineinherited

Definition at line 236 of file PvlContainer.h.

◆ setIndent()

void Isis::PvlContainer::setIndent ( int indent)
inlineinherited

Definition at line 258 of file PvlContainer.h.

◆ setName()

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

◆ setTerminator()

void Isis::Pvl::setTerminator ( const QString & term)
inlineinherited

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

Parameters
termThe user-defined terminator

Definition at line 144 of file Pvl.h.

References Isis::Pvl::m_terminator.

Referenced by Isis::UserInterface::evaluateOption(), Isis::History::History(), Isis::History::History(), Isis::OriginalLabel::OriginalLabel(), Isis::Equalization::setResults(), Isis::ProcessExportPds::StandardPdsLabel(), and Isis::CameraStatistics::toPvl().

◆ Shutdown()

void Isis::Preference::Shutdown ( )
staticprivate

Definition at line 127 of file Preference.cpp.

◆ terminator()

QString Isis::Pvl::terminator ( ) const
inlineinherited

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

Returns
The terminator used by the Pvl object.

Definition at line 153 of file Pvl.h.

References Isis::Pvl::m_terminator.

Referenced by Isis::Pvl::append(), and Isis::Pvl::write().

◆ type()

◆ 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 394 of file PvlContainer.cpp.

References Isis::PvlContainer::findKeyword(), Isis::PvlContainer::hasKeyword(), Isis::PvlContainer::keywords(), Isis::PvlKeyword::name(), Isis::IException::User, and Isis::PvlContainer::validateRepeatOption().

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

◆ validateObject()

void Isis::PvlObject::validateObject ( PvlObject & pPvlObj)
inherited

Validate Object.

Validate a PvlObject, comparing against corresponding Template PvlObject.

If the Objects are nested, it will recursively validate the PvlObject.

Template PvlObject has the format: Object = (objectName, optional/required)

Author
Sharmila Prasad (9/22/2010)
Parameters
pvlObj-PvlObject to be validated

Definition at line 847 of file PvlObject.cpp.

References Isis::PvlObject::findObject(), Isis::PvlObject::group(), Isis::PvlObject::groups(), Isis::PvlObject::object(), Isis::PvlObject::objects(), Isis::IException::User, Isis::PvlContainer::validateAllKeywords(), and Isis::PvlGroup::validateGroup().

◆ validatePvl()

void Isis::Pvl::validatePvl ( const Pvl & pPvl,
Pvl & pPvlResults )
inherited

Validate a Pvl with the Template Pvl.

Validate a Pvl, comparing against corresponding Template Pvl It validates all the Objects, Groups and Keywords.

Author
Sharmila Prasad (9/22/2010)
Parameters
pPvl- User Pvl to be validated
pPvlResults- Contains the unvalidated Pvl

Definition at line 529 of file Pvl.cpp.

References Isis::PvlObject::findObject(), Isis::PvlObject::group(), Isis::PvlObject::groups(), Isis::PvlObject::object(), Isis::PvlObject::objects(), Isis::Pvl::Pvl(), Isis::IException::User, Isis::PvlContainer::validateAllKeywords(), and Isis::PvlGroup::validateGroup().

◆ 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 470 of file PvlContainer.cpp.

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

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

◆ write()

void Isis::Pvl::write ( const QString & file)
inherited

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

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

Definition at line 130 of file Pvl.cpp.

References Isis::Message::FileCreate(), Isis::IException::Io, and Isis::Pvl::terminator().

Referenced by Isis::Equalization::write(), and Isis::Cube::writeLabels().

Member Data Documentation

◆ m_filename

◆ m_formatTemplate

PvlContainer* Isis::PvlContainer::m_formatTemplate
protectedinherited

Definition at line 305 of file PvlContainer.h.

◆ m_groups

◆ m_internalTemplate

bool Isis::Pvl::m_internalTemplate
privateinherited

Definition at line 167 of file Pvl.h.

◆ m_keywords

◆ m_name

◆ m_objects

◆ m_terminator

QString Isis::Pvl::m_terminator
privateinherited

Terminator used to signify the end of the PVL informationDefaults to "END".

Definition at line 168 of file Pvl.h.

Referenced by Isis::Pvl::init(), Isis::Pvl::operator=(), Isis::Pvl::Pvl(), Isis::Pvl::setTerminator(), and Isis::Pvl::terminator().

◆ p_preference

Preference * Isis::Preference::p_preference = NULL
staticprivate

Pointer to a Preference object.

Definition at line 85 of file Preference.h.

◆ p_unitTest

bool Isis::Preference::p_unitTest = false
staticprivate

Flag indicating whether the file is a unitTest or not.

Definition at line 86 of file Preference.h.

Referenced by IsUnitTest().


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