Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / xml / XPathPath.h
index f501926..d89293f 100644 (file)
 #include "core/xml/XPathExpressionNode.h"
 #include "core/xml/XPathNodeSet.h"
 
-namespace WebCore {
+namespace blink {
 
-    namespace XPath {
+namespace XPath {
 
-        class Predicate;
-        class Step;
+class Predicate;
+class Step;
 
-        class Filter : public Expression {
-        public:
-            Filter(PassOwnPtr<Expression>, Vector<OwnPtr<Predicate> >&);
-            virtual ~Filter();
+class Filter FINAL : public Expression {
+public:
+    Filter(PassOwnPtrWillBeRawPtr<Expression>, WillBeHeapVector<OwnPtrWillBeMember<Predicate> >&);
+    virtual ~Filter();
+    virtual void trace(Visitor*) OVERRIDE;
 
-            virtual Value evaluate() const;
+    virtual Value evaluate(EvaluationContext&) const OVERRIDE;
 
-        private:
-            virtual Value::Type resultType() const { return Value::NodeSetValue; }
+private:
+    virtual Value::Type resultType() const OVERRIDE { return Value::NodeSetValue; }
 
-            OwnPtr<Expression> m_expr;
-            Vector<OwnPtr<Predicate> > m_predicates;
-        };
+    OwnPtrWillBeMember<Expression> m_expr;
+    WillBeHeapVector<OwnPtrWillBeMember<Predicate> > m_predicates;
+};
 
-        class LocationPath : public Expression {
-        public:
-            LocationPath();
-            virtual ~LocationPath();
-            void setAbsolute(bool value) { m_absolute = value; setIsContextNodeSensitive(!m_absolute); }
+class LocationPath FINAL : public Expression {
+public:
+    LocationPath();
+    virtual ~LocationPath();
+    virtual void trace(Visitor*) OVERRIDE;
 
-            virtual Value evaluate() const;
-            void evaluate(NodeSet& nodes) const; // nodes is an input/output parameter
+    virtual Value evaluate(EvaluationContext&) const OVERRIDE;
+    void setAbsolute(bool value) { m_absolute = value; setIsContextNodeSensitive(!m_absolute); }
+    void evaluate(EvaluationContext&, NodeSet&) const; // nodes is an input/output parameter
+    void appendStep(Step*);
+    void insertFirstStep(Step*);
 
-            void appendStep(Step* step);
-            void insertFirstStep(Step* step);
+private:
+    virtual Value::Type resultType() const OVERRIDE { return Value::NodeSetValue; }
 
-        private:
-            virtual Value::Type resultType() const { return Value::NodeSetValue; }
+    WillBeHeapVector<RawPtrWillBeMember<Step> > m_steps;
+    bool m_absolute;
+};
 
-            Vector<Step*> m_steps;
-            bool m_absolute;
-        };
+class Path FINAL : public Expression {
+public:
+    Path(Expression*, LocationPath*);
+    virtual ~Path();
+    virtual void trace(Visitor*) OVERRIDE;
 
-        class Path : public Expression {
-        public:
-            Path(Filter*, LocationPath*);
-            virtual ~Path();
+    virtual Value evaluate(EvaluationContext&) const OVERRIDE;
 
-            virtual Value evaluate() const;
+private:
+    virtual Value::Type resultType() const OVERRIDE { return Value::NodeSetValue; }
 
-        private:
-            virtual Value::Type resultType() const { return Value::NodeSetValue; }
+    OwnPtrWillBeMember<Expression> m_filter;
+    OwnPtrWillBeMember<LocationPath> m_path;
+};
 
-            Filter* m_filter;
-            LocationPath* m_path;
-        };
-
-    }
 }
 
-#endif // XPath_Path_H
+}
+#endif // XPathPath_h