2 Provider and consumer

A provider provides the implementation of a data type. A consumer, on the other hand, uses a data type that is defined by a provider. For example, the internal type int has an implicit provider, usually as a result of compiler code generation, or common libraries that are distributed with a C/C++ compiler. When you define int variables in your program and use variables of int type, you (and your program) become a consumer of the int type.

Some text also refers to a provider as a ``server'', and a consumer as a ``client''. However, the server-client terms are more commonly used in a run-time context.



Copyright © 2006-09-07 by Tak Auyeung