f1dd7901cb
Added a std::shared_mutex to SGPropertyNode and changed all props code to use shared or exclusive locks as necessary whenever reading/writing data. SG_PROPERTY_LOCKING=0 or 1 can be used to control whether locking is active. Default is 1. SG_PROPERTY_LOCKING_VERBOSE=0 or 1 can be used to cause diagnostics to be generated if we get lock contention. Default is 0. Removed most of the inline implementation code in props.hxx - now that we use locking, nearly all calls eventually end up in props.cxx in order to take out a lock so there's no point inlining. For template code this also means that we now explicitly instantiate / specialise in props.cxx. Reformateed props.hxx to use consistent indentation. Also condensed identical comments for related methods such as getBoolValue(), getIntValue() etc, which results in more readable visual grouping. Much of the internal implementation code for SGPropertyNode is now in the form of static methods in a new SGPropertyNodeImpl class in props.cxx. This class is marked as a friend of SGPropertyNode in props.hxx so these methods can access all SGPropertyNode internal data without being declared in props.hxx. So one can change implementation code without recompiling everything. Removed TEST_READ and TEST_WRITE macros. Removed SGPropertyNode::MAX_STRING_LEN - was only used in compare_strings() and it is unnecessary. |
||
---|---|---|
3rdparty | ||
CMakeModules | ||
simgear | ||
.gitignore | ||
AUTHORS | ||
ChangeLog | ||
CMakeLists.txt | ||
COPYING | ||
Doxyfile | ||
DoxygenMain.cxx | ||
INSTALL | ||
NEWS | ||
README | ||
README.cmake | ||
README.OSG | ||
README.sound | ||
README.zlib | ||
simgear-version | ||
SimGearConfig.cmake.in | ||
Thanks |
SimGear - Simulator Construction Tools ====================================== http://www.flightgear.org SimGear is a set of open-source libraries designed to be used as building blocks for quickly assembling 3d simulations, games, and visualization applications. SimGear is developed by the FlightGear project and also provides the base for the FlightGear Flight Simulator. Source code for SimGear is released under the GNU Library General Public License (LGPL) - see COPYING for license details. See INSTALL file for help on building SimGear.