]> git.tdb.fi Git - builder.git/blobdiff - source/architecture.h
Pass a tool hint to VirtualFileSystem::find_header
[builder.git] / source / architecture.h
index c07297a8940153fa7551e6a62c1c956c66852f33..4db809f19f3cbf0ef33e6706b8cc1bedae5f0619 100644 (file)
@@ -7,18 +7,17 @@
 
 class Builder;
 
-// XXX Add lib/exe prefix/suffix fields.  Some archs may need multiple alternatives, how to handle this?
+/**
+Stores information about an architecture.  This includes CPU type, model and
+bitness and operating system.
+*/
 class Architecture
 {
 public:
-       class Loader: public Msp::DataFile::Loader
+       class Loader: public Msp::DataFile::ObjectLoader<Architecture>
        {
-       private:
-               Architecture &arch;
-
        public:
                Loader(Architecture &);
-               Architecture &get_object() { return arch; }
        };
 
        typedef std::list<Pattern> PatternList;
@@ -45,8 +44,8 @@ public:
        const std::string &get_cpu() const { return cpu; }
        bool match_name(const std::string &) const;
        bool is_native() const { return native; }
+       bool is_cross() const { return !cross_prefix.empty(); }
 
-       void set_cross_prefix(const std::string &);
        const std::string &get_cross_prefix() const { return cross_prefix; }
 
        const PatternList &get_shared_library_patterns() const { return sharedlib_patterns; }
@@ -58,6 +57,4 @@ private:
        void parse_specification(const std::string &);
 };
 
-typedef std::map<std::string, Architecture> ArchMap;
-
 #endif