dSearchPath.I 1.2 KB

123456789101112131415161718192021222324252627282930
  1. // Filename: dSearchPath.I
  2. // Created by: drose (01Jul00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) Carnegie Mellon University. All rights reserved.
  8. //
  9. // All use of this software is subject to the terms of the revised BSD
  10. // license. You should have received a copy of this license along
  11. // with this source code in a file named "LICENSE."
  12. //
  13. ////////////////////////////////////////////////////////////////////
  14. ////////////////////////////////////////////////////////////////////
  15. // Function: DSearchPath::search_path
  16. // Access: Public, Static
  17. // Description: A quick-and-easy way to search a searchpath for a
  18. // file when you don't feel like building or keeping
  19. // around a DSearchPath object. This simply
  20. // constructs a temporary DSearchPath based on the
  21. // indicated path string, and searches that.
  22. ////////////////////////////////////////////////////////////////////
  23. INLINE Filename DSearchPath::
  24. search_path(const Filename &filename, const string &path,
  25. const string &delimiters) {
  26. DSearchPath search(path, delimiters);
  27. return search.find_file(filename);
  28. }