Motivation
I created [warebiz] a few years ago in order to provide free programming and related information. This means that it would be necessary for me to publish program source code on the web. If you have studied C or C++ and HTML, it is easily recognized that there are characters used in C code that are not capable of being rendered by a web browser either because HTML places a restriction on the character or the character has reserved meaning to HTML. Therefore, a webmaster cannot simply copy and paste C source code into a web page. I thought it would be nice to develop a program that could build an HTML source file from a C or C++ source file eliminating these complications. Thus, CPP2HTM was designed.
Overview
CPP2HTM is capable of converting
C or C++ source code into valid HTML web
document source code. The user will specify
the path of a C or C++ source file and will
specify a path destination for the HTML file,
which will ultimately contain all code in the
source file and possibly other HTML markup for
a specified visual appearance. The C or C++
source file will not be manipulated, and the
HTML destination file will be a valid HTML
document capable for publishing on the WWW.
If web page customization is needed, the
builder has a configuration tool which can
enhance the following properties: browser
title bar text, background color, text color,
web page title text, text font type and size,
internal source tab size, and option of
displaying line numbers. If no customization is
needed, default values for these properties will be
used.
The user is able to build as many CPP2HTM
documents as needed during any program session.
The HTML build produces valid HTML 4.0
Transitional coding schemes defined by W3C.org's
standards.
INPUT: C or C++ source file
OUPUT: HTML or HTM web document
Documentation
The program is written using OOP (object oriented programming). There are actually two objects: a main builder object and a configuration object. The main builder object is a "child" of the configuration object. Thus, the concept of inheritance is also optimized.