您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

snf_HeaderFinder.inline.hpp 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // snf_HeaderFinder.inline.hpp
  2. // Copyright (C) 2007 - 2009 ARM Research Labs, LLC.
  3. // See www.armresearch.com for the copyright terms.
  4. // Inline methods.
  5. inline const bool HeaderFinderPattern::operator<(const HeaderFinderPattern& R) const { // Comparator for set<> living.
  6. if(Header < R.Header) { // If the Header name is < then true!
  7. return true;
  8. } else
  9. if(Header == R.Header) { // If the Header name is == then
  10. if(Ordinal < R.Ordinal) { // check the Ordinal. If it's < then
  11. return true; // true!
  12. } else
  13. if(Ordinal == R.Ordinal) { // If the Ordinal == then
  14. if(Contains < R.Contains) { // check the Contains. If it is < then
  15. return true; // true!
  16. }
  17. }
  18. }
  19. return false; // In all other cases this is not < R
  20. }
  21. inline HeaderFinderPattern::HeaderFinderPattern(const HeaderFinderPattern& P) { // Copy constructor.
  22. Header = P.Header;
  23. Ordinal = P.Ordinal;
  24. Context = P.Context;
  25. Directive = P.Directive;
  26. Contains = P.Contains;
  27. }
  28. inline void HeaderFinderPattern::clear() { // Do this to make fresh and clean.
  29. Header.clear();
  30. Ordinal = Context = Directive = 0;
  31. Contains.clear();
  32. }
  33. inline HeaderFinderPattern&
  34. HeaderFinderPattern::operator=(const HeaderFinderPattern& R) { // Assignment operator.
  35. Header = R.Header;
  36. Ordinal = R.Ordinal;
  37. Context = R.Context;
  38. Directive = R.Directive;
  39. Contains = R.Contains;
  40. return *this;
  41. }
  42. inline const unsigned long int HeaderFinder::operator()() const { // Return the Directives.
  43. return Directives;
  44. }