All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
_NdrFilesystemDiscoveryPlugin Class Referencefinal

Discovers nodes on the filesystem. More...

+ Inheritance diagram for _NdrFilesystemDiscoveryPlugin:

Public Types

using Filter = std::function< bool(NdrNodeDiscoveryResult &)>
 A filter for discovered nodes. More...
 
- Public Types inherited from NdrDiscoveryPlugin
using Context = NdrDiscoveryPluginContext
 
- Public Types inherited from TfRefBase
typedef void(* UniqueChangedFuncPtr )(TfRefBase const *, bool)
 

Public Member Functions

NDR_API _NdrFilesystemDiscoveryPlugin ()
 Constructor. More...
 
NDR_API _NdrFilesystemDiscoveryPlugin (Filter filter)
 DiscoverNodes() will pass each result to the given function for modification. More...
 
NDR_API ~_NdrFilesystemDiscoveryPlugin ()
 Destructor. More...
 
NDR_API NdrNodeDiscoveryResultVec DiscoverNodes (const Context &) override
 Discover all of the nodes that appear within the the search paths provided and match the extensions provided. More...
 
NDR_API const NdrStringVec & GetSearchURIs () const override
 Gets the paths that this plugin is searching for nodes in. More...
 
- Public Member Functions inherited from TfRefBase
size_t GetCurrentCount () const
 Return the current reference count of this object. More...
 
bool IsUnique () const
 Return true if only one TfRefPtr points to this object. More...
 
const TfRefCountGetRefCount () const
 
void SetShouldInvokeUniqueChangedListener (bool shouldCall)
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void const * GetUniqueIdentifier () const
 

Additional Inherited Members

- Static Public Member Functions inherited from TfRefBase
static TF_API void SetUniqueChangedListener (UniqueChangedListener listener)
 
- Protected Member Functions inherited from TfWeakBase
TfRefPtr< Tf_Remnant > _Register () const
 
template<class T >
TfRefPtr< Tf_Remnant > _Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

Discovers nodes on the filesystem.

The provided search paths are walked to find files that have certain extensions. If a file with a matching extension is found, it is turned into a NdrNodeDiscoveryResult and will be parsed into a node when its information is accessed.

Parameters for this plugin are specified via environment variables (which must be set before the library is loaded):

PXR_NDR_FS_PLUGIN_SEARCH_PATHS - The paths that should be searched, recursively, for files that represent nodes. Paths should be separated by either a ':' or a ';' depending on your platform (it should mimic the PATH env var on your platform). See ARCH_PATH_LIST_SEP.

PXR_NDR_FS_PLUGIN_ALLOWED_EXTS - The extensions on files that define nodes. Do not include the leading ".". Extensions should be separated by a colon.

PXR_NDR_FS_PLUGIN_FOLLOW_SYMLINKS - Whether symlinks should be followed while walking the search paths. Set to "true" (case sensitive) if they should be followed.

Definition at line 61 of file filesystemDiscovery.h.

Member Typedef Documentation

using Filter = std::function<bool(NdrNodeDiscoveryResult&)>

A filter for discovered nodes.

If the function returns false then the discovered node is discarded. Otherwise the function can modify the discovery result.

Definition at line 67 of file filesystemDiscovery.h.

Constructor & Destructor Documentation

Constructor.

DiscoverNodes() will pass each result to the given function for modification.

If the function returns false then the result is discarded.

NDR_API ~_NdrFilesystemDiscoveryPlugin ( )
inline

Destructor.

Definition at line 81 of file filesystemDiscovery.h.

Member Function Documentation

NDR_API NdrNodeDiscoveryResultVec DiscoverNodes ( const Context )
overridevirtual

Discover all of the nodes that appear within the the search paths provided and match the extensions provided.

Implements NdrDiscoveryPlugin.

NDR_API const NdrStringVec& GetSearchURIs ( ) const
inlineoverridevirtual

Gets the paths that this plugin is searching for nodes in.

Implements NdrDiscoveryPlugin.

Definition at line 90 of file filesystemDiscovery.h.


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