namespace JSBSim {
bool FGPropertyManager::suppress_warning = true;
+std::vector<std::string> FGPropertyManager::tied_properties;
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+void FGPropertyManager::Unbind(void)
+{
+ vector<string>::iterator it;
+ for (it = tied_properties.begin();it < tied_properties.end();it++)
+ {
+ Untie(*it);
+ }
+ tied_properties.clear();
+}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
if (!tie(name.c_str(), SGRawValuePointer<bool>(pointer), useDefault))
cerr << "Failed to tie property " << name << " to a pointer" << endl;
- else if (debug_lvl & 0x20)
- cout << name << endl;
+ else {
+ tied_properties.push_back(name);
+ if (debug_lvl & 0x20) std::cout << name << std::endl;
+ }
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
if (!tie(name.c_str(), SGRawValuePointer<int>(pointer), useDefault))
cerr << "Failed to tie property " << name << " to a pointer" << endl;
- else if (debug_lvl & 0x20)
- cout << name << endl;
+ else {
+ tied_properties.push_back(name);
+ if (debug_lvl & 0x20) std::cout << name << std::endl;
+ }
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
if (!tie(name.c_str(), SGRawValuePointer<long>(pointer), useDefault))
cerr << "Failed to tie property " << name << " to a pointer" << endl;
- else if (debug_lvl & 0x20)
- cout << name << endl;
+ else {
+ tied_properties.push_back(name);
+ if (debug_lvl & 0x20) std::cout << name << std::endl;
+ }
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
if (!tie(name.c_str(), SGRawValuePointer<float>(pointer), useDefault))
cerr << "Failed to tie property " << name << " to a pointer" << endl;
- else if (debug_lvl & 0x20)
- cout << name << endl;
+ else {
+ tied_properties.push_back(name);
+ if (debug_lvl & 0x20) std::cout << name << std::endl;
+ }
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
if (!tie(name.c_str(), SGRawValuePointer<double>(pointer), useDefault))
cerr << "Failed to tie property " << name << " to a pointer" << endl;
- else if (debug_lvl & 0x20)
- cout << name << endl;
+ else {
+ tied_properties.push_back(name);
+ if (debug_lvl & 0x20) std::cout << name << std::endl;
+ }
}
} // namespace JSBSim