Isis 3 Programmer Reference
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 
67  public:
68  static WorkOrder *create(Project *project, QString type);
69 
70  private:
71  template<typename ClassType>
72  static void tryType(QString type, Project *project, WorkOrder * &result) {
73  if (ClassType::staticMetaObject.className() == type) {
74  result = new ClassType(project);
75  }
76  }
86 
87  Q_DISABLE_COPY(WorkOrderFactory);
88  };
89 }
90 
91 #endif // WorkOrderFactory_H
The main project for ipce.
Definition: Project.h:289
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.
Provide Undo/redo abilities, serialization, and history for an operation.
Definition: WorkOrder.h:322
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Instantiate work orders from QString versions of the class name.