Include
Outputs its input with each specially marked file name replaced with the
contents of that file.
Header File
include.h
Description
An instance of this class is a filter object that outputs its input
unchanged except that each specially marked file name is replaced with the
contents of that file. If the file cannot be found and/or read, then
a FilterError indicating this is passed to the next filter and the file name
is replaced with the empty string.
Constructors
Include::tagged(const String &beginTag, const String &endTag)
-
outputs its input unchanged except that file names immediately preceded by
beginTag and immediately followed by endTag are
replaced with the contents of that file. Both the tags and the file name
are replaced. Only whitespace characters can separate a file name and
either tag or else they will not be replaced with the file`s contents
Include(const Include &f)
- copy constructor
- the beginning tag, the file name and the ending tag must all appear on
the same line or else they will not be replaced with the file`s contents
- the beginning and ending tags in the input must exactly match those
passed to
Include::tagged()
, including case
- neither a beginning tag nor and ending tag can contain a newline. If
such a tag is passed to
Include::tagged()
then it will
throw an InvalidFilterArgumentException
- neither a beginning tag nor an ending tag can be an empty string.
If such a tag is passed to
Include::tagged()
then it will
throw an InvalidFilterArgumentException
Known Bugs
Author and Copyright
Author: James MacKay
Last Updated: July 14, 1997
Copyright © 1997 James MacKay