IdentifierUtils.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright (C) 2011, 2012 Google Inc.
  2. //
  3. // This file is part of YouCompleteMe.
  4. //
  5. // YouCompleteMe is free software: you can redistribute it and/or modify
  6. // it under the terms of the GNU General Public License as published by
  7. // the Free Software Foundation, either version 3 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // YouCompleteMe is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU General Public License
  16. // along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
  17. #ifndef IDENTIFIERUTILS_CPP_WFFUZNET
  18. #define IDENTIFIERUTILS_CPP_WFFUZNET
  19. #include "IdentifierDatabase.h"
  20. #include <vector>
  21. #include <string>
  22. #include <boost/filesystem.hpp>
  23. namespace YouCompleteMe {
  24. // NOTE: this function accepts the text param by value on purpose; it internally
  25. // needs a copy before processing the text so the copy might as well be made on
  26. // the parameter BUT if this code is compiled in C++11 mode a move constructor
  27. // can be called on the passed-in value. This is not possible if we accept the
  28. // param by const ref.
  29. std::string RemoveIdentifierFreeText( std::string text );
  30. std::vector< std::string > ExtractIdentifiersFromText(
  31. const std::string &text );
  32. FiletypeIdentifierMap ExtractIdentifiersFromTagsFile(
  33. const boost::filesystem::path &path_to_tag_file );
  34. } // namespace YouCompleteMe
  35. #endif /* end of include guard: IDENTIFIERUTILS_CPP_WFFUZNET */