curt [Wed, 5 Dec 2001 22:31:03 +0000 (22:31 +0000)]
In certain degenerate situations on the FlightGear side when the flight
model math blows up, the lat/lon could be nan. Thus updateLocal() could
potentially called with nan arguments if FlightGear is reiniting from a
blown up state. This is a bug in FlightGear, but I've added a simple
check to catch this so updateLocal() is robust if called under these
circumstances.
curt [Tue, 27 Nov 2001 03:17:43 +0000 (03:17 +0000)]
Christian M. says it's bad to chain one constructor call from another.
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.
- added sg_xml_exception class
- 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 sg_xml_exception class
- 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
- modified both readProperties functions to return void, and modified
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
- changed default value of "archive" attribute from "y" to "n"
- 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
curt [Thu, 28 Jun 2001 21:53:46 +0000 (21:53 +0000)]
- removed all reference to SGValue
- 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)
curt [Thu, 28 Jun 2001 21:53:34 +0000 (21:53 +0000)]
- made getValue methods protected, so that they won't be invoked outside
the class
- renamed UNKNOWN to UNSPECIED and setUnknownValue to
setUnspecifiedValue
- added access-mode attributes
- added methods for setting and querying access-mode attributes
curt [Thu, 28 Jun 2001 21:53:24 +0000 (21:53 +0000)]
- attempting to tie an aliased node now fails; the node must be
unaliased first
- renamed UNKNOWN to UNSPECIED and setUnknownValue to
setUnspecifiedValue
- modified get*Value and set*Value methods to respect READ and WRITE
attributes
curt [Thu, 28 Jun 2001 21:53:10 +0000 (21:53 +0000)]
- added SGCommandState class so that commands can compile and save
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
curt [Tue, 12 Jun 2001 02:49:32 +0000 (02:49 +0000)]
- added SGPropertyNode::Type
- changed return type of SGPropertyNode::getType methods from
SGValue::Type to SGPropertyNode::Type
- made SGPropertyNode::getValue and SGPropertyNode::hasValue private
so that applications cannot get at SGValue instances (SGValue is
slated for removal)
curt [Wed, 6 Jun 2001 14:57:58 +0000 (14:57 +0000)]
- fixed XML syntax error with missing '"' for some attribute values
that was preventing fgfs save/restore from working
- ensured that aliases always appear standalone
curt [Tue, 15 May 2001 21:31:35 +0000 (21:31 +0000)]
We have to add a few more libs to a couple link lines in order to make
irix happy because it tries to resolve dependencies even if they are
eventually never used.
curt [Tue, 15 May 2001 19:26:22 +0000 (19:26 +0000)]
Attempt to resolve ambiguity between #include <config.h> for simgear vs.
flightgear, especially when this occurs in a simgear .hxx file. This is
now expressly forbidden, and will cause problems anyways because we now
changed the name to <simgear_config.h> which isn't installed, so you can't
include it in an installed header file.
iAdded new classes to simgear/threads. SGGuard is a wrapper around a
mutex that unlocks the mutex when the SGGuard object goes out of scope.
The SGxxxQueue<T> template family factor out the common behaviour we
need for passing data between threads.