7e9da13ed1d88d18b664b6a405243732a7c4122e
2 * Copyright (C) 2005 Casper S. Hornstrup
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #include "../rbuild.h"
25 typedef Backend
* BackendFactory ( Project
& project
,
26 Configuration
& configuration
);
33 static std::map
<std::string
,Factory
*>* factories
;
36 std::string m_description
;
40 Factory ( const std::string
& name_
, const std::string
& description_
);
43 virtual Backend
* operator() ( Project
&,
44 Configuration
& configuration
) = 0;
47 static Backend
* Create ( const std::string
& name
,
49 Configuration
& configuration
);
51 static std::map
<std::string
,Factory
*>::iterator
map_begin(void)
53 return factories
->begin();
56 static std::map
<std::string
,Factory
*>::iterator
map_end(void)
58 return factories
->end();
61 const char *Name(void) { return m_name
.c_str(); }
62 const char *Description(void) { return m_description
.c_str(); }
66 Backend ( Project
& project
,
67 Configuration
& configuration
);
72 virtual std::string
GetFullName ( const FileLocation
& file
) const;
73 virtual std::string
GetFullPath ( const FileLocation
& file
) const;
74 virtual void Process () = 0;
76 Configuration
& configuration
;