Isis 3 Programmer Reference
Isis::WorkOrderFactory Class Reference

Instantiate work orders from QString versions of the class name. More...

#include <WorkOrderFactory.h>

Collaboration diagram for Isis::WorkOrderFactory:
Collaboration graph

Static Public Member Functions

static WorkOrdercreate (Project *project, QString type)
 This instantiates a work order given a project and a type name (class name in a string). More...
 

Private Member Functions

 WorkOrderFactory ()
 This class cannot be instantiated. More...
 
 ~WorkOrderFactory ()
 Since this class cannot be instantiated, it also cannot be destroyed. More...
 
 Q_DISABLE_COPY (WorkOrderFactory)
 

Static Private Member Functions

template<typename ClassType >
static void tryType (QString type, Project *project, WorkOrder *&result)
 

Detailed Description

Instantiate work orders from QString versions of the class name.

This factory creates work orders. To create a work order, you need a Project and the name of the work order. Names of work orders are strings, such as "Isis::ImportImagesWorkOrder"

Author
2012-08-22 Steven Lambright
History:

2012-10-19 Steven Lambright - Added tryType() to reduce the chances of programmer mistakes and to reduce duplicate code.

2014-07-14 Kimberly Oyama - Added support for correlation matrix.

2015-08-14 Jeannie Backer - Added jigsaw work order.

2015-09-05 Ken Edmundson - Added support for new WorkOrders: SaveProjectWorkOrder, SensorGetInforWorkOrder, and TargetGetInfoWorkOrder.

2016-06-09 Makayla Shepherd - Updated documentation. Fixes #3957.

2016-07-26 Tracie Sucharski - Added support for Importing shapes.

2016-11-07 Tracie Sucharski - Added the CubeDnViewWorkOrder, SetActiveControlWorkOrder, SetActiveImageListWorkOrder. Fixes #4485.

2017-05-04 Tracie Sucharski - Added BundleObservationViewWorkOrder. Fixes #4840.

2017-08-11 Christopher Combs - Added ImportTemplateWorkOrder. Fixes #5086.

2017-11-02 Tyler Wilson - Added the OpenRecentProjectsWorkOrder. Fixes #4492.

2017-11-09 Tyler Wilson - Merged the functionality of OpenRecentProjectsWorkOrder into OpenProjectWorkOrder to reduce unnecessary code duplication, and removed references to OpenRecentProjectWorkOrder in this class. Fixes #5220.

2018-06-18 Adam Goins - Added ControlHealthMonitorWorkOrder to WorkOrderFactory. Fixes #5435.

2018-07-07 Summer Stapleton - Removed importTemplateWorkOrder and replaced it with the new map and registration import work orders to reflect changes in Project.cpp for handling these differently.

Definition at line 66 of file WorkOrderFactory.h.

Constructor & Destructor Documentation

◆ WorkOrderFactory()

Isis::WorkOrderFactory::WorkOrderFactory ( )
private

This class cannot be instantiated.

The constructor is not implemented.

◆ ~WorkOrderFactory()

Isis::WorkOrderFactory::~WorkOrderFactory ( )
private

Since this class cannot be instantiated, it also cannot be destroyed.

The destructor is not implemented.

Member Function Documentation

◆ create()

WorkOrder * Isis::WorkOrderFactory::create ( Project project,
QString  type 
)
static

This instantiates a work order given a project and a type name (class name in a string).

Ownership is passed to the caller. The work orders are QObject's so please be mindful of which thread they are in.

Parameters
projectThe project to give to the work order constructor
typeThe work order type (class name) - for example "Isis::ImportImagesWorkOrder"
Exceptions
IException::Unknown"Could not create the work order through WorkOrderFactory"
Returns
WorkOrder Returns the instantiated WorkOrder

Definition at line 50 of file WorkOrderFactory.cpp.

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


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