2014-06-27 14:07:44 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2013-07-04 08:40:10 -07:00
|
|
|
#ifndef mozilla_dom_XPathExpression_h
|
|
|
|
#define mozilla_dom_XPathExpression_h
|
2014-06-27 14:07:44 -07:00
|
|
|
|
|
|
|
#include "nsIDOMXPathExpression.h"
|
|
|
|
#include "nsIDOMNSXPathExpression.h"
|
|
|
|
#include "txResultRecycler.h"
|
|
|
|
#include "nsAutoPtr.h"
|
|
|
|
#include "nsCycleCollectionParticipant.h"
|
|
|
|
#include "mozilla/Attributes.h"
|
|
|
|
|
|
|
|
class Expr;
|
|
|
|
class txXPathNode;
|
|
|
|
|
2013-07-04 08:40:10 -07:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2014-06-27 14:07:44 -07:00
|
|
|
/**
|
|
|
|
* A class for evaluating an XPath expression string
|
|
|
|
*/
|
2013-07-04 08:40:10 -07:00
|
|
|
class XPathExpression MOZ_FINAL : public nsIDOMXPathExpression,
|
|
|
|
public nsIDOMNSXPathExpression
|
2014-06-27 14:07:44 -07:00
|
|
|
{
|
|
|
|
public:
|
2013-07-04 08:40:10 -07:00
|
|
|
XPathExpression(nsAutoPtr<Expr>&& aExpression, txResultRecycler* aRecycler,
|
|
|
|
nsIDOMDocument *aDocument);
|
2014-06-27 14:07:44 -07:00
|
|
|
|
|
|
|
// nsISupports interface
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
2013-07-04 08:40:10 -07:00
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(XPathExpression,
|
2014-06-27 14:07:44 -07:00
|
|
|
nsIDOMXPathExpression)
|
|
|
|
|
|
|
|
// nsIDOMXPathExpression interface
|
|
|
|
NS_DECL_NSIDOMXPATHEXPRESSION
|
|
|
|
|
|
|
|
// nsIDOMNSXPathExpression interface
|
|
|
|
NS_DECL_NSIDOMNSXPATHEXPRESSION
|
|
|
|
|
|
|
|
private:
|
|
|
|
~nsXPathExpression() {}
|
|
|
|
|
|
|
|
nsAutoPtr<Expr> mExpression;
|
|
|
|
nsRefPtr<txResultRecycler> mRecycler;
|
|
|
|
nsCOMPtr<nsIDOMDocument> mDocument;
|
|
|
|
};
|
|
|
|
|
2013-07-04 08:40:10 -07:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif /* mozilla_dom_XPathExpression_h */
|