Clean header dependencies of condition.hxx - introduce a new header, propsfwd.hxx, for common case of headers that only need SGPropertyNode_ptr and SGCondition_ptr

This commit is contained in:
James Turner
2011-07-30 10:48:37 +01:00
parent 19119cc4ae
commit 3ac5ff0cac
6 changed files with 26 additions and 9 deletions

View File

@@ -8,6 +8,7 @@ set(HEADERS
propertyObject.hxx
props.hxx
props_io.hxx
propsfwd.hxx
tiedpropertylist.hxx
)

View File

@@ -10,11 +10,11 @@
#ifndef __SG_CONDITION_HXX
#define __SG_CONDITION_HXX
#include <simgear/debug/logstream.hxx>
#include <simgear/props/props.hxx>
#include <simgear/props/props_io.hxx>
#include <simgear/structure/SGReferenced.hxx>
#include <simgear/structure/SGSharedPtr.hxx>
class SGPropertyNode;
////////////////////////////////////////////////////////////////////////
// Conditions.
////////////////////////////////////////////////////////////////////////

View File

@@ -15,11 +15,7 @@
#include <simgear/compiler.h>
#include <simgear/props/props.hxx>
#include <stdio.h>
#include <string>
#include <vector>
#include <map>
#include <iosfwd>
/**

View File

@@ -0,0 +1,18 @@
/**
* \file propsfwwd.hxx
* Forward declarations for properties (and related structures)
*/
#ifndef SG_PROPS_FWD_HXX
#define SG_PROPS_FWD_HXX
#include <simgear/structure/SGSharedPtr.hxx>
class SGPropertyNode;
typedef SGSharedPtr<SGPropertyNode> SGPropertyNode_ptr;
typedef SGSharedPtr<const SGPropertyNode> SGConstPropertyNode_ptr;
class SGCondition;
#endif // of SG_PROPS_FWD_HXX

View File

@@ -30,6 +30,7 @@
#include <string.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/props/props.hxx>
#include <simgear/props/condition.hxx>
#include <simgear/math/SGMath.hxx>
#include <simgear/structure/exception.hxx>

View File

@@ -36,7 +36,8 @@
#include <vector>
#include <simgear/compiler.h>
#include <simgear/props/condition.hxx>
#include <simgear/props/propsfwd.hxx>
#include "sample_group.hxx"
#include "sample_openal.hxx"