Isis Developer Reference
Isis::Strategy Class Reference

Strategy - Supports algorithm development. More...

#include <Strategy.h>

Collaboration diagram for Isis::Strategy:
Collaboration graph

Public Member Functions

 Strategy ()
 Constructs default Strategy object of name "Strategy" and type "Counter".
 
 Strategy (const PvlObject &definition, const ResourceList &globals)
 Constructs Strategy object from the given definition pvl and shared resource globals.
 
virtual ~Strategy ()
 Destroys the Strategy object.
 
QString name () const
 Accessor method to get the name of the strategy.
 
QString type () const
 Accessor method to get the type of strategy.
 
QString description () const
 Return description for the strategy.
 
int apply (ResourceList &resources)
 Apply algorithm to resource list.
 
int apply (SharedResource &resource)
 Apply algorithm to Resource.
 
virtual int apply (ResourceList &resources, const ResourceList &globals)
 Apply strategy algorithms to list of Resources.
 
virtual int apply (SharedResource &resource, const ResourceList &globals)
 This method applies the strategy algorithms to the data stored in the given shared resource.
 
unsigned int totalProcessed () const
 Accessor for the total number of resources processed.
 

Protected Types

typedef QSharedPointer< PvlObjectSharedPvlObject
 Definition for a SharedPvlObject, a shared pointer to a PvlObject.
 

Protected Member Functions

 Strategy (const QString &name, const QString &type)
 Constructs a Strategy object from the given name, type, and shared resource globals.
 
void setName (const QString &name)
 Allow derived strategies to reset name (mostly for default constructors)
 
void setType (const QString &type)
 Allow derived strategies to reset type (mostly for default constructors)
 
ResourceList getGlobalDefaults () const
 Accessor method to get the global defaults.
 
ResourceList getGlobals (SharedResource &myGlobals, const ResourceList &globals) const
 
const PvlObjectgetDefinition () const
 
PvlFlatMap getDefinitionMap () const
 Returns the keyword definitions found in the Strategy object.
 
void setApplyToDiscarded ()
 Sets Resource as discarded.
 
bool isApplyToDiscarded () const
 Accessor for the apply discarded variable.
 
void setDoNotApplyToDiscarded ()
 Disables the general application of Strategy algorithm for all Resources regardless of state.
 
int applyToResources (ResourceList &resources, const ResourceList &globals)
 Applies the strategy algorithms to the resources in the given list.
 
unsigned int processed ()
 Increments the total number of resources processed and returns the incremented value.
 
void resetProcessed ()
 Resets the total number of processed resources to zero.
 
