#include "propertyObject.hxx"
-#include <simgear/math/SGMath.hxx>
-
#include <simgear/structure/exception.hxx>
namespace simgear
{
static_defaultRoot = aRoot;
}
+
+PropertyObjectBase::PropertyObjectBase() :
+ _path(NULL),
+ _prop(NULL)
+{
+
+}
PropertyObjectBase::PropertyObjectBase(const PropertyObjectBase& aOther) :
_path(aOther._path),
return _prop;
}
- SGPropertyNode* r = _prop ? _prop : static_defaultRoot;
- _prop = r->getNode(_path, aCreate);
+ SGPropertyNode *r = _prop ? _prop : static_defaultRoot,
+ *prop = r->getNode(_path, aCreate);
- if (_prop) {
- // resolve worked, we will cache from now on, so clear _path
+ if( prop )
+ {
+ // resolve worked, we will cache from now on, so clear _path and cache prop
_path = NULL;
+ _prop = prop;
}
- return _prop;
+ return prop;
}
SGPropertyNode* PropertyObjectBase::getOrThrow() const