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 6 of 9 Topic 9505 of 9807
Post > Topic >>

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

by Tony Delroy <tony_in_da_uk@[EMAIL PROTECTED] > Apr 18, 2008 at 06:13 AM

On Apr 18, 3:03 am, Fejimush <grahamre...@[EMAIL PROTECTED]
> wrote:
> 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.

The pimpl idiom could be used but is orthogonal to solving your stated
issue.  To do what you want, you should write some code to choose
which shared object / dynamically linked library (terminology varies
with OS) to load.  For example, you would use the dlopen / dlsym
functions on Linux/UNIX.  The question actually has nothing to do with
C++ specifically - these are standard C routines provided by the
Operating System.

Tony

-- 
      [ 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 Sat Jul 19 19:59:50 CDT 2008.