Isis 3.0 Programmer Reference
Back | Home
WorkOrderFactory.h
Go to the documentation of this file.
1 #ifndef WorkOrderFactory_H
2 #define WorkOrderFactory_H
3 
26 #include <QObject>
27 
28 class QString;
29 
30 namespace Isis {
31  class Project;
32  class WorkOrder;
33 
55  public:
56  static WorkOrder *create(Project *project, QString type);
57 
58  private:
59  template<typename ClassType>
60  static void tryType(QString type, Project *project, WorkOrder * &result) {
61  if (ClassType::staticMetaObject.className() == type) {
62  result = new ClassType(project);
63  }
64  }
74 
75  Q_DISABLE_COPY(WorkOrderFactory);
76  };
77 }
78 
79 #endif // WorkOrderFactory_H
The main project for cnetsuite.
Definition: Project.h:105
WorkOrderFactory()
This class cannot be instantiated.
static WorkOrder * create(Project *project, QString type)
This instantiates a work order given a project and a type name (class name in a string).
~WorkOrderFactory()
Since this class cannot be instantiated, it also cannot be destroyed.
Parent class for anything that performs an action in Project.
Definition: WorkOrder.h:104
Instantiate work orders from QString versions of the class name.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:31:49