c++ class relationships
-
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
-
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
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.
-
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
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.