USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::Plugin Class Reference
[System]

Loads plugins from a shared library. More...

#include <Plugin.h>

Inherits Isis::Pvl.

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

 Plugin ()
 Constructs a Plugin object.
virtual ~Plugin ()
 Destroys the Plugin object.
void * GetPlugin (const std::string &group)
 This method returns a void pointer to a C function (i.e., the plugin) It does this by looking in itself (Pvl) for the keyword LIBRARY and the keyword ROUTINE.
void Read (const std::string &file)
 Loads PVL information from a stream.
void Write (const std::string &file)
 Opens and writes PVL information to a file and handles the end of line sequence.
void Append (const std::string &file)
 Appends PVL information to a file and handles the end of line sequence.
void SetTerminator (const std::string &term)
 Sets the terminator used to signify the end of the PVL informationDefaults to "END".
std::string Terminator () const
 Returns the terminator used to signify the end of the PVL informationDefaults to "END".
void SetFormatTemplate (Isis::Pvl &temp)
void SetFormatTemplate (const std::string &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 std::string &name, PvlGroupIterator beg, PvlGroupIterator end)
 Find a group with the specified name, within these indexes.
ConstPvlGroupIterator FindGroup (const std::string &name, ConstPvlGroupIterator beg, ConstPvlGroupIterator end) const
 Find a group with the specified name, within these indexes.
Isis::PvlGroupFindGroup (const std::string &name, FindOptions opts=None)
 Finds a group within the current PvlObject.
const Isis::PvlGroupFindGroup (const std::string &name, FindOptions opts=None) const
 Finds a group within the current PvlObject.
PvlKeywordFindKeyword (const std::string &kname, FindOptions opts)
 Finds a keyword in the current PvlObject, or deeper inside other PvlObjects and PvlGroups within this one.
PvlKeywordFindKeyword (const std::string &name)
 Find a keyword with a specified name.
const PvlKeywordFindKeyword (const std::string &name) const
 Find a keyword with a specified name.
PvlKeywordIterator FindKeyword (const std::string &name, PvlKeywordIterator beg, PvlKeywordIterator end)
 Find the index of a keyword, using iterators.
ConstPvlKeywordIterator FindKeyword (const std::string &name, ConstPvlKeywordIterator beg, ConstPvlKeywordIterator end) const
 Find the index of a keyword, using iterators.
bool HasKeyword (const std::string &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 std::string &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 std::string &name)
 Remove a group from the current PvlObject.
void DeleteGroup (const int index)
 Remove a group from the current PvlObject.
bool HasGroup (const std::string &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 std::string &name, PvlObjectIterator beg, PvlObjectIterator end)
 Find the index of object with a specified name, between two indexes.
ConstPvlObjectIterator FindObject (const std::string &name, ConstPvlObjectIterator beg, ConstPvlObjectIterator end) const
 Find the index of object with a specified name, between two indexes.
PvlObjectFindObject (const std::string &name, FindOptions opts=None)
 Find an object within the current PvlObject.
const PvlObjectFindObject (const std::string &name, FindOptions opts=None) const
 Find an object within the current PvlObject.
void AddObject (const PvlObject &object)
 Add a PvlObject.
void DeleteObject (const std::string &name)
 Remove an object from the current PvlObject.
void DeleteObject (const int index)
 Remove an object from the current PvlObject.
bool HasObject (const std::string &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 std::string &name)
 Set the name of the container.
std::string Name () const
 Returns the container name.
bool IsNamed (const std::string &match) const
 Returns whether the given string is equal to the container name or not.
std::string 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 std::string &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 std::string &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 std::string &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 std::string &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.
std::string 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
std::string Comment (const int index) const
void AddComment (const std::string &comment)
PvlKeywordGetNameKeyword ()
const PvlKeywordGetNameKeyword () const

Protected Member Functions

void SetFilename (const std::string &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

std::string 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)
 Reads keywords from the instream and appends them to the Pvl object.
std::istream & operator>> (std::istream &is, PvlObject &result)
 This method reads a PvlObject from the input stream.
std::ostream & operator<< (std::ostream &os, Isis::Pvl &pvl)
 This stream will not handle the end of line sequence.
std::ostream & operator<< (std::ostream &os, Isis::PvlObject &object)
 Outputs the PvlObject data to a specified output stream.

Detailed Description

