Boost logo

Boost :

Subject: Re: [boost] Is there any interest in a dependency injection library?
From: Sohail Somani (sohail_at_[hidden])
Date: 2014-07-31 22:44:11


On 2014-07-31, 10:46 AM, Kris wrote:
> I guess your example is possible to write in the current version of the
> library, but I'm not sure

I think you are correct, but can we make one more adjustment to the
example and you tell me how it would be written? Say the types are as
follows:

struct this { // lets keep pretending 'this' is not a keyword
   virtual ~this();
   virtual void whatever() = 0;
};

struct app {
   app(this*);
}

struct thing1{};
struct thing2{};

struct that : public this {
   that(thing1, thing2);
   virtual void whatever();
};

Say, further, that the 'that' type is defined separately from 'this' and
'app'.

How would you configure it so that in one module (separately compiled),
you bind 'app' and in another module, you bind the rest?

Thanks for your patience!

Sohail


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk