C++ Design question

Discussion in 'C++' started by denis, Jan 14, 2007.

  1. denis

    denis Guest

    Hi All,

    I'm making a class which derives(implements) from 5 interfaces:

    class myClass: public base1, public base2, public base3,.......

    I want to be able to ask from any interface about a pointer to another
    interface
    What I mean is:

    myClass _myImpObj;

    base1 *b1 = &_myImpObj;
    base *b2 = b1->QueryInterafce("b2");
    base *b3 = b2->QueryInterafce("b3");
    base *b1N = b3->QueryInterface("b1");

    Its is very simialir to COM mechanism.Anyone knows how to implement it?

    Thanks,
    Denis
    denis, Jan 14, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ZackS
    Replies:
    5
    Views:
    6,773
    Just an Illusion
    Jul 9, 2004
  2. SpamProof
    Replies:
    3
    Views:
    632
    SpamProof
    Dec 1, 2003
  3. dave
    Replies:
    5
    Views:
    575
    William Brogden
    Jul 17, 2004
  4. Tim Smith
    Replies:
    2
    Views:
    829
    Tim Smith
    Dec 15, 2004
  5. Bartholomew Simpson

    class design/ design pattern question

    Bartholomew Simpson, Jun 12, 2007, in forum: C++
    Replies:
    2
    Views:
    427
    Daniel T.
    Jun 12, 2007
Loading...

Share This Page