I can't find anything that addresses this in Stroustrup, but I also don't
see them doing this in any of their examples. So I have rewritten this
instance to use default arguments to accomplish the same thing. I imagine
there are other instances of this same sort of thing in other classes to
be fixed at a later date.
- changed return type of readXML from bool to void (uses an exception
to report problems now)
- removed XMLVisitor::error callback
- declared new readXML function that uses a path rather than a stream
- modified existing readXML function to take an optional path parameter
- implemented new readXML function with path instead of stream
- modified existing readXML function to use optional path parameter
- modified readXML to throw exceptions rather than returning a bool
value on error
file-name variant to invoke new readXML function
- readProperties and writeProperties will now throw exceptions if there
are file I/O problems
- replace error messages with exceptions
- tunnel sg_io_exception through from nested property read, since
the C-based Expat code cannot handle exceptions
- modified to write out non-archivable parents if they have an
archivable descendant (i.e. archive="n" no longer kills a whole
subbranch); this makes sense now that archive defaults to "n".
- don't save the flags -- let the program handle them itself
- produce slightly less verbose output; omit n="0" in elements
- renamed UNKNOWN to UNSPECIED and setUnknownValue to
setUnspecifiedValue
- modified routines to use 'read', 'write', and 'archive' attribute
for access-mode attributes (only if non-default; they all default to
'y')
- modified write routine to honour ARCHIVE attribute (won't write
subtree if ARCHIVE is not set)
the class
- renamed UNKNOWN to UNSPECIED and setUnknownValue to
setUnspecifiedValue
- added access-mode attributes
- added methods for setting and querying access-mode attributes
unaliased first
- renamed UNKNOWN to UNSPECIED and setUnknownValue to
setUnspecifiedValue
- modified get*Value and set*Value methods to respect READ and WRITE
attributes
copies of their arguments
- modified prototype for command functions -- they now take a pointer
to a pointer of an SGCommandState object (which they will normally
subclass) so that they can cache state between invocations
- commented out convenience execute methods until they're actually
needed