Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > Re: Differentia...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 9 Topic 9505 of 9823
Post > Topic >>

Re: Differentiating pimpl idiom cl***** in c++

by Carl Barron <cbarron413@[EMAIL PROTECTED] > Apr 17, 2008 at 07:35 PM

In article
<27615ebc-fbc4-4530-897e-89aa1741eb20@[EMAIL PROTECTED]
>,
Fejimush <grahamreitz@[EMAIL PROTECTED]
> wrote:

> Thanks for the help, although I didn't do a good job articulating my
> initial question.  My first sentence was completely mis-stated
> (sorry).  Let me try again.
> 
> We are working with an embedded device where only one implementation
> of the driver needs to be in memory at any moment in time.  The
> implementation may vary due to variations in the hardware (this must
> be a common issue).  The pimpl idiom seemed to fit the bill.
> 
> My question is, what strategies can we use to get the correct
> implementation at load (link) time (not run time or compile time) to
> select the desired implementation?
> 
> There are several variations of the handle body idiom, including the
> bridge pattern and pimpl patterns which may work.   We didn't find any
> clear examples of the pimpl idiom showing how and when to choose an
> implementation.
> 
  Pimple is to hide implementation details so they can be modifed
without recompiling client code.   Here you want a to select one of
k implementaions of a cl***** Driver and change them some how.

None of the classical OOP Patterns are done at link time, they are done
at runtime.  If you use templates those used must be visiable at
compile time,  and they solve a similiar problem at compile time.

the only link time solution is k complied objects  and selecting the
right one in your build processsing by some means beyound standard C++.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 9 Posts in Topic:
Differentiating pimpl idiom classes in c++
Fejimush <grahamreitz@  2008-04-16 11:36:38 
Re: Differentiating pimpl idiom classes in c++
Tony Delroy <tony_in_d  2008-04-17 03:55:28 
Re: Differentiating pimpl idiom classes in c++
Carl Barron <cbarron41  2008-04-17 04:13:14 
Re: Differentiating pimpl idiom classes in c++
Fejimush <grahamreitz@  2008-04-17 12:03:38 
Re: Differentiating pimpl idiom classes in c++
Carl Barron <cbarron41  2008-04-17 19:35:32 
Re: Differentiating pimpl idiom classes in c++
Tony Delroy <tony_in_d  2008-04-18 06:13:17 
Re: Differentiating pimpl idiom classes in c++
Fejimush <grahamreitz@  2008-04-19 02:01:53 
Re: Differentiating pimpl idiom classes in c++
Tony Delroy <tony_in_d  2008-04-20 21:04:20 
Re: Differentiating pimpl idiom classes in c++
marlow.andrew@[EMAIL PROT  2008-04-21 20:28:04 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 1:43:48 CDT 2008.