StringMatching.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. /*!
  15. * @file StringMatching.h
  16. *
  17. */
  18. #ifndef STRINGMATCHING_H_
  19. #define STRINGMATCHING_H_
  20. #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
  21. namespace eprosima {
  22. namespace fastrtps{
  23. namespace rtps {
  24. /**
  25. * Class StringMatching used to match different strings against each other as defined by the POSIX fnmatch API (1003.2-1992
  26. section B.6).
  27. @ingroup UTILITIES_MODULE
  28. */
  29. class StringMatching
  30. {
  31. public:
  32. StringMatching();
  33. virtual ~StringMatching();
  34. /** Static method to match two strings.
  35. * It checks the string specified by the input argument to see if it matches the pattern specified by the pattern argument.
  36. */
  37. static bool matchString(const char* pattern,const char* input);
  38. };
  39. }
  40. } /* namespace rtps */
  41. } /* namespace eprosima */
  42. #endif
  43. #endif /* STRINGMATCHING_H_ */