htmlObject
[Previous] [Main] [Next]

 
htmlObject is the parent class for nearly all html++ objects, with the exception of String and CNVList. It's purpose is to encapsulate functionality and features common to html++ objects, such as defining HTML start and end tag names, streaming output, find/replace, and management of name/value attribute lists for individual tags.  
 
htmlObject is a general purpose base class, and is not intended for direct instantiation. Instead, it acts as a base class from which other html++ classes are derived, and from which user-defined classes may be created. It is designed to represent a single object, hence there is no support for streaming insertion of other objects, or an Add() method. Classes that must manage groups of htmlObject-derived objects (such as htmlPage), inherit from the htmlGroup class.  
 
It is the responsibility of derived classes to implement their own set of features and functionality. However, for duties that are common to more than one such class, private methods are included for routine features such as using color or setting alignment options. It is up to the derived class to provide it's own interface to these private methods.  
 
htmlObject maintains tag attributes as a list of name/value string pairs, and provides the SetAttribute(), GetAttribute(), ClearAttribute(), and AttributeExists() methods as the interface to the list. Derived classes use these methods to implement their own specific attributes, so it is not necessary to use them directly. As the HTML specification changes, new attributes can be supported by all html++ class by simply using the SetAttribute() method.  
 



©1998 DC Micro Development. All rights reserved.
No portion of this document may be c opied or reproduced without expressed written consent.
html++ is a trademark of DC Micro Development.