Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ATL Server Archetypes

Visual Studio .NET 2003

In this context, an archetype is a theoretical class that supplies a collection of methods, data members, static functions, typedefs, or other features. The archetype also includes a description of the semantics necessary to create or use the class to represent a particular concept. Classes that mimic the archetype by providing the same features embody the same concept and can be used wherever the archetype can be used.

Archetypes are useful in C++ for describing the features of valid values for template parameters. The designer of the template has a clear idea of the necessary and sufficient features of the template parameter, and the compiler will enforce the syntactic requirements at build time, but the user of a template needs documentation to describe the semantics and to allow the relationships between archetypes and classes to be clearly spelled out.

Examples of archetypes in the Standard C++ Library are the different types of iterator and container. These archetypes are described in the topics Iterator Conventions and STL Containers.

ATL Server defines the following archetypes:

Name Description
Cache Culler Archetype Classes that conform to the cache culler archetype can be used to determine whether, and in what order, items should be removed from a CMemoryCacheBase-derived cache using time-based criteria.
Cache Flusher Archetype Classes that conform to the cache flusher archetype can be used to determine whether, and in what order, items should be removed from a CMemoryCacheBase-derived cache using the number and sequence of accesses as the basis for making the decision.
Cache Statistics Archetype Classes that conform to the cache statistics archetype can be used to collect and expose statistics related to the use of a cache including such information as effectiveness of the cache and memory used.
DLL Cache Peer Archetype Classes that conform to the DLL cache peer archetype can be used to describe extra data to be associated with each cached DLL held by CDllCache and will be notified when DLLs are added to or removed from the cache.
File Cache Peer Archetype Classes that conform to the file cache peer archetype can be used to describe extra data to be associated with each cached file held by CFileCache and will be notified when files are added to or removed from the cache.
Request Statistics Archetype Classes that conform to the request statistics archetype can be used to collect and expose statistics related to the use of an ISAPI extension including such information as number of requests handled and average time per request.
SOAP Client Archetype Classes that conform to the SOAP client archetype can be used to send SOAP messages to a server when used with SPROXY-generated proxy classes.
Worker Archetype Classes that conform to the worker archetype provide the code to process work items queued on a thread pool.
XML Web Service Client Archetype Classes that conform to the XML Web Service client archetype conform to the SOAP client archetype and provide some additional Web-related features.

Example

See the PooledAsync Sample.

See Also

ATL Server | ATL Server Reference

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.