Update of /cvsroot/jsbsim/JSBSim/src/input_output
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13387/src/input_output
Modified Files:
Tag: JSB_New_XML
FGPropertyManager.cpp FGPropertyManager.h
Log Message:
Added changes to allow properties to be printed for a unique aircraft. Set JSBSIM_DEBUG environment variable to 32 (e.g. export JSBSIM_DEBUG=32) to see the properties on the printed on standard out
Index: FGPropertyManager.cpp
===================================================================
RCS file: /cvsroot/jsbsim/JSBSim/src/input_output/Attic/FGPropertyManager.cpp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** FGPropertyManager.cpp 16 Mar 2005 13:05:04 -0000 1.1.2.2
--- FGPropertyManager.cpp 17 Mar 2005 13:04:18 -0000 1.1.2.3
***************
*** 270,277 ****
void FGPropertyManager::Tie (const string &name, bool *pointer, bool useDefault)
{
! if (!tie(name.c_str(), SGRawValuePointer<bool>(pointer),
! useDefault))
! cout <<
! "Failed to tie property " << name << " to a pointer" << endl;
}
--- 270,277 ----
void FGPropertyManager::Tie (const string &name, bool *pointer, bool useDefault)
{
! if (!tie(name.c_str(), SGRawValuePointer<bool>(pointer), useDefault))
! cout << "Failed to tie property " << name << " to a pointer" << endl;
! else if (debug_lvl & 0x20)
! cout << name << endl;
}
***************
*** 281,288 ****
bool useDefault )
{
! if (!tie(name.c_str(), SGRawValuePointer<int>(pointer),
! useDefault))
! cout <<
! "Failed to tie property " << name << " to a pointer" << endl;
}
--- 281,288 ----
bool useDefault )
{
! if (!tie(name.c_str(), SGRawValuePointer<int>(pointer), useDefault))
! cout << "Failed to tie property " << name << " to a pointer" << endl;
! else if (debug_lvl & 0x20)
! cout << name << endl;
}
***************
*** 292,299 ****
bool useDefault )
{
! if (!tie(name.c_str(), SGRawValuePointer<long>(pointer),
! useDefault))
! cout <<
! "Failed to tie property " << name << " to a pointer" << endl;
}
--- 292,299 ----
bool useDefault )
{
! if (!tie(name.c_str(), SGRawValuePointer<long>(pointer), useDefault))
! cout << "Failed to tie property " << name << " to a pointer" << endl;
! else if (debug_lvl & 0x20)
! cout << name << endl;
}
***************
*** 303,321 ****
bool useDefault )
{
! if (!tie(name.c_str(), SGRawValuePointer<float>(pointer),
! useDefault))
! cout <<
! "Failed to tie property " << name << " to a pointer" << endl;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! void FGPropertyManager::Tie (const string &name, double *pointer,
! bool useDefault)
{
! if (!tie(name.c_str(), SGRawValuePointer<double>(pointer),
! useDefault))
! cout <<
! "Failed to tie property " << name << " to a pointer" << endl;
}
--- 303,320 ----
bool useDefault )
{
! if (!tie(name.c_str(), SGRawValuePointer<float>(pointer), useDefault))
! cout << "Failed to tie property " << name << " to a pointer" << endl;
! else if (debug_lvl & 0x20)
! cout << name << endl;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! void FGPropertyManager::Tie (const string &name, double *pointer, bool useDefault)
{
! if (!tie(name.c_str(), SGRawValuePointer<double>(pointer), useDefault))
! cout << "Failed to tie property " << name << " to a pointer" << endl;
! else if (debug_lvl & 0x20)
! cout << name << endl;
}
Index: FGPropertyManager.h
===================================================================
RCS file: /cvsroot/jsbsim/JSBSim/src/input_output/Attic/FGPropertyManager.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** FGPropertyManager.h 16 Mar 2005 13:05:04 -0000 1.1.2.2
--- FGPropertyManager.h 17 Mar 2005 13:04:18 -0000 1.1.2.3
***************
*** 38,46 ****
#include <string>
#ifdef FGFS
! #include <simgear/props/props.hxx>
#else
! #include "simgear/props/props.hxx"
#endif
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
--- 38,48 ----
#include <string>
#ifdef FGFS
! # include <simgear/props/props.hxx>
#else
! # include "simgear/props/props.hxx"
#endif
+ #include "FGJSBBase.h"
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
***************
*** 69,73 ****
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
! class FGPropertyManager : public SGPropertyNode {
private:
bool suppress_warning;
--- 71,76 ----
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
! class FGPropertyManager : public SGPropertyNode, public FGJSBBase
! {
private:
bool suppress_warning;
***************
*** 503,515 ****
template <class V> inline void
! Tie (const string &name, V (*getter)(), void (*setter)(V) = 0,
! bool useDefault = true)
{
! if (!tie(name.c_str(), SGRawValueFunctions<V>(getter, setter),
! useDefault))
! {
! cout <<
! "Failed to tie property " << name << " to functions" << endl;
! }
}
--- 506,515 ----
template <class V> inline void
! Tie (const string &name, V (*getter)(), void (*setter)(V) = 0, bool useDefault = true)
{
! if (!tie(name.c_str(), SGRawValueFunctions<V>(getter, setter), useDefault))
! cout << "Failed to tie property " << name << " to functions" << endl;
! else if (debug_lvl & 0x20)
! cout << name << endl;
}
***************
*** 533,546 ****
* discarded; defaults to true.
*/
! template <class V> inline void Tie (const string &name,
! int index, V (*getter)(int),
! void (*setter)(int, V) = 0, bool useDefault = true)
{
! if (!tie(name.c_str(),
! SGRawValueFunctionsIndexed<V>(index, getter, setter), useDefault))
! {
! cout <<
! "Failed to tie property " << name << " to indexed functions" << endl;
! }
}
--- 533,543 ----
* discarded; defaults to true.
*/
! template <class V> inline void Tie (const string &name, int index, V (*getter)(int),
! void (*setter)(int, V) = 0, bool useDefault = true)
{
! if (!tie(name.c_str(), SGRawValueFunctionsIndexed<V>(index, getter, setter), useDefault))
! cout << "Failed to tie property " << name << " to indexed functions" << endl;
! else if (debug_lvl & 0x20)
! cout << name << endl;
}
***************
*** 569,578 ****
void (T::*setter)(V) = 0, bool useDefault = true)
{
! if (!tie(name.c_str(),
! SGRawValueMethods<T,V>(*obj, getter, setter), useDefault))
! {
! cout <<
! "Failed to tie property " << name << " to object methods" << endl;
! }
}
--- 566,573 ----
void (T::*setter)(V) = 0, bool useDefault = true)
{
! if (!tie(name.c_str(), SGRawValueMethods<T,V>(*obj, getter, setter), useDefault))
! cout << "Failed to tie property " << name << " to object methods" << endl;
! else if (debug_lvl & 0x20)
! cout << name << endl;
}
***************
*** 597,610 ****
*/
template <class T, class V> inline void
! Tie (const string &name, T * obj, int index,
! V (T::*getter)(int) const, void (T::*setter)(int, V) = 0,
! bool useDefault = true)
{
! if (!tie(name.c_str(),
! SGRawValueMethodsIndexed<T,V>(*obj, index, getter, setter), useDefault))
! {
! cout <<
! "Failed to tie property " << name << " to indexed object methods" << endl;
! }
}
};
--- 592,602 ----
*/
template <class T, class V> inline void
! Tie (const string &name, T * obj, int index, V (T::*getter)(int) const,
! void (T::*setter)(int, V) = 0, bool useDefault = true)
{
! if (!tie(name.c_str(), SGRawValueMethodsIndexed<T,V>(*obj, index, getter, setter), useDefault))
! cout << "Failed to tie property " << name << " to indexed object methods" << endl;
! else if (debug_lvl & 0x20)
! cout << name << endl;
}
};
|