]> git.tdb.fi Git - builder.git/blobdiff - source/architecture.h
Reorder class members
[builder.git] / source / architecture.h
index 16ff50547c465e6ccb77957321fdcc6593b88cad..3a4d7ec50d966f44d19cdc95f19d8133e3319aa6 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of builder
-Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
+Copyright © 2007-2009  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
@@ -13,29 +13,36 @@ Distributed under the LGPL
 
 class Builder;
 
+// XXX Add lib/exe prefix/suffix fields.  Some archs may need multiple alternatives, how to handle this?
 class Architecture
 {
 public:
        class Loader: public Msp::DataFile::Loader
        {
+       private:
+               Architecture &arch;
+
        public:
                Loader(Architecture &);
                Architecture &get_object() { return arch; }
        private:
-               Architecture &arch;
-
                void tool(const std::string &t, const std::string &p);
        };
 
-       Architecture(Builder &b, const std::string &n);
-       void set_tool(const std::string &t, const std::string &p);
-       std::string get_tool(const std::string &t) const;
-       const std::string &get_prefix() const { return prefix; }
 private:
-       Builder     &builder;
+       Builder &builder;
        std::string name;
+       bool native;
        std::string prefix;
-       StringMap   tools;
+       StringMap tools;
+
+public:
+       Architecture(Builder &b, const std::string &n, bool a=false);
+       void set_tool(const std::string &t, const std::string &p);
+       std::string get_tool(const std::string &t) const;
+       const std::string &get_name() const { return name; }
+       bool is_native() const { return native; }
+       const std::string &get_prefix() const { return prefix; }
 };
 
 typedef std::map<std::string, Architecture> ArchMap;