int countActive (const ResourceList &resources) const
 Counts the number of active (i.e.
 
int countDiscarded (const ResourceList &resources) const
 Counts the number of non-active (i.e.
 
ResourceList assetResourceList (const SharedResource &resource, const QString &name) const
 Searches the given resource for an asset with the given name and converts it to a ResourceList, if possible.
 
QString findReplacement (const QString &target, const ResourceList &globals, const int &index=0, const QString &defValue="") const
 Find keyword replacement value in globals list.
 
QStringList qualifiers (const QString &keyspec, const QString &delimiter="::") const
 Splits the given keyspec string into a list using the given delimiter string.
 
QString scanAndReplace (const QString &input, const QString &target, const QString &replacement) const
 Performs a case insensitive scan of the input string for a substring matching the target string and replaces the target substring with the replacement string.
 
QString translateKeywordArgs (const QString &value, const ResourceList &globals, const QString &defValue="") const
 Translates the arguments of the PVL keyword in the PVL definition object.
 
QString processArgs (const QString &value, const QStringList &argKeys, const ResourceList &globals, const QString &defValue="") const
 Processes the given string value using the given argument list, resource and default resource.
 
void propagateKeys (SharedResource &source, SharedResource &target) const
 Adds the PVL definition keywords from the source to the target.
 
SharedResource composite (SharedResource &resourceA, SharedResource &resourceB, const QPair< QString, QString > &keySuffix=qMakePair(QString("A"), QString("B"))) const
 Create a composite Resource from a pair by merging keywords.
 
bool importGeometry (SharedResource &resource, const ResourceList &globals) const
 Imports a geometry from the given resource.
 
ResourceList activeList (ResourceList &resources) const
 Get list of all active Resources only - no discarded Resources.
 
void activateList (ResourceList &resources) const
 Activate all resources contained in the resource list.
 
void deactivateList (ResourceList &resources) const
 Deactivate all resources contained in the resource list.
 
ResourceList copyList (const ResourceList &resources) const
 Make a copy of the resource list that is independently managed.
 
ResourceList cloneList (const ResourceList &resources, const bool &withAssets=false) const
 Create a clone of a Resource list.
 
int applyToIntersectedGeometry (ResourceList &resources, GisGeometry &geom, const ResourceList &globals)
 Identify and apply Strategy to Resources that intersect a geometry.
 
bool isDebug () const
 An accessor method so that inherited classes can determine whether to print debug messages for this object.
 
bool doShowProgress () const
 
bool initProgress (const int &nsteps=0, const QString &text="")
 Initializes strategy progress monitor if requested by user.
 
QStringList getObjectList (const PvlObject &object) const
 
template<class STRATEGYLIST , class STRATEGYFACTORY >
STRATEGYLIST LoadMinerStrategies (const QString &minerName, const ResourceList &globals) const
 

Static Protected Member Functions

static void queryCallback (void *item, void *userdata)
 Important GEOS query callback for class and overlap geometry.
 

Detailed Description

Strategy - Supports algorithm development.

This base class provides a framework to develop strategic planning tools used to process and/or rank ISIS resources.

The ISIS resource can be cubes, PVLs (e.g., PDS/EDRs, etc), CSV files or virtually any other resource type simply by adding support in the Resources type class.

This default implementation is simply a LessThan function for real data types

  • likely on to the more heavily used function evaluators.

The Users may provide values for the following influential keywords in the Pvl Stategy configuration:

Object = Strategy
Name = Emission
Type = Calculator
Equation = "((EmissionAngle > 20) && (EmissionAngle < 80))"
Result = EmissionCriteria
EndObject
Calculator for arrays.
Definition Calculator.h:55
Strategy - Supports algorithm development.
Definition Strategy.h:85
Author
2012-07-15 Kris Becker

Member Typedef Documentation

◆ SharedPvlObject

Definition for a SharedPvlObject, a shared pointer to a PvlObject.

Constructor & Destructor Documentation

◆ Strategy() [1/3]

Isis::Strategy::Strategy ( )

Constructs default Strategy object of name "Strategy" and type "Counter".

Debug and apply discarded are set to false.

◆ Strategy() [2/3]

Isis::Strategy::Strategy ( const PvlObject & definition,
const ResourceList & globals )

Constructs Strategy object from the given definition pvl and shared resource globals.

Strategy name, strategy type, debug, and apply discarded values are read from the pvl. If not found in the PVL, debug and apply discarded are set to false.

Example PVL:

Object = Strategy
Name = Emission
Type = Calculator
Equation = "((EmissionAngle > 20) && (EmissionAngle < 80))"
Result = EmissionCriteria
ApplyToDiscarded = true
Debug = false
EndObject
Parameters
definitionA PVL that defines the strategy.
globalsA shared pointer to a global Resource of keywords.

References getDefinitionMap(), initProgress(), and Isis::toBool().

◆ ~Strategy()

Isis::Strategy::~Strategy ( )
virtual

Destroys the Strategy object.

◆ Strategy() [3/3]

Isis::Strategy::Strategy ( const QString & name,
const QString & type )
protected

Constructs a Strategy object from the given name, type, and shared resource globals.

Debug and apply discarded are set to false.

Parameters
nameA string containing the strategy name.
typeA string containing the strategy type.

Member Function Documentation

◆ activateList()

void Isis::Strategy::activateList ( ResourceList & resources) const
protected

Activate all resources contained in the resource list.

Parameters
resourcesA list of resources to activate.

◆ activeList()

ResourceList Isis::Strategy::activeList ( ResourceList & resources) const
protected

Get list of all active Resources only - no discarded Resources.

Parameters
resourcesA list of resources to check.
Returns
ResourceList A list of active resouces from the given list.

Referenced by applyToIntersectedGeometry().

◆ apply() [1/4]

int Isis::Strategy::apply ( ResourceList & resources)

Apply algorithm to resource list.

This method is used to initiate the Strategy algorithm implemented by deriving Strategy for a list of Resources.

History
2015-05-27 Kris Becker
Parameters
resourcesList of resources to be processed by the Strategy algorithm
Returns
int Number of Resources processed by the algorithm

References apply(), and getGlobalDefaults().

Referenced by apply(), apply(), applyToIntersectedGeometry(), and applyToResources().

◆ apply() [2/4]

int Isis::Strategy::apply ( ResourceList & resources,
const ResourceList & globals )
virtual

Apply strategy algorithms to list of Resources.

This method iterates once through all Resources contained in the list. Resources that have been discarded are filtered out unless users/strategies opt to process all resources.

By making the actual iteration of Resources a separate method, this allows other strategies to derive this virtual return to give them a change to do something meaninful prior to processing the Resource list, but retain behavior in counts and calls to the Resource applicator.

See also
applyToResources(ResourceList &resources, ResourceList &globals)
Author
2013-01-30 Kris Becker
Parameters
resourcesA list of resources to which the strategy will be applied.
Returns
int The number of resources processed.

References applyToResources().

◆ apply() [3/4]

int Isis::Strategy::apply ( SharedResource & resource)

Apply algorithm to Resource.

This method is used to initiate the Strategy algorithm implemented by deriving Strategy for a Resources.

History
2015-05-27 Kris Becker
Parameters
resourceResource to be processed by the Strategy algorithm
Returns
int Number of Resources processed by the algorithm

References apply(), and getGlobalDefaults().

◆ apply() [4/4]

int Isis::Strategy::apply ( SharedResource & resource,
const ResourceList & globals )
virtual

This method applies the strategy algorithms to the data stored in the given shared resource.

Parameters
resourceA resource to which the strategy will be applied.
Returns
int The number of resources processed, i.e. 1.

References isDebug().

◆ applyToIntersectedGeometry()

int Isis::Strategy::applyToIntersectedGeometry ( ResourceList & resources,
GisGeometry & geom,
const ResourceList & globals )
protected

Identify and apply Strategy to Resources that intersect a geometry.

This method applies the Strategy::apply(SharedResource &) method for all Resources whose geometry intersect the given geometry. This method uses a very efficient RTree implementation in GEOS to determine geometries that intersect each others envelope (a minimal boundary for a geometry). There is a significant performance increase (up to 30% or more) achieved by using this method over direct intersection and operation techniques.

However, since this is typically done once, it is not advantageous to create an index and then search it doing essentially the same operation as the evaluation of the RTree. Therefore a direct intersection loop is available and applied by default. The use of the RTree method can be selected by a user preferenced keyword. Set GisMethod = Indexed. The default is GisMethod = Direct.

This method only acts upon active Resources, so be sure to provide the appropriate state of Resources in the list provided.

It will discard all Resources prior to call the GEOS intersection query. When a Resources is identified to intersect, it makes in active again prior to calling the Strategy::apply(SharedResource &) method. Note that the implementation of the apply(SharedResource &) should further check for false postives as the envelope used in the RTree method may not be as accurate as is required for a robust intersection of GIS geometries.

Author
2013-02-23 Kris Becker
Parameters
resourcesA list of resources to which the strategy will be applied.
geomA reference to the GIS geometry to be intersected.
globalsGlobal parameter pool for keyword translation
Returns
int The number of resources processed.
Exceptions
IException::Programmer"Cannot apply RTree search to bad geometry."

References _FILEINFO_, activeList(), apply(), deactivateList(), Isis::GisGeometry::geometry(), Isis::PvlFlatMap::get(), getDefinitionMap(), initProgress(), Isis::GisGeometry::intersects(), isDebug(), Isis::GisGeometry::isValid(), name(), processed(), Isis::IException::Programmer, queryCallback(), Isis::toString(), and type().

◆ applyToResources()

int Isis::Strategy::applyToResources ( ResourceList & resources,
const ResourceList & globals )
protected

Applies the strategy algorithms to the resources in the given list.

Parameters
resourcesA list of resources to which the strategy will be applied.
globalsA list of global resources.
Returns
int The number of resources processed.

References apply(), countActive(), initProgress(), isApplyToDiscarded(), and processed().

Referenced by apply().

◆ assetResourceList()

ResourceList Isis::Strategy::assetResourceList ( const SharedResource & resource,
const QString & name ) const
protected

Searches the given resource for an asset with the given name and converts it to a ResourceList, if possible.

Parameters
resourceThe resource to be searched
nameThe name of the asset being searched for
Returns
ResourceList If the asset can be converted to a ResourceList, it is returned. Otherwise an empty ResourceList is returned.

References name().

◆ cloneList()

ResourceList Isis::Strategy::cloneList ( const ResourceList & resources,
const bool & withAssets = false ) const
protected

Create a clone of a Resource list.

This method creates a clone of the resources where an independent copy of the Resource data is created from its parent. Assets are optional created as well, but can be retained if desired. Any shared components are simply copied as well and can be individually managed if desired.

This creates new data for all copies the parent for each resource. All Resources are set to an active state upon cloning.

Author
2015-09-27 Kris Becker
Parameters
resourcesList of resources to clone
withAssetsIf true, assets are retained, otherwise they are deleted from the cloned Resource.
Returns
ResourceList List of cloned Resources

◆ composite()

SharedResource Isis::Strategy::composite ( SharedResource & resourceA,
SharedResource & resourceB,
const QPair< QString, QString > & keySuffix = qMakePair(QString("A"),QString("B")) ) const
protected

Create a composite Resource from a pair by merging keywords.

This method will create a composite Resource from two resources my merging the keywords from both resources. Users can provide a list of keywords they would like to merge by providing the PropogateKeywords Strategy keyword in the definition section. If not provided or empty, all keywords in each Resource is propagated.

Keywords from each resource are distinguished by appending a suffix to the name of each keyword propagated. For example, the default suffix for resourceA is "A" and resourceB is "B". If the keyword named "Emission" exists in both resourceA and resourceB then two keywords wind up in the composite resource as "EmissionA" and "EmissionB".

The name of the composite resource is the name of resourceA and resourceB separated by an "_".

Author
2015-03-28 Kris Becker
Parameters
resourceAFirst resource
resourceBSecond resource
keySuffixString pair specifying the suffix to append to the keywords originating from each Resource Defaults: ("A", "B")
Returns
SharedResource Composite Resource of combined keywords

References Isis::PvlFlatMap::allValues(), composite(), getDefinitionMap(), Isis::PvlKeyword::name(), and Isis::PvlKeyword::setName().

Referenced by composite().

◆ copyList()

ResourceList Isis::Strategy::copyList ( const ResourceList & resources) const
protected

Make a copy of the resource list that is independently managed.

This method creates a copy of the resources but provides independent management of its status from its parent. All Resource data, name, keywords, assets and geometry, are copied to the new Resource list created. Its current status is also copied.

This allows the same data for all copies to be shared but the active/discard status to be managed in each copy independently of the parent for each resource.

This is really useful for strategies such as AssetSideBar.

Author
2015-09-27 Kris Becker
Parameters
resourcesInput list of Resources to copy
Returns
resources of copied (data) Resources

◆ countActive()

int Isis::Strategy::countActive ( const ResourceList & resources) const
protected

Counts the number of active (i.e.

not discarded) resources in the given list.

Parameters
resourcesA list of resources to count.
Returns
int The number of resources in the given list that are not set to discarded.

References countDiscarded().

Referenced by applyToResources().

◆ countDiscarded()

int Isis::Strategy::countDiscarded ( const ResourceList & resources) const
protected

Counts the number of non-active (i.e.

discarded) resources in the given list.

Parameters
resourcesA list of resources to count.
Returns
int The number of resources in the given list that are set to discarded.

Referenced by countActive().

◆ deactivateList()

void Isis::Strategy::deactivateList ( ResourceList & resources) const
protected

Deactivate all resources contained in the resource list.

Parameters
resourcesA list of resources to discard.

Referenced by applyToIntersectedGeometry().

◆ description()

QString Isis::Strategy::description ( ) const

Return description for the strategy.

If a Description keyword exists in the PvlObject definition of the strategy, this is returned to the caller. If it doesn't exist, it will provide a simple description made up of its name and type.

Author
2015-03-28 Kris Becker
Returns
QString Description for this strategy

References name(), and type().

◆ doShowProgress()

bool Isis::Strategy::doShowProgress ( ) const
protected
Returns
bool

Referenced by initProgress(), and processed().

◆ findReplacement()

QString Isis::Strategy::findReplacement ( const QString & target,
const ResourceList & globals,
const int & index = 0,
const QString & defValue = "" ) const
protected

Find keyword replacement value in globals list.

Author
2015-05-07 Kris Becker
Parameters
globalsResourceList A list of resources to be searched.
targetQString The keyword of the target resource.
indexint The index of the last resource in the list with keyword == target.
defValueQString The value to return in the event the resource is not found.
Returns
QString

Referenced by processArgs().

◆ getDefinition()

const PvlObject & Isis::Strategy::getDefinition ( ) const
protected

Referenced by LoadMinerStrategies().

◆ getDefinitionMap()

PvlFlatMap Isis::Strategy::getDefinitionMap ( ) const
protected

Returns the keyword definitions found in the Strategy object.

Author
2015-06-12 Kris Becker
Returns
PvlFlatMap Set of keywords found in strategy object

References getObjectList(), and Isis::PvlConstraints::withExcludes().

Referenced by applyToIntersectedGeometry(), composite(), importGeometry(), initProgress(), propagateKeys(), Strategy(), and translateKeywordArgs().

◆ getGlobalDefaults()

ResourceList Isis::Strategy::getGlobalDefaults ( ) const
protected

Accessor method to get the global defaults.

Returns
ResourceList containing the global defaults.

Referenced by apply(), and apply().

◆ getGlobals()

ResourceList Isis::Strategy::getGlobals ( SharedResource & myGlobals,
const ResourceList & globals ) const
protected
History
kbecker (5/11/2015)
Parameters
myGlobalsAdditional source for keyword translation
globalsPre-exiting global pool to add myGlobals
Returns
ResourceList

Referenced by importGeometry().

◆ getObjectList()

QStringList Isis::Strategy::getObjectList ( const PvlObject & object) const
protected

Referenced by getDefinitionMap().

◆ importGeometry()

bool Isis::Strategy::importGeometry ( SharedResource & resource,
const ResourceList & globals ) const
protected

Imports a geometry from the given resource.

By default, this method searches the definition PVL object for a GisGeometry keyword. If the PVL contains either the GisGeometryRef or the GisGeometryKey keywords, then the value is used to search the resource's flat map for the geometry. Then, if the RemoveGisKeywordAfterImport keyword is set to true in the PVL, the resource erases the keyword from the flat map.

If a geometry is found, the PVL is searched for a GisGeometryArgs keyword and the arguments are processed, if they exist. Next, the GisType is read from the PVL. The geometry and type are used to construct a GIS geometry and add it to the resource.

Parameters
resourceA shared pointer to the resource from which the geometry will be imported.
globalsThe resource list to be searched.
Returns
bool Indicates whether the geometry was successfully imported.

References Isis::PvlFlatMap::allValues(), Isis::PvlFlatMap::exists(), Isis::PvlFlatMap::get(), getDefinitionMap(), getGlobals(), isDebug(), name(), Isis::GisGeometry::points(), processArgs(), Isis::GisGeometry::simplify(), Isis::toBool(), Isis::toDouble(), Isis::toString(), translateKeywordArgs(), Isis::GisGeometry::type(), and type().

◆ initProgress()

bool Isis::Strategy::initProgress ( const int & nsteps = 0,
const QString & text = "" )
protected

Initializes strategy progress monitor if requested by user.

This method will set up progress monitoring for the user if the "ShowProgress" keyword exists and is set to "True" in any strategy Pvl configuration.

The processed() method will apply status checking to measure progress. For consistency purposes, the resetProcessed() method is always called which resets the internal resource process count to 0.

Strategy implementors must initialize using this method if they rederive apply(ResourceList &resources) or they do not call applyToResources(ResourceList &resources) or appyToIntersectedGeoemtry(ResourceList &resources).

Author
2015-04-02 Kris Becker
Parameters
nstepsNumber of steps to set for progress
textOptional text to set progress message to
Returns
bool True if progress is initialized based upon user preference

References doShowProgress(), getDefinitionMap(), name(), resetProcessed(), Isis::toBool(), and type().

Referenced by applyToIntersectedGeometry(), applyToResources(), and Strategy().

◆ isApplyToDiscarded()

bool Isis::Strategy::isApplyToDiscarded ( ) const
protected

Accessor for the apply discarded variable.

Returns
bool Indicates whether the object will apply strategy algorithms to discarded resources.

Referenced by applyToResources().

◆ isDebug()

bool Isis::Strategy::isDebug ( ) const
protected

An accessor method so that inherited classes can determine whether to print debug messages for this object.

Returns
bool Indicates whether to print debug messages for this object.

Referenced by apply(), applyToIntersectedGeometry(), and importGeometry().

◆ LoadMinerStrategies()

template<class STRATEGYLIST , class STRATEGYFACTORY >
STRATEGYLIST Isis::Strategy::LoadMinerStrategies ( const QString & minerName,
const ResourceList & globals ) const
inlineprotected

◆ name()

QString Isis::Strategy::name ( ) const

Accessor method to get the name of the strategy.

Returns
QString A string containing the strategy's name.

Referenced by applyToIntersectedGeometry(), assetResourceList(), description(), importGeometry(), initProgress(), and setName().

◆ processArgs()

QString Isis::Strategy::processArgs ( const QString & value,
const QStringList & argKeys,
const ResourceList & globals,
const QString & defValue = "" ) const
protected

Processes the given string value using the given argument list, resource and default resource.

For each argument in the given list, the target string "%i" (where i is the argument number) is replaced with the resource's keyword value corresponding to the argument. If this value doesn't exist, then the default resource's keyword value is used. If both fail, then the target string is replaced with "NULL"

Parameters
valueA keyword value to modified using the given argument list and resources.
argKeysA list of string arguments representing the resource values to be found in the resource's PVL flat map.
globalsA list of resources that will be searched.
defValueA pointer to the default resource whose PVL flat map will be searched for the arguments if they are not found in the main resource PVL flat map.
Returns
QString The modified string value.

References findReplacement(), and scanAndReplace().

Referenced by importGeometry(), and translateKeywordArgs().

◆ processed()

unsigned int Isis::Strategy::processed ( )
protected

Increments the total number of resources processed and returns the incremented value.

Returns
int The number of resources processed.

References doShowProgress().

Referenced by applyToIntersectedGeometry(), and applyToResources().

◆ propagateKeys()

void Isis::Strategy::propagateKeys ( SharedResource & source,
SharedResource & target ) const
protected

Adds the PVL definition keywords from the source to the target.

This creates a PVL flat map from the definition pvl. All of the keywords in the map that are also in the source resource are added to the target resource.

Parameters
sourceA reference to the resource to be copied from.
targetA reference to the resource to be added to.

References Isis::PvlFlatMap::allValues(), and getDefinitionMap().

◆ qualifiers()

QStringList Isis::Strategy::qualifiers ( const QString & keyspec,
const QString & delimiter = "::" ) const
protected

Splits the given keyspec string into a list using the given delimiter string.

Parameters
keyspecThe string to be split.
delimiterA string containing the characters used to specify the boundary by which to split the string.
Returns
QStringList The list of strings that were split from the given keyspec string using the given delimiter string.

◆ queryCallback()

void Isis::Strategy::queryCallback ( void * item,
void * userdata )
staticprotected

Important GEOS query callback for class and overlap geometry.

This method accumulates the resources that are determined to potentially overlap the resource geometry provided in the GEOS query.

This implementation may not be portable or safe. It most certainly is not threadable. (I am open for suggestions on how to do this better...)

Author
2015-03-27 Kris Becker
Parameters
itemResource to add to overlap list
userdataResourceList to contain overlapping geoemetries

Referenced by applyToIntersectedGeometry().

◆ resetProcessed()

void Isis::Strategy::resetProcessed ( )
protected

Resets the total number of processed resources to zero.

Referenced by initProgress().

◆ scanAndReplace()

QString Isis::Strategy::scanAndReplace ( const QString & input,
const QString & target,
const QString & replacement ) const
protected

Performs a case insensitive scan of the input string for a substring matching the target string and replaces the target substring with the replacement string.

Parameters
inputThe input string to be modified.
targetThe string pattern to find in the input string.
replacementThe string pattern that will replace the target string pattern.
Returns
QString The modified string.

Referenced by processArgs().

◆ setApplyToDiscarded()

void Isis::Strategy::setApplyToDiscarded ( )
protected

Sets Resource as discarded.

This mutator tells the object to not apply strategy algorithms to discarded resources.

◆ setDoNotApplyToDiscarded()

void Isis::Strategy::setDoNotApplyToDiscarded ( )
protected

Disables the general application of Strategy algorithm for all Resources regardless of state.

◆ setName()

void Isis::Strategy::setName ( const QString & name)
protected

Allow derived strategies to reset name (mostly for default constructors)

Parameters
Astring containing the new name of the strategy.

References name().

◆ setType()

void Isis::Strategy::setType ( const QString & type)
protected

Allow derived strategies to reset type (mostly for default constructors)

Parameters
Astring containing the new type of the strategy.

References type().

◆ totalProcessed()

unsigned int Isis::Strategy::totalProcessed ( ) const

Accessor for the total number of resources processed.

Returns
unsigned int The number of resources processed.

◆ translateKeywordArgs()

QString Isis::Strategy::translateKeywordArgs ( const QString & keyBase,
const ResourceList & globals,
const QString & defValue = "" ) const
protected

Translates the arguments of the PVL keyword in the PVL definition object.

This method uses the keyBase string to get the keyword value and populate the argument replacement list. The keyword value is then modified by passing it to processArgs() along with using the argument list, resource, and default resource pointers.

If a keyword does not exist, the string provided by defValue is returned. The empty string is returned in the event that defValue is not given an argument.

Parameters
keyBaseA string containing the base of the keyword name.
globalsA list of resources that will be searched.
defValueThe default value to return if the keyBase does not exist
Returns
QString A modified keyword value with appropriate arguments inserted into the appropriate locations.

References Isis::PvlFlatMap::allValues(), Isis::PvlFlatMap::exists(), Isis::PvlFlatMap::get(), getDefinitionMap(), and processArgs().

Referenced by importGeometry(), and LoadMinerStrategies().

◆ type()

QString Isis::Strategy::type ( ) const

Accessor method to get the type of strategy.

Returns
QString A string containing the strategy's type.

Referenced by applyToIntersectedGeometry(), description(), importGeometry(), initProgress(), and setType().


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