Loading...
Searching...
No Matches
filesystemDiscovery.h
Go to the documentation of this file.
1//
2// Copyright 2018 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7
8#ifndef PXR_USD_NDR_FILESYSTEM_DISCOVERY_H
9#define PXR_USD_NDR_FILESYSTEM_DISCOVERY_H
10
16
17#include "pxr/pxr.h"
18#include "pxr/usd/ndr/api.h"
20#include <functional>
21
22PXR_NAMESPACE_OPEN_SCOPE
23
25
53{
54public:
58 using Filter = std::function<bool(NdrNodeDiscoveryResult&)>;
59
61 NDR_API
63
67 NDR_API
69
71 NDR_API
73
79 NDR_API
80 NdrNodeDiscoveryResultVec DiscoverNodes(const Context&) override;
81
83 NDR_API
84 const NdrStringVec& GetSearchURIs() const override { return _searchPaths; }
85
86private:
88 NdrStringVec _searchPaths;
89
93 NdrStringVec _allowedExtensions;
94
96 bool _followSymlinks;
97
98 // The filter to run on the results.
99 Filter _filter;
100};
101
102PXR_NAMESPACE_CLOSE_SCOPE
103
104#endif // PXR_USD_NDR_FILESYSTEM_DISCOVERY_H
Discovers nodes on the filesystem.
NDR_API _NdrFilesystemDiscoveryPlugin()
Constructor.
NDR_API _NdrFilesystemDiscoveryPlugin(Filter filter)
DiscoverNodes() will pass each result to the given function for modification.
std::function< bool(NdrNodeDiscoveryResult &)> Filter
A filter for discovered nodes.
NDR_API const NdrStringVec & GetSearchURIs() const override
Gets the paths that this plugin is searching for nodes in.
NDR_API NdrNodeDiscoveryResultVec DiscoverNodes(const Context &) override
Discover all of the nodes that appear within the the search paths provided and match the extensions p...
NDR_API ~_NdrFilesystemDiscoveryPlugin()
Destructor.
A context for discovery.
Interface for discovery plugins.
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
Definition: declarePtrs.h:72
Represents the raw data of a node, and some other bits of metadata, that were determined via a NdrDis...