+++ /dev/null
-#ifndef PACKAGE_H_
-#define PACKAGE_H_
-
-#include <list>
-#include <string>
-#include <msp/parser/loader.h>
-#include "buildinfo.h"
-#include "component.h"
-
-class Builder;
-class Package;
-
-class PackageRef
-{
-public:
- PackageRef(Builder &, const std::string &);
- Package *get_package();
-private:
- Builder &builder;
- std::string name;
- Package *package;
-};
-
-class Package
-{
-public:
- class Loader: public Msp::Parser::Loader
- {
- public:
- Loader(Package &);
- Package &get_object() { return pkg; }
- ~Loader();
- private:
- Package &pkg;
-
- void require(const std::string &);
- void program(const std::string &);
- void library(const std::string &);
- };
-
- Package(Builder &, const std::string &, const Msp::Path::Path &);
- Package(Builder &, const std::string &, const std::list<std::string> &);
- const std::string &get_name() const { return name; }
- const Msp::Path::Path &get_source() const { return source; }
- const ComponentList &get_components() const { return components; }
- bool get_buildable() const { return buildable; }
- void resolve_refs();
-
- static Package *create(Builder &, const std::string &);
-private:
- Builder &builder;
- std::string name;
- std::string version;
- std::string description;
- std::list<PackageRef> requires;
- BuildInfo build_info;
- BuildInfo export_binfo;
- Msp::Path::Path source;
- bool buildable;
- ComponentList components;
-};
-
-#endif