]> git.tdb.fi Git - builder.git/blob - source/binarypackage.h
Reorder class members
[builder.git] / source / binarypackage.h
1 /* $Id$
2
3 This file is part of builder
4 Copyright © 2007-2009  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef BINARYPACKAGE_H_
9 #define BINARYPACKAGE_H_
10
11 #include "package.h"
12
13 /**
14 Represents a package that is installed on the system, but can't be built by
15 Builder.
16 */
17 class BinaryPackage: public Package
18 {
19 public:
20         class Loader: public Package::Loader
21         {
22         public:
23                 Loader(BinaryPackage &);
24                 BinaryPackage &get_object() { return static_cast<BinaryPackage &>(pkg); }
25         private:
26                 void build_info();
27         };
28
29 private:
30         bool need_path;
31         Msp::FS::Path path;
32
33 public:
34         BinaryPackage(Builder &, const std::string &);
35
36         /**
37         Sets the path where the package's files were installed.  This is only useful
38         if the package doesn't use pkg-config.
39         */
40         void set_path(const Msp::FS::Path &);
41
42         bool get_need_path() const { return need_path; }
43
44         static BinaryPackage *from_pkgconfig(Builder &, const std::string &);
45 private:
46         virtual void create_build_info();
47 };
48
49 #endif