There is an object which is very complicated to build and many algorithms needed to figure out how it should be created (for your curiosity it is an object that represents and draws the beaming of notes in music notation).
The object has a rats nest of internal logic which I want to, at least partially, externalize in some sort of builder object.
However I found that the builder object needed too much access to the internals of the object it is constructing. So I came up with a different approach. The 'builder' object will instead be a representation of the complex real-world thing that the 'constructed' object will represent, but the 'constructed' object will still build itself taking the 'builder' object as input to the constructor.
I don't think this is exactly a GOF Builder Pattern. Is there a design pattern which more closely matches my proposal? I would like to search on it if there is.
In case the above description isn't clear, here is snippet that shows what I mean.
class ComplexBuildingInstructionsIntf
{
public:
virtual ~ComplexBuildingInstructionsIntf() {}
virtual int getLots() const = 0;
virtual int getComplicated() const = 0;
virtual int getStuff() const = 0;
};
class ComplexObject
{
ComplexObject(const ComplexBuildingInstructionsIntf& inInstructions);
};