Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. c++ class relationships

c++ class relationships

Scheduled Pinned Locked Moved COM
questionc++com
3 Posts 3 Posters 10 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    koteswara
    wrote on last edited by
    #1

    Hi, what is exact difference between aggragation and containment. aggregation is 'has a' relationship between classes. Inheritence is 'is a' relationship. is it correct? what about containment? send me msdn links thanks, - Koteswara, pkoti@staff.juno.com

    A V 2 Replies Last reply
    0
    • K koteswara

      Hi, what is exact difference between aggragation and containment. aggregation is 'has a' relationship between classes. Inheritence is 'is a' relationship. is it correct? what about containment? send me msdn links thanks, - Koteswara, pkoti@staff.juno.com

      A Offline
      A Offline
      Alex Gorev
      wrote on last edited by
      #2

      Hi, In C++ you can use inheritance, which is 'kind-of' relationship, or composition, which is 'has-a' relationship. You also can use the private inheritance, which is just a syntactic variant of composition. Aggregation and containment are related to the COM. Aggregation is exposing a binary sub-object to the client as is using the QueryInterface. Not all classes are aggregatable and you may want to expose only part of the object's functionality, in this case you can use containment. The best source of information on this topic is the Don Box's book "Essential COM". Regards, Alex Gorev, Dundas Software.

      1 Reply Last reply
      0
      • K koteswara

        Hi, what is exact difference between aggragation and containment. aggregation is 'has a' relationship between classes. Inheritence is 'is a' relationship. is it correct? what about containment? send me msdn links thanks, - Koteswara, pkoti@staff.juno.com

        V Offline
        V Offline
        Vese
        wrote on last edited by
        #3

        In simple terms aggregration means that the COM Component has an Internal Interface which is doing all your work though you are talking to front interface which redirects your job to its internal interface. As far as containment is correctly interpreted by me refers to the interface by which COM is exposing the rest of the interface contained inside it.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups