#define COMPONENT_H_
#include <string>
-#include <msp/datafile/loader.h>
+#include <msp/datafile/objectloader.h>
#include <msp/fs/path.h>
#include "buildinfo.h"
#include "installmap.h"
class Component
{
public:
- class Loader: public Msp::DataFile::Loader
+ class Loader: public Msp::DataFile::ObjectLoader<Component>
{
- private:
- Component ∁
- std::string inst_hdr;
-
public:
Loader(Component &);
- Component &get_object() { return comp; }
private:
- virtual void finish();
void source(const std::string &);
void require(const std::string &);
void build_info();
enum Type
{
- HEADERS,
LIBRARY,
PROGRAM,
MODULE,
public:
Component(SourcePackage &, Type, const std::string &);
+
const SourcePackage &get_package() const { return pkg; }
Type get_type() const { return type; }
const std::string &get_name() const { return name; }
bool is_default() const { return deflt; }
const InstallMap &get_install_map() const { return install_map; }
- void configure(const StringMap &, unsigned);
+ void prepare();
/** Prepares the build information for building. Pulls build info from the
parent and dependency packages, and adds any component-specific flags. */