I suggest defining a Join class with table name and ON criteria and adding a std::vector<Join> to the classes that support joins.