1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- // snf_HeaderFinder.inline.hpp
- // Copyright (C) 2007 - 2009 ARM Research Labs, LLC.
- // See www.armresearch.com for the copyright terms.
- // Inline methods.
-
- inline const bool HeaderFinderPattern::operator<(const HeaderFinderPattern& R) const { // Comparator for set<> living.
- if(Header < R.Header) { // If the Header name is < then true!
- return true;
- } else
- if(Header == R.Header) { // If the Header name is == then
- if(Ordinal < R.Ordinal) { // check the Ordinal. If it's < then
- return true; // true!
- } else
- if(Ordinal == R.Ordinal) { // If the Ordinal == then
- if(Contains < R.Contains) { // check the Contains. If it is < then
- return true; // true!
- } else
- if(Context < R.Context) {
- return true;
- }
- }
- }
- return false; // In all other cases this is not < R
- }
-
- inline HeaderFinderPattern::HeaderFinderPattern(const HeaderFinderPattern& P) { // Copy constructor.
- Header = P.Header;
- Ordinal = P.Ordinal;
- Context = P.Context;
- Directive = P.Directive;
- Contains = P.Contains;
- }
-
- inline void HeaderFinderPattern::clear() { // Do this to make fresh and clean.
- Header.clear();
- Ordinal = Context = Directive = 0;
- Contains.clear();
- }
-
- inline HeaderFinderPattern&
- HeaderFinderPattern::operator=(const HeaderFinderPattern& R) { // Assignment operator.
- Header = R.Header;
- Ordinal = R.Ordinal;
- Context = R.Context;
- Directive = R.Directive;
- Contains = R.Contains;
- return *this;
- }
-
-
- inline const unsigned long int HeaderFinder::operator()() const { // Return the Directives.
- return Directives;
- }
|