Hey Michael,
thanks for getting this started. Looking at the code, we might want to have a click::Database abstract base-class, with simple structs Manifest and Framework summarizing all the attributes that the scope is interested in. With that, we could have:
namespace click { struct Manifest { // Omitting details here. };
struct Framework { // Omitting details here. };
class Database { public: // Omitting boilerplate here
virtual void for_each_framework(std::function<void(const click::Framework&)> f) = 0; virtual void for_each_manifest(std::function<void(const click::Manifest&)> f) = 0; }; }
We then could think about having a:
namespace libclick { class Database : public click::Database { }; }
and would still be able to easily create instances of Manifest and Framework without requiring an instance of click::Database.
What do you think?
« Back to merge proposal
Hey Michael,
thanks for getting this started. Looking at the code, we might want to have a click::Database abstract base-class, with simple structs Manifest and Framework summarizing all the attributes that the scope is interested in. With that, we could have:
namespace click
{
struct Manifest
{
// Omitting details here.
};
struct Framework
{
// Omitting details here.
};
class Database
{
public:
// Omitting boilerplate here
virtual void for_each_ framework( std::function< void(const click::Framework&)> f) = 0; manifest( std::function< void(const click::Manifest&)> f) = 0;
virtual void for_each_
};
}
We then could think about having a:
namespace libclick
{
class Database : public click::Database
{
};
}
and would still be able to easily create instances of Manifest and Framework without requiring an instance of click::Database.
What do you think?