Method and system for aggregating objects
First Claim
1. A method in a computer system for adding a plurality of interfaces, each interface implemented by an object being aggregatable into an enclosing object, the method comprising the steps of:
- creating an instance of an enclosing object, the enclosing object having an add object function member for adding all of the exposed interfaces of an object to the enclosing object and a query function member for retrieving a reference to an added interface;
creating an instance of an object to be enclosed within the enclosing object, the object to be enclosed being aggregated into the enclosing object, the object to be enclosed having a plurality of exposed interfaces and having a query function member for retrieving a reference to an exposed interface; and
invoking the add object function member of the enclosing object, wherein the plurality of exposed interfaces of the object to be enclosed is added to the enclosing object, whereby when the query function member of the enclosing object is invoked, the query function member of the enclosing object returns a reference to an exposed interface from the added plurality of exposed interfaces.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and system for aggregating objects within a computer system are provided. In a preferred embodiment, the method aggregates an enclosed object within an enclosing object. The enclosed object has an object management interface and an external interface, while the enclosing object has a controlling object management interface. The controlling object management interface and the external interface of the enclosed object have query function members for receiving an identifier of an interface and for returning a reference to the identified interface. A preferred embodiment creates an instance of an enclosing object and an object to be enclosed. In static aggregation, the controlling object management interface of the enclosing object knows in advance how to return an identifier to the external interface of the enclosed object. In dynamic aggregation, an object to be enclosed is added to the enclosing object after the enclosing object is instantiated. Once aggregated, when the query function member of the object management interface of the enclosed object receives an identifier of an interface, it invokes the query function member of the controlling object management interface forwarding the interface identifier and returns the reference to an interface returned by the invoked query function member of the controlling object management interface. In dynamic aggregation, rules for determining to which interface to return a reference can by added to the enclosing object and used by the query function member of the controlling object management interface.
-
Citations
14 Claims
-
1. A method in a computer system for adding a plurality of interfaces, each interface implemented by an object being aggregatable into an enclosing object, the method comprising the steps of:
-
creating an instance of an enclosing object, the enclosing object having an add object function member for adding all of the exposed interfaces of an object to the enclosing object and a query function member for retrieving a reference to an added interface; creating an instance of an object to be enclosed within the enclosing object, the object to be enclosed being aggregated into the enclosing object, the object to be enclosed having a plurality of exposed interfaces and having a query function member for retrieving a reference to an exposed interface; and invoking the add object function member of the enclosing object, wherein the plurality of exposed interfaces of the object to be enclosed is added to the enclosing object, whereby when the query function member of the enclosing object is invoked, the query function member of the enclosing object returns a reference to an exposed interface from the added plurality of exposed interfaces.
-
-
2. A method in a computer system for combining a plurality of interfaces, the interfaces implemented by a plurality of objects being aggregatable into an enclosing object, the method comprising the steps of:
-
creating an instance of an enclosing object, the enclosing object having an add interface function member for adding interfaces to the enclosing object and a query function member for retrieving a reference to an added interface; creating an instance of a first object to be enclosed within the enclosing object, whereby the first object is passed a reference to the enclosing object, the first object having an exposed interface and having a query function member for retrieving a reference to the exposed interface; creating an instance of a second object to be enclosed within the enclosing object, whereby the second object is passed a reference to the enclosing object, the second object having an exposed interface; invoking the add interface function member of the enclosing object, wherein the exposed interface of the first object is added to the enclosing object, thereby enclosing the first object; and invoking the add interface function member of the enclosing object, wherein the exposed interface of the second object is added to the enclosing object, thereby enclosing the second object, whereby when the query function member of the enclosed first object is invoked, the query function member of the enclosed first object returns a reference to the added exposed interface of the enclosed second object. - View Dependent Claims (3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
Specification