Encapsulated C library
All access to the network and the LibWWW is gatewayed through the TURL::Follow call. This shows one strategy for reusing existing code within a CommonPoint application. This design supports future modifications because none of the global variables or functions are used outside of this barrier. For example, this approach makes it possible to replace the existing library with CommonPoint-portable equivalents. The code in TURL::Follow and the LibWWW interface files can be replaced without affecting the rest of the system. TScrapItem
TScrapItem provides a method to negotiate for an unknown piece of data. By using the dynamic cast interface in CommonPoint, a program can pass a pointer to TScrapItem in a typesafe manner to another program. In cases where complex data is being handled (such as hypertext), you can create a new scrap item such as THypertextScrapItem. When a simple, atomic data value like MGraphic needs to be transferred, you can use simple wrappers like TScrapItemOn<MGraphic> to facilitate type negotiation.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Generated with WebMaker