1 /* -*- c++ -*-
2 FILE: Machine.cpp
3 RCS REVISION: $Revision: 1.7 $
4 
5 COPYRIGHT: (c) 1999 -- 2003 Melinda Green, Don Hatch, and Jay Berkenbilt - Superliminal Software
6 
7 LICENSE: Free to use and modify for non-commercial purposes as long as the
8     following conditions are adhered to:
9     1) Obvious credit for the source of this code and the designs it embodies
10        are clearly made, and
11     2) Ports and derived versions of 4D Magic Cube programs are not distributed
12        without the express written permission of the authors.
13 
14 DESCRIPTION:
15 */
16 
17 #include <iostream>
18 
19 #include "MachineX.h"
20 
21 // This is a factory method for various machine types.
22 Machine*
createMachine(EventHandler * eh,int & argc,char * argv[],Preferences & prefs,char const * machine_type)23 Machine::createMachine(EventHandler* eh, int& argc, char *argv[],
24                        Preferences& prefs, char const* machine_type)
25 {
26     Machine* result = 0;
27     if (strcmp(machine_type, "X") == 0)
28     {
29         return new MachineX(eh, argc, argv, prefs);
30     }
31     else
32     {
33         std::cerr << "Unsupported machine type " << machine_type << std::endl;
34         exit(2);
35     }
36 
37     return result;
38 }
39 
40 // Local Variables:
41 // c-basic-offset: 4
42 // c-comment-only-line-offset: 0
43 // c-file-offsets: ((defun-block-intro . +) (block-open . 0) (substatement-open . 0) (statement-cont . +) (statement-case-open . +4) (arglist-intro . +) (arglist-close . +) (inline-open . 0))
44 // indent-tabs-mode: nil
45 // End:
46