class TypeFilter : public FGPositioned::Filter
{
public:
- TypeFilter(const FGPositioned::Type type);
+ TypeFilter( const FGPositioned::Type type = FGPositioned::INVALID );
+ TypeFilter( const FGPositioned::Type minType,
+ const FGPositioned::Type maxType );
- TypeFilter(const FGPositioned::Type minType,
- const FGPositioned::Type maxType);
-
- virtual FGPositioned::Type minType() const {
- return _mintype;
- }
+ /**
+ * Construct from string containing type
+ *
+ * @param type One of "fix"|"vor"|"ndb"|"ils"|"dme"|"tacan"|"any"
+ */
+ bool fromTypeString(const std::string& type);
- virtual FGPositioned::Type maxType() const {
- return _maxtype;
- }
+ virtual FGPositioned::Type minType() const { return _mintype; }
+ virtual FGPositioned::Type maxType() const { return _maxtype; }
protected:
FGPositioned::Type _mintype;
static TypeFilter* tacanFilter();
- static TypeFilter* carrierFilter();
+ static TypeFilter* mobileTacanFilter();
/** Query the database for the specified station. It is assumed
* that there will be multiple stations with matching frequencies
* so a position must be specified.
*/
- static FGNavRecord *findByFreq( double freq, const SGGeod& position,
+ static FGNavRecordRef findByFreq( double freq, const SGGeod& position,
TypeFilter* filter = NULL);
/**
* mobile TACANs which have no valid position. The first match is
* returned only.
*/
- static FGNavRecord *findByFreq( double freq, TypeFilter* filter = NULL);
+ static FGNavRecordRef findByFreq( double freq, TypeFilter* filter = NULL);
static nav_list_type findAllByFreq( double freq, const SGGeod& position,
TypeFilter* filter = NULL);