Loading...
Searching...
No Matches
filesystemDiscovery.h
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
12
13#include "pxr/pxr.h"
14#include "pxr/usd/ndr/api.h"
15#include "pxr/usd/ndr/discoveryPlugin.h"
16#include <functional>
17
18PXR_NAMESPACE_OPEN_SCOPE
19
21
45{
46public:
50 using Filter = std::function<bool(NdrNodeDiscoveryResult&)>;
51
53 NDR_API
55
59 NDR_API
61
63 NDR_API
65
68 NDR_API
69 NdrNodeDiscoveryResultVec DiscoverNodes(const Context&) override;
70
72 NDR_API
73 const NdrStringVec& GetSearchURIs() const override { return _searchPaths; }
74
75private:
77 NdrStringVec _searchPaths;
78
82 NdrStringVec _allowedExtensions;
83
85 bool _followSymlinks;
86
87 // The filter to run on the results.
88 Filter _filter;
89};
90
91PXR_NAMESPACE_CLOSE_SCOPE
92
93#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...