| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org> | 2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org> |
| 3 * Copyright (C) 2006, 2009 Apple Inc. | 3 * Copyright (C) 2006, 2009 Apple Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 namespace WebCore { | 33 namespace WebCore { |
| 34 | 34 |
| 35 namespace XPath { | 35 namespace XPath { |
| 36 | 36 |
| 37 class Predicate; | 37 class Predicate; |
| 38 class Step; | 38 class Step; |
| 39 | 39 |
| 40 class Filter : public Expression { | 40 class Filter : public Expression { |
| 41 public: | 41 public: |
| 42 Filter(Expression*, const Vector<Predicate*>& = Vector<Predicate*>()
); | 42 Filter(PassOwnPtr<Expression>, const Vector<Predicate*>& = Vector<Pr
edicate*>()); |
| 43 virtual ~Filter(); | 43 virtual ~Filter(); |
| 44 | 44 |
| 45 virtual Value evaluate() const; | 45 virtual Value evaluate() const; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 virtual Value::Type resultType() const { return Value::NodeSetValue;
} | 48 virtual Value::Type resultType() const { return Value::NodeSetValue;
} |
| 49 | 49 |
| 50 Expression* m_expr; | 50 OwnPtr<Expression> m_expr; |
| 51 Vector<Predicate*> m_predicates; | 51 Vector<OwnPtr<Predicate> > m_predicates; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 class LocationPath : public Expression { | 54 class LocationPath : public Expression { |
| 55 public: | 55 public: |
| 56 LocationPath(); | 56 LocationPath(); |
| 57 virtual ~LocationPath(); | 57 virtual ~LocationPath(); |
| 58 void setAbsolute(bool value) { m_absolute = value; setIsContextNodeS
ensitive(!m_absolute); } | 58 void setAbsolute(bool value) { m_absolute = value; setIsContextNodeS
ensitive(!m_absolute); } |
| 59 | 59 |
| 60 virtual Value evaluate() const; | 60 virtual Value evaluate() const; |
| 61 void evaluate(NodeSet& nodes) const; // nodes is an input/output par
ameter | 61 void evaluate(NodeSet& nodes) const; // nodes is an input/output par
ameter |
| (...skipping 19 matching lines...) Expand all Loading... |
| 81 virtual Value::Type resultType() const { return Value::NodeSetValue;
} | 81 virtual Value::Type resultType() const { return Value::NodeSetValue;
} |
| 82 | 82 |
| 83 Filter* m_filter; | 83 Filter* m_filter; |
| 84 LocationPath* m_path; | 84 LocationPath* m_path; |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| 90 #endif // XPath_Path_H | 90 #endif // XPath_Path_H |
| OLD | NEW |