Drake
drake_path.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #include "drake/common/drake_deprecated.h"
6 #include "drake/common/drake_optional.h"
7 
8 namespace drake {
9 
10 /// Returns the fully-qualified path to the root of the `drake` source tree.
11 DRAKE_DEPRECATED("Please use drake::FindResource() instead.")
12 std::string GetDrakePath();
13 
14 /// (Advanced) Returns the fully-qualified path to the first folder containing
15 /// Drake resources as located by FindResource, or nullopt if none is found.
16 /// For example `${result}/examples/pendulum/Pendulum.urdf` would be the path
17 /// to the Pendulum example's URDF resource.
18 ///
19 /// Most users should prefer FindResource() or FindResourceOrThrow() to locate
20 /// Drake resources for a specific resource filename. This method only exists
21 /// for legacy compatibility reasons, and might eventually be removed.
22 optional<std::string> MaybeGetDrakePath();
23 
24 } // namespace drake
Definition: automotive_demo.cc:89
std::string GetDrakePath()
Returns the fully-qualified path to the root of the drake source tree.
Definition: drake_path.cc:33
STL namespace.
stx::optional< T > optional
Definition: drake_optional.h:14
optional< std::string > MaybeGetDrakePath()
(Advanced) Returns the fully-qualified path to the first folder containing Drake resources as located...
Definition: drake_path.cc:29
#define DRAKE_DEPRECATED(message)
Use DRAKE_DEPRECATED("message") to discourage use of particular classes, typedefs, variables, non-static data members, functions, arguments, enumerations, and template specializations.
Definition: drake_deprecated.h:33