//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-void FGPropertyManager::unbind(void)
+void FGPropertyManager::Unbind(void)
{
vector<string>::iterator it;
for (it = tied_properties.begin();it < tied_properties.end();it++)
void FGPropertyManager::Tie (const string &name, bool *pointer, bool useDefault)
{
- tied_properties.push_back(name);
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;
+ }
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGPropertyManager::Tie (const string &name, int *pointer,
bool useDefault )
{
- tied_properties.push_back(name);
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;
+ }
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGPropertyManager::Tie (const string &name, long *pointer,
bool useDefault )
{
- tied_properties.push_back(name);
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;
+ }
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGPropertyManager::Tie (const string &name, float *pointer,
bool useDefault )
{
- tied_properties.push_back(name);
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;
+ }
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGPropertyManager::Tie (const string &name, double *pointer, bool useDefault)
{
- tied_properties.push_back(name);
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