Code review comment for lp:~mvo/unity-scope-click/lp1292645-use-libclick

Revision history for this message
Thomas Voß (thomas-voss) wrote :

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