|
Isis Developer Reference
|
Go to the documentation of this file.
13 #include <QScopedPointer>
14 #include <QSharedPointer>
134 const QString &
name)
const;
137 const int &index = 0,
138 const QString &defValue =
"")
const;
140 const QString &delimiter =
"::")
const;
141 QString
scanAndReplace(
const QString &input,
const QString &target,
142 const QString &replacement)
const;
145 const QString &defValue =
"")
const;
148 const QString &defValue =
"")
const;
161 const bool &withAssets =
false)
const;
168 bool initProgress(
const int &nsteps = 0,
const QString &text =
"");
174 template <
class STRATEGYLIST,
class STRATEGYFACTORY>
177 STRATEGYFACTORY *factory = STRATEGYFACTORY::instance();
181 if ( !config.isEmpty() ) {
182 miner = factory->buildRun(config, globals);
185 miner = factory->buildRun(
getDefinition().findObject(minerName+
"Miner"),
212 unsigned int m_total;
216 bool m_applyDiscarded;
222 QScopedPointer<Progress> m_progress;
QString name() const
Returns the keyword name.
Definition: PvlKeyword.h:98
int points() const
Get number of points in geometry.
Definition: GisGeometry.cpp:429
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
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.
Definition: Strategy.cpp:570
bool initProgress(const int &nsteps=0, const QString &text="")
Initializes strategy progress monitor if requested by user.
Definition: Strategy.cpp:1101
A single keyword-value pair.
Definition: PvlKeyword.h:82
ResourceList activeList(ResourceList &resources) const
Get list of all active Resources only - no discarded Resources.
Definition: Strategy.cpp:800
void deactivateList(ResourceList &resources) const
Deactivate all resources contained in the resource list.
Definition: Strategy.cpp:827
Provides a flat map of PvlKeywords.
Definition: PvlFlatMap.h:218
PvlObjectIterator beginObject()
Returns the index of the beginning object.
Definition: PvlObject.h:235
ResourceList cloneList(const ResourceList &resources, const bool &withAssets=false) const
Create a clone of a Resource list.
Definition: Strategy.cpp:882
QStringList getObjectList(const PvlObject &object) const
Definition: Strategy.cpp:1132
const PvlObject & getDefinition() const
Definition: Strategy.cpp:173
ResourceList copyList(const ResourceList &resources) const
Make a copy of the resource list that is independently managed.
Definition: Strategy.cpp:854
Q_DECLARE_METATYPE(Isis::SharedStrategy)
void propagateKeys(SharedResource &source, SharedResource &target) const
Adds the PVL definition keywords from the source to the target.
Definition: Strategy.cpp:593
ResourceList getGlobals(SharedResource &myGlobals, const ResourceList &globals) const
Definition: Strategy.cpp:158
PvlObjectIterator endObject()
Returns the index of the ending object.
Definition: PvlObject.h:253
QMap< QString, PvlKeyword >::const_iterator ConstPvlFlatMapIterator
A const iterator for the underling QMap that PvlFlatMap is built on.
Definition: PvlFlatMap.h:222
Type type() const
Returns the type (origin) of the geometry.
Definition: GisGeometry.cpp:244
ResourceList getGlobalDefaults() const
Accessor method to get the global defaults.
Definition: Strategy.cpp:144
bool exists(const QString &key) const
Determines whether a given keyword exists in the PvlFlatMap.
Definition: PvlFlatMap.cpp:436
const GEOSGeometry * geometry() const
Returns the GEOSGeometry object to extend functionality.
Definition: GisGeometry.cpp:291
int applyToIntersectedGeometry(ResourceList &resources, GisGeometry &geom, const ResourceList &globals)
Identify and apply Strategy to Resources that intersect a geometry.
Definition: Strategy.cpp:929
Strategy()
Constructs default Strategy object of name "Strategy" and type "Counter".
Definition: Strategy.cpp:33
Definition: JigsawWorkOrder.h:28
void setDoNotApplyToDiscarded()
Disables the general application of Strategy algorithm for all Resources regardless of state.
Definition: Strategy.cpp:324
unsigned int processed()
Increments the total number of resources processed and returns the incremented value.
Definition: Strategy.cpp:364
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
QSharedPointer< PvlObject > SharedPvlObject
Definition for a SharedPvlObject, a shared pointer to a PvlObject.
Definition: Strategy.h:108
void resetProcessed()
Resets the total number of processed resources to zero.
Definition: Strategy.cpp:377
Strategy - Supports algorithm development.
Definition: Strategy.h:85
bool importGeometry(SharedResource &resource, const ResourceList &globals) const
Imports a geometry from the given resource.
Definition: Strategy.cpp:704
void activateList(ResourceList &resources) const
Activate all resources contained in the resource list.
Definition: Strategy.cpp:815
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.
Definition: Strategy.cpp:633
Encapsulation class provides support for GEOS-C API.
Definition: GisGeometry.h:50
void setName(QString name)
Sets the keyword name.
Definition: PvlKeyword.cpp:120
QStringList allValues(const QString &key) const
Gets all the values associated with a keyword in the PvlFlatMap.
Definition: PvlFlatMap.cpp:641
static PvlConstraints withExcludes(const QStringList &excludes)
Static method to construct a PvlConstraints object from a list of names for the PvlObjects and PvlGro...
Definition: PvlFlatMap.cpp:54
int applyToResources(ResourceList &resources, const ResourceList &globals)
Applies the strategy algorithms to the resources in the given list.
Definition: Strategy.cpp:337
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
QList< PvlObject >::const_iterator ConstPvlObjectIterator
Definition: PvlObject.h:228
bool isDebug() const
An accessor method so that inherited classes can determine whether to print debug messages for this o...
Definition: Strategy.cpp:1063
QString get(const QString &key, const int &index=0) const
Gets the value of a keyword in the PvlFlatMap.
Definition: PvlFlatMap.cpp:576
QList< SharedStrategy > StrategyList
Definition for a StrategyList, a list of SharedStrategy types.
Definition: Strategy.h:230
GisGeometry * simplify(const double &tolerance) const
Simplify complex or overdetermined geoemtry.
Definition: GisGeometry.cpp:659
int countActive(const ResourceList &resources) const
Counts the number of active (i.e.
Definition: Strategy.cpp:392
QStringList qualifiers(const QString &keyspec, const QString &delimiter="::") const
Splits the given keyspec string into a list using the given delimiter string.
Definition: Strategy.cpp:477
Isis exception class.
Definition: IException.h:91
int countDiscarded(const ResourceList &resources) const
Counts the number of non-active (i.e.
Definition: Strategy.cpp:406
Program progress reporter.
Definition: Progress.h:42
This class provides a resource of PVL keywords for Strategy classes.
Definition: Resource.h:54
bool doShowProgress() const
Definition: Strategy.cpp:1072
QString findReplacement(const QString &target, const ResourceList &globals, const int &index=0, const QString &defValue="") const
Find keyword replacement value in globals list.
Definition: Strategy.cpp:450
bool intersects(const GisGeometry &target) const
Computes a new geometry from the intersection of the two geomtries.
Definition: GisGeometry.cpp:451
int apply(ResourceList &resources)
Apply algorithm to resource list.
Definition: Strategy.cpp:225
QSharedPointer< Strategy > SharedStrategy
Definition for a SharedStrategy, a shared pointer to a Strategy.
Definition: Strategy.h:227
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition: IString.cpp:149
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Namespace for the standard library.
static void queryCallback(void *item, void *userdata)
Important GEOS query callback for class and overlap geometry.
Definition: Strategy.cpp:1049
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 r...
Definition: Strategy.cpp:496
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:23
bool toBool(const QString &string)
Global function to convert from a string to a boolean.
Definition: IString.cpp:38
PvlFlatMap getDefinitionMap() const
Returns the keyword definitions found in the Strategy object.
Definition: Strategy.cpp:185
virtual ~Strategy()
Destroys the Strategy object.
Definition: Strategy.cpp:92
QSharedPointer< Resource > SharedResource
Defintion of a SharedResource, a shared pointer to a Resource object.
Definition: Resource.h:166
QString name() const
Accessor method to get the name of the strategy.
Definition: Strategy.cpp:101
QString type() const
Accessor method to get the type of strategy.
Definition: Strategy.cpp:111
STRATEGYLIST LoadMinerStrategies(const QString &minerName, const ResourceList &globals) const
Definition: Strategy.h:175
QString description() const
Return description for the strategy.
Definition: Strategy.cpp:201
void setName(const QString &name)
Allow derived strategies to reset name (mostly for default constructors)
Definition: Strategy.cpp:121
bool isApplyToDiscarded() const
Accessor for the apply discarded variable.
Definition: Strategy.cpp:315
bool isValid() const
Determines validity of the geometry contained in this object.
Definition: GisGeometry.cpp:213
void setApplyToDiscarded()
Sets Resource as discarded.
Definition: Strategy.cpp:303
void setType(const QString &type)
Allow derived strategies to reset type (mostly for default constructors)
Definition: Strategy.cpp:133
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,...
Definition: Strategy.cpp:424
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
unsigned int totalProcessed() const
Accessor for the total number of resources processed.
Definition: Strategy.cpp:294
QString translateKeywordArgs(const QString &value, const ResourceList &globals, const QString &defValue="") const
Translates the arguments of the PVL keyword in the PVL definition object.
Definition: Strategy.cpp:522