SECXMLFormatterFactory Class

class SECXMLFormatterFactory

The SECXMLFormatterFactory class implements the SFL XML Formatter Factory. The formatter factory is a global singleton used by the XML serialization framework to provide a polymorphic persistence mechanism to mimic that provided by MFC for the collection classes for CObject derived types. Building SFL with the XML Serialization option selected in the build wizard will define the global instance of the factory object.

Normally the formatter factory is never directly referenced from within the application. Registration of the formatter classes, for the various serializable types, with the factory should be done using the XMLFORMATTERMAP series of macros. Once the registration macros are in place, calling the  SECXMLInitFTRFactory global function will initialize the factory and update the formatter entries.

The following macros may be used for registering formatters,

BEGIN_SEC_XMLFORMATTERMAP(classThis) - Begins a declaration of the formatter map in the hosting class(classThis).
XMLFORMATTERMAP_ADDENTRY(classX, classFTR) - Adds an association of the serializable class(classX) with it's formatter(classFTR).
END_SEC_XMLFORMATTERMAP() - Ends the declaration of the map.
DEFINE_SEC_XMLFORMATTERMAP(classThis) - Defines the formatter map.

See Also  SECXMLInitFTRFactory

Defined in: XMLFTRFactory.h