const char * FGEventInput::PROPERTY_ROOT = "/input/event";
FGEventInput::FGEventInput() :
- configMap( "Input/Event", fgGetNode( PROPERTY_ROOT, true ), "device-named" )
+ configMap( "Input/Event", fgGetNode(PROPERTY_ROOT, true), "device-named")
{
}
SGPropertyNode_ptr deviceNode = NULL;
// look for configuration in the device map
- if( configMap.count( inputDevice->GetName() ) > 0 ) {
+ if ( configMap.hasConfiguration( inputDevice->GetName() ) ) {
// found - copy to /input/event/device[n]
// find a free index
deviceNode = baseNode->getNode( "device", index, true );
// and copy the properties from the configuration tree
- copyProperties( configMap[ inputDevice->GetName() ], deviceNode );
+ copyProperties( configMap.configurationForDeviceName(inputDevice->GetName()), deviceNode );
}