[Project_owners] Re: class vs contract ids
pete at mozdev.org
Fri Sep 12 10:53:36 EDT 2003
> But a contract ID is not bound to any
> specific implementation, as the CID is, and is thus more general.
> Instead, a contract ID only specifies a given set of interfaces that it
> wants implemented, and any number of different CIDs may step in and fill
> that request. This difference between a contract ID and a CID is what
> makes it possible to override components."
> Creating XPCOM Components book
Ah, that's a great piece of information. In practicality though, the
distinction is useless since there are usually no alternative
implementations found in Mozilla for the same public interface.
But even there, two distinctly different contractID's are used to
identify the implementation classes.
Both classes implement nsISample. To make it even more confusing, a
ContractID is also referred to as a programID.
More information about the Project_owners