Loads plugins from a shared library.

This class is used to handle dynamic loading of module/classes. It is rarely used directly but instead is inherited for a particular purpose such as managing class specific map projections or camera models. The class is derived from a PVL which aides in the selection of the shared library and plugin routine to load. For example, assume the file my.plugin contained:

    OBJECT=SINUSOIDAL
      LIBRARY=libisis3.so
      ROUTINE=SinusoidalPlugin
    END_OBJECT
    OBJECT=SIMPLECYLINDRICAL
      LIBRARY=libisis3.so
      ROUTINE=SimpleCylindricalPlugin
    END_OBJECT

The desired routine can be selected in code as follows:

 Plugin p;
 p.Read("my.plugin");
 string proj;
 cin >> proj;  // Enter either SINUSOIDAL or SIMPLECYLINDRICAL
 p.Find(proj);
 void *ptr = p.GetPlugin();

Obtaining plugins can be difficult to understand. It is suggested you look at ProjectionFactory to get a better understanding of how they are used.

See also:
ProjectionFactory
CameraFactory
Author:
2004-02-07 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]
typedef QList<Isis::PvlGroup>::iterator Isis::PvlObject::PvlGroupIterator [inherited]

The counter for groups.

The keyword iterator.

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

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::Plugin::Plugin (  ) 

Constructs a Plugin object.

virtual Isis::Plugin::~Plugin (  )  [inline, virtual]

Destroys the Plugin object.


Member Function Documentation

void Isis::PvlContainer::AddComment ( const std::string &  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 std::string &  file  )  [inherited]

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::iException::Message(), Isis::PvlContainer::SetFormat(), and Isis::Pvl::Terminator().

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(), and Isis::PvlObject::HasGroup().

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().

