match.hh (2665:a124942bacb8) match.hh (13804:f53a9c35b287)
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 33 unchanged lines hidden (view full) ---

42{
43 protected:
44 std::vector<std::vector<std::string> > tokens;
45 bool domatch(const std::string &name) const;
46
47 public:
48 ObjectMatch();
49 ObjectMatch(const std::string &expression);
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 33 unchanged lines hidden (view full) ---

42{
43 protected:
44 std::vector<std::vector<std::string> > tokens;
45 bool domatch(const std::string &name) const;
46
47 public:
48 ObjectMatch();
49 ObjectMatch(const std::string &expression);
50 void add(const ObjectMatch &other);
50 void setExpression(const std::string &expression);
51 void setExpression(const std::vector<std::string> &expression);
52 bool match(const std::string &name) const
53 {
54 return tokens.empty() ? false : domatch(name);
55 }
56};
57
58#endif // __BASE_MATCH_HH__
59
51 void setExpression(const std::string &expression);
52 void setExpression(const std::vector<std::string> &expression);
53 bool match(const std::string &name) const
54 {
55 return tokens.empty() ? false : domatch(name);
56 }
57};
58
59#endif // __BASE_MATCH_HH__
60