Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Stingray Foundation Library User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

11.4 MFC Compatibility Classes

Toward the same goal of MFC source-code compatibility, SFL also offers a CString-compatible class and a set of collection classes that also share the public interfaces of MFC collections.

SFL's CString offers the possibility of reusing with virtually no change chunks of code that make use of MFC's CString, but eliminating the MFC linkage. This is attractive for ATL projects where up until now no string-processing capabilities were easily available.

SFL's CString class can be distinguished from its MFC counterpart because it is contained in the stingray::foundation namespace. However, in a project that uses MFC it is recommended to avoid the inclusion of SFL's version since it would lead to duplication of functionality and larger executable code.

SFL's CString is implemented in terms of the basic_string_ex<> class described in a previous section. This class, in turn, is derived from the Standard C++ Library string. What CString contributes is to change the programming interface in order to provide source code compatibility with MFC. Every routine is translated to its equivalent in the basic_string<> interface. The definition of SFL's CString is located in the header file <string\SflString.h>.

SFL also offers a set of collection classes that follow this same pattern: they are implemented on top of the corresponding containers in the Standard C++ Library portion commonly known as STL, but offer the same interface as the familiar MFC collections.

The following MFC collections are included in the header <string\sflcoll.h>:

In addition, there are explicit type definitions as instantiations of the templatized classes for the following MFC collections:



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.