std::string Isis::PvlContainer::Comment ( const int  index  )  const [inline, inherited]
int Isis::PvlContainer::Comments (  )  const [inline, inherited]
void Isis::PvlObject::DeleteGroup ( const int  index  )  [inherited]
void Isis::PvlObject::DeleteGroup ( const std::string &  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::iException::Message(), Isis::PvlContainer::Name(), Isis::PvlContainer::p_filename, Isis::PvlContainer::p_keywords, Isis::iException::Pvl, and Isis::PvlContainer::Type().

void Isis::PvlContainer::DeleteKeyword ( const std::string &  name  )  [inherited]
void Isis::PvlObject::DeleteObject ( const int  index  )  [inherited]
void Isis::PvlObject::DeleteObject ( const std::string &  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(), and Isis::PvlObject::HasGroup().

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().

std::string Isis::PvlContainer::Filename (  )  const [inline, inherited]
const Isis::PvlGroup & Isis::PvlObject::FindGroup ( const std::string &  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::Pvl 

References _FILEINFO_, Isis::PvlObject::BeginGroup(), Isis::PvlObject::EndGroup(), Isis::iException::Message(), Isis::PvlObject::Object(), Isis::PvlContainer::p_filename, Isis::iException::Pvl, and Isis::PvlObject::Traverse.

Isis::PvlGroup & Isis::PvlObject::FindGroup ( const std::string &  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::Pvl 

References _FILEINFO_, Isis::PvlObject::BeginGroup(), Isis::PvlObject::EndGroup(), Isis::iException::Message(), Isis::PvlObject::Object(), Isis::PvlContainer::p_filename, Isis::iException::Pvl, and Isis::PvlObject::Traverse.

ConstPvlGroupIterator Isis::PvlObject::FindGroup ( const std::string &  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 std::string &  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::ProcessMosaic::AddBandBinGroup(), Isis::ApolloMetricCamera::ApolloMetricCamera(), Isis::ProjectionFactory::Create(), Isis::Cube::create(), Isis::ProjectionFactory::CreateForCube(), Isis::ProjectionFactory::CreateFromCube(), Isis::CTXCamera::CTXCamera(), Isis::CubeIoHandler::CubeIoHandler(), Isis::DawnFcCamera::DawnFcCamera(), Isis::DawnVirCamera::DawnVirCamera(), Isis::PvlObject::DeleteGroup(), Isis::Equirectangular::Equirectangular(), KernelDb::FindAll(), Isis::CubeViewport::getBandFilterName(), Isis::ProcessMosaic::GetBandIndex(), Isis::Cube::getGroup(), GetPlugin(), Isis::GroundGrid::GroundGrid(), Isis::Camera::GroundRange(), 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::Stretch::Load(), Isis::Preference::Load(), 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::ProcessMosaic::MatchBandBinGroup(), KernelDb::Matches(), Isis::MdisCamera::MdisCamera(), Isis::Mercator::Mercator(), Isis::iException::Message(), Isis::MiniRF::MiniRF(), Isis::Process::MissionData(), Isis::MocNarrowAngleCamera::MocNarrowAngleCamera(), Isis::MocWideAngleCamera::MocWideAngleCamera(), Isis::NirCamera::NirCamera(), Isis::ObliqueCylindrical::ObliqueCylindrical(), Isis::Cube::open(), Isis::Orthographic::Orthographic(), Isis::PvlTranslationTable::OutputName(), Isis::PvlTranslationTable::OutputPosition(), Isis::ControlNetValidMeasure::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::UserInterface::SaveHistory(), Isis::Sensor::Sensor(), 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::Projection::TargetRadii(), Isis::Filename::Temporary(), Isis::Pipeline::TemporaryFolder(), Isis::ThemisIrCamera::ThemisIrCamera(), Isis::ThemisVisCamera::ThemisVisCamera(), Isis::PvlTranslationTable::Translate(), Isis::ProcessImportPds::TranslatePdsProjection(), Isis::TransverseMercator::TransverseMercator(), Isis::UvvisCamera::UvvisCamera(), Isis::PvlObject::ValidateObject(), Isis::Pvl::ValidatePvl(), Isis::VikingCamera::VikingCamera(), Isis::VimsCamera::VimsCamera(), and Isis::VoyagerCamera::VoyagerCamera().

PvlContainer::ConstPvlKeywordIterator Isis::PvlContainer::FindKeyword ( const std::string &  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 std::string &  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 std::string &  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::Pvl The keyword doesn't exist.

References _FILEINFO_, Isis::PvlContainer::Begin(), Isis::PvlContainer::End(), Isis::PvlContainer::FindKeyword(), Isis::iException::Message(), Isis::PvlContainer::Name(), Isis::PvlContainer::p_filename, Isis::iException::Pvl, and Isis::PvlContainer::Type().

Isis::PvlKeyword & Isis::PvlContainer::FindKeyword ( const std::string &  name  )  [inherited]
PvlKeyword & Isis::PvlObject::FindKeyword ( const std::string &  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::Pvl 

References _FILEINFO_, Isis::PvlContainer::Begin(), Isis::PvlContainer::End(), g, Isis::PvlObject::Group(), Isis::iException::Message(), Isis::PvlObject::None, Isis::PvlObject::Object(), Isis::PvlContainer::p_filename, and Isis::iException::Pvl.

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

const PvlObject & Isis::PvlObject::FindObject ( const std::string &  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::Pvl 

References _FILEINFO_, Isis::PvlObject::BeginObject(), Isis::PvlObject::EndObject(), Isis::iException::Message(), Isis::PvlObject::Object(), Isis::PvlContainer::p_filename, Isis::iException::Pvl, and Isis::PvlObject::Traverse.

PvlObject & Isis::PvlObject::FindObject ( const std::string &  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::Pvl 

References _FILEINFO_, Isis::PvlObject::BeginObject(), Isis::PvlObject::EndObject(), Isis::iException::Message(), Isis::PvlObject::Object(), Isis::PvlContainer::p_filename, Isis::iException::Pvl, and Isis::PvlObject::Traverse.

ConstPvlObjectIterator Isis::PvlObject::FindObject ( const std::string &  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 std::string &  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::ProcessMosaic::AddBandBinGroup(), Isis::ProcessMosaic::AddDefaultBandBinGroup(), Isis::AlbedoAtm::AlbedoAtm(), Isis::AtmosModel::AtmosModel(), Isis::AutoReg::AutoReg(), Isis::Camera::Camera(), Isis::CubeIoHandler::CubeIoHandler(), Isis::CubeTileHandler::CubeTileHandler(), Isis::Cube::deleteGroup(), Isis::PvlObject::DeleteObject(), KernelDb::FindAll(), Isis::MosaicSceneWidget::fromPvl(), Isis::CubeViewport::getBandFilterName(), Isis::Cube::getGroup(), Isis::Hapke::Hapke(), Isis::Cube::hasGroup(), Isis::PvlObject::HasObject(), Isis::Cube::isProjected(), Isis::ProcessMosaic::MatchDEMShapeModel(), KernelDb::Matches(), 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::SpectralPlotTool::refreshPlot(), 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::SubArea::UpdateLabel(), Isis::CubeTileHandler::updateLabels(), Isis::CubeBsqHandler::updateLabels(), Isis::SpectralPlotTool::updateTool(), Isis::PvlObject::ValidateObject(), and Isis::Pvl::ValidatePvl().

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<<().

void * Isis::Plugin::GetPlugin ( const std::string &  group  ) 

This method returns a void pointer to a C function (i.e., the plugin) It does this by looking in itself (Pvl) for the keyword LIBRARY and the keyword ROUTINE.

When you write this function make sure to place extern "C" infront of it to eliminate C++ symbol mangling.

Parameters:
group The group name.
Returns:
A void pointer to a C function (i.e., the plugin)
History:
2010-03-16 Tracie Sucharski, Added paths to plugin. First try to load from current working directory, then from $ISISROOT/lib.

References _FILEINFO_, Isis::Filename::Expanded(), Isis::PvlObject::FindGroup(), g, Isis::iException::Message(), and Isis::iException::System.

Referenced by Isis::ProjectionFactory::Create().

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::Pvl 

References _FILEINFO_, Isis::Message::ArraySubscriptNotInRange(), Isis::iException::Message(), 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 std::string &  name  )  const [inline, inherited]
bool Isis::PvlContainer::HasKeyword ( const std::string &  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::PvlContainer::AddKeyword(), Isis::PvlTranslationTable::AddTable(), Isis::AlbedoAtm::AlbedoAtm(), Isis::AtmosModel::AtmosModel(), Isis::Camera::Camera(), IsisAml::CommandLine(), Isis::ControlNetFilter::CubeConvexHullFilter(), Isis::ControlNetFilter::CubeDistanceFilter(), Isis::ControlNetFilter::CubeNameExpressionFilter(), Isis::ControlNetFilter::CubeNumPointsFilter(), Isis::Equirectangular::Equirectangular(), KernelDb::FindAll(), Isis::CubeViewport::getBandFilterName(), Isis::GroundGrid::GroundGrid(), Isis::Camera::GroundRange(), Isis::Hapke::Hapke(), Isis::Spice::HasKernels(), 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::Preference::Load(), Isis::LoMediumCamera::LoMediumCamera(), Isis::Projection::Mapping(), Isis::ProcessMosaic::MatchBandBinGroup(), Isis::ProcessMosaic::MatchDEMShapeModel(), KernelDb::Matches(), Isis::Mercator::Mercator(), Isis::iException::Message(), Isis::ObliqueCylindrical::ObliqueCylindrical(), Isis::Orthographic::Orthographic(), Isis::PvlTranslationTable::OutputName(), Isis::PvlTranslationTable::OutputPosition(), 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::SpectralPlotTool::refreshPlot(), Isis::AutoReg::RegTemplate(), Isis::Sensor::Sensor(), Isis::ProcessMapMosaic::SetOutputCube(), Isis::Shade::Shade(), Isis::ShadeAtm::ShadeAtm(), Isis::SimpleCylindrical::SimpleCylindrical(), Isis::Sinusoidal::Sinusoidal(), Isis::Projection::TargetRadii(), Isis::Filename::Temporary(), Isis::ThemisIrCamera::ThemisIrCamera(), Isis::Topo::Topo(), Isis::TopoAtm::TopoAtm(), Isis::ControlNetFileV0002::ToPvl(), Isis::PvlTranslationTable::Translate(), Isis::PvlTranslationManager::Translate(), Isis::TransverseMercator::TransverseMercator(), Isis::SubArea::UpdateLabel(), Isis::SpectralPlotTool::updateTool(), Isis::PvlContainer::ValidateAllKeywords(), Isis::PvlObject::ValidateObject(), Isis::Pvl::ValidatePvl(), Isis::ControlNetValidMeasure::ValidatePvlDN(), Isis::ControlNetValidMeasure::ValidatePvlEmissionAngle(), Isis::ControlNetValidMeasure::ValidatePvlFromEdge(), Isis::ControlNetValidMeasure::ValidatePvlIncidenceAngle(), Isis::ControlNetValidMeasure::ValidatePvlResidualTolerances(), Isis::ControlNetValidMeasure::ValidatePvlResolution(), Isis::ControlNetValidMeasure::ValidatePvlShiftTolerances(), and Isis::PvlContainer::ValidateRepeatOption().

bool Isis::PvlObject::HasKeyword ( const std::string &  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::MosaicAreaTool::fromPvl(), Isis::ProcessMosaic::GetTrackStatus(), Isis::Cube::hasTable(), Isis::Cube::open(), Isis::operator<<(), Isis::Spice::readStoredValue(), Isis::ProcessMosaic::SetMosaicOrigin(), Isis::Spice::storeValue(), Isis::PvlFormat::Type(), Isis::PvlObject::ValidateObject(), and Isis::Pvl::ValidatePvl().

bool Isis::PvlObject::HasObject ( const std::string &  name  )  const [inline, inherited]
int Isis::PvlContainer::Indent (  )  [inline, inherited]
bool Isis::PvlContainer::IsNamed ( const std::string &  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 KernelDb::FindAll(), Isis::Cube::hasTable(), Isis::IsBlob(), Isis::Process::SetOutputCube(), and Isis::Process::WriteHistory().

int Isis::PvlContainer::Keywords (  )  const [inline, inherited]
std::string 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(), Isis::iException::Message(), 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 std::string &  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().

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::iException::Message(), Isis::PvlContainer::p_keywords, and Isis::iException::Programmer.

const PvlKeyword& Isis::PvlContainer::operator[] ( const std::string &  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[]().

Isis::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::iException::Message(), Isis::PvlContainer::p_keywords, and Isis::iException::Programmer.

PvlKeyword& Isis::PvlContainer::operator[] ( const std::string &  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 std::string &  file  )  [inherited]
void Isis::PvlContainer::SetFilename ( const std::string &  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::PvlContainer::SetFormatTemplate ( PvlContainer ref  )  [inline, inherited]
void Isis::Pvl::SetFormatTemplate ( const std::string &  filename  )  [inherited]
void Isis::Pvl::SetFormatTemplate ( Isis::Pvl temp  )  [inherited]
void Isis::PvlContainer::SetIndent ( int  indent  )  [inline, inherited]
void Isis::PvlContainer::SetName ( const std::string &  name  )  [inline, inherited]
void Isis::Pvl::SetTerminator ( const std::string &  term  )  [inline, inherited]

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

Parameters:
term The user-defined terminator

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

std::string Isis::Pvl::Terminator (  )  const [inline, inherited]

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

Returns:
The terminator used by the Pvl object.

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

std::string 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::iException::Message(), Isis::PvlKeyword::Name(), Isis::iException::User, Isis::PvlKeyword::ValidateKeyword(), and Isis::PvlContainer::ValidateRepeatOption().

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

void Isis::PvlObject::ValidateObject ( PvlObject pPvlObj  )  [inherited]
void Isis::Pvl::ValidatePvl ( const Pvl pPvl,
Pvl pPvlResults 
) [inherited]
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 std::string &  file  )  [inherited]

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::iException::Message(), Isis::PvlContainer::SetFormat(), and Isis::Pvl::Terminator().

Referenced by Isis::Stretch::Save(), Isis::UserInterface::SaveHistory(), Isis::MosaicController::saveProject(), and Isis::ControlNetVersioner::Write().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
Isis::PvlObject object 
) [friend, inherited]

Outputs the PvlObject data to a specified output stream.

Parameters:
os The output stream to write to.
object The PvlObject to send to the output stream.
std::ostream& operator<< ( std::ostream &  os,
Isis::Pvl pvl 
) [friend, inherited]

This stream will not handle the end of line sequence.

Parameters:
os 
pvl 
Returns:
ostream&
std::istream& operator>> ( std::istream &  is,
PvlObject result 
) [friend, inherited]

This method reads a PvlObject from the input stream.

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

Reads keywords from the instream and appends them to the Pvl object.

Parameters:
is A specified instream to read from.
pvl The Pvl object to append to.
Exceptions:
iException Invalid PVL format specified.
Returns:
Returns the entered instream after reading from it.

Member Data Documentation

std::string Isis::PvlContainer::p_filename [protected, inherited]
PvlKeyword Isis::PvlContainer::p_name [protected, inherited]

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