YARP
Yet Another Robot Platform
yarp::os::ResourceFinderOptions Class Reference

These options are loosely based on http://wiki.icub.org/wiki/YARP_ResourceFinder. More...

#include <yarp/os/ResourceFinderOptions.h>

Detailed Description

These options are loosely based on http://wiki.icub.org/wiki/YARP_ResourceFinder.

For a User search location: YARP_CONFIG_HOME is only checked if the searchFlavor is ConfigLike YARP_DATA_HOME is only checked if the searchFlavor is DataLike

Definition at line 31 of file ResourceFinderOptions.h.

Public Types

enum  SearchLocations {
  NoLocation = 0x0000,
  Directory = 0x0001,
  Context = 0x0002,
  Robot = 0x0004,
  User = 0x0008,
  Sysadmin = 0x0010,
  Installed = 0x0020,
  NearMainConfig = 0x0040,
  ClassicContext = 0x1000,
  Default = User | Sysadmin | Installed,
  ModuleDefault = Default | Robot | Context | Directory | ClassicContext | NearMainConfig
}
 
enum  DuplicateFilesPolicy {
  First,
  All
}
 
enum  SearchFlavor {
  ConfigLike = 0x0001,
  DataLike = 0x0002,
  ConfigAndDataLike = ConfigLike | DataLike
}
 
enum  MessageFilter {
  ShowNone = 0x0000,
  ShowDirectories = 0x0001,
  ShowErrors = 0x0002,
  ShowFromFlags = 0x0004,
  ShowAll = ShowDirectories | ShowErrors
}
 

Public Member Functions

 ResourceFinderOptions (SearchLocations searchLocations=ModuleDefault, DuplicateFilesPolicy duplicateFilesPolicy=First, SearchFlavor searchFlavor=ConfigAndDataLike, const std::string &resourceType="", MessageFilter messageFilter=ShowFromFlags)
 

Static Public Member Functions

static ResourceFinderOptions findFirstMatch ()
 
static ResourceFinderOptions findAllMatch ()
 

Public Attributes

SearchLocations searchLocations
 
DuplicateFilesPolicy duplicateFilesPolicy
 
SearchFlavor searchFlavor
 
std::string resourceType
 
MessageFilter messageFilter
 

Member Enumeration Documentation

◆ DuplicateFilesPolicy

Enumerator
First 
All 

Definition at line 49 of file ResourceFinderOptions.h.

◆ MessageFilter

Enumerator
ShowNone 
ShowDirectories 
ShowErrors 
ShowFromFlags 
ShowAll 

Definition at line 60 of file ResourceFinderOptions.h.

◆ SearchFlavor

Enumerator
ConfigLike 
DataLike 
ConfigAndDataLike 

Definition at line 54 of file ResourceFinderOptions.h.

◆ SearchLocations

Enumerator
NoLocation 
Directory 
Context 
Robot 
User 
Sysadmin 
Installed 
NearMainConfig 
ClassicContext 
Default 
ModuleDefault 

Definition at line 34 of file ResourceFinderOptions.h.

Constructor & Destructor Documentation

◆ ResourceFinderOptions()

ResourceFinderOptions::ResourceFinderOptions ( SearchLocations  searchLocations = ModuleDefault,
DuplicateFilesPolicy  duplicateFilesPolicy = First,
SearchFlavor  searchFlavor = ConfigAndDataLike,
const std::string &  resourceType = "",
MessageFilter  messageFilter = ShowFromFlags 
)

Definition at line 13 of file ResourceFinderOptions.cpp.

Member Function Documentation

◆ findAllMatch()

static ResourceFinderOptions yarp::os::ResourceFinderOptions::findAllMatch ( )
inlinestatic

Definition at line 84 of file ResourceFinderOptions.h.

◆ findFirstMatch()

static ResourceFinderOptions yarp::os::ResourceFinderOptions::findFirstMatch ( )
inlinestatic

Definition at line 80 of file ResourceFinderOptions.h.

Member Data Documentation

◆ duplicateFilesPolicy

DuplicateFilesPolicy yarp::os::ResourceFinderOptions::duplicateFilesPolicy

Definition at line 69 of file ResourceFinderOptions.h.

◆ messageFilter

MessageFilter yarp::os::ResourceFinderOptions::messageFilter

Definition at line 72 of file ResourceFinderOptions.h.

◆ resourceType

std::string yarp::os::ResourceFinderOptions::resourceType

Definition at line 71 of file ResourceFinderOptions.h.

◆ searchFlavor

SearchFlavor yarp::os::ResourceFinderOptions::searchFlavor

Definition at line 70 of file ResourceFinderOptions.h.

◆ searchLocations

SearchLocations yarp::os::ResourceFinderOptions::searchLocations

Definition at line 68 of file ResourceFinderOptions.h.


The documentation for this class was generated from the following files: