]> git.tdb.fi Git - builder.git/blob - source/packageref.h
Add comments
[builder.git] / source / packageref.h
1 #ifndef PACKAGEREF_H_
2 #define PACKAGEREF_H_
3
4 #include <list>
5 #include <string>
6
7 class Builder;
8 class Package;
9
10 /**
11 A proxy class that stores a package name and possibly a pointer to the package.
12 */
13 class PackageRef
14 {
15 public:
16         PackageRef(Builder &, const std::string &);
17         const std::string &get_name() const { return name; }
18         Package *get_package() const { return package; }
19         Package *resolve();
20 private:
21         Builder     &builder;
22         std::string name;
23         Package     *package;
24 };
25 typedef std::list<PackageRef> PkgRefList;
26
27 #endif