]> git.tdb.fi Git - builder.git/blobdiff - source/package.h
Reorder class members
[builder.git] / source / package.h
index 4620cf475f51d3d99b5d251b274a760a92a4fb97..2ee932bb8d7e00bb42361327c19164712d4ca2a7 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of builder
-Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
+Copyright © 2006-2007, 2009  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
@@ -37,29 +37,38 @@ public:
                void require(const std::string &);
        };
 
-       const std::string   &get_name() const           { return name; }
-       Builder             &get_builder() const        { return builder; }
-       const PackageList   &get_requires() const       { return requires; }
-       PackageList         collect_requires();
-       const BuildInfo     &get_exported_binfo() const { return export_binfo; }
+protected:
+       Builder &builder;
 
-       /// Indicates whether or not this package supports pkg-config
-       bool get_use_pkgconfig() const { return use_pkgconfig; }
+       std::string name;
+
+       PackageList requires;
+       BuildInfo export_binfo;
+       bool conf_done;
 
-       void                configure(const StringMap &, unsigned);
+       bool use_pkgconfig;
+
+       Package(Builder &, const std::string &);
+public:
        virtual ~Package() { }
-protected:
-       Builder       &builder;
 
-       std::string   name;
+       const std::string &get_name() const { return name; }
+       Builder &get_builder() const { return builder; }
+       const PackageList &get_requires() const { return requires; }
 
-       PackageList   requires;
-       BuildInfo     export_binfo;
-       bool          conf_done;
+       /** Returns a list of all directly and indirectly required packages,
+       including the package itself. */
+       PackageList collect_requires();
 
-       bool          use_pkgconfig;
+       const BuildInfo &get_exported_binfo() const { return export_binfo; }
 
-       Package(Builder &, const std::string &);
+       /// Indicates whether or not this package supports pkg-config
+       bool get_use_pkgconfig() const { return use_pkgconfig; }
+
+       /** Processes configuration options that were most likely obtained from the
+       command line. */
+       void configure(const StringMap &, unsigned);
+protected:
        virtual void do_configure(const StringMap &, unsigned) { }
        virtual void create_build_info() { }
 };