2001-09-25 05:32:19 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2001-03-23 10:39:31 +03:00
|
|
|
|
|
|
|
#ifndef nsContentTestNode_h__
|
|
|
|
#define nsContentTestNode_h__
|
|
|
|
|
2013-05-30 00:43:41 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2001-08-14 11:59:59 +04:00
|
|
|
#include "nscore.h"
|
2001-03-23 10:39:31 +03:00
|
|
|
#include "nsRuleNetwork.h"
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
#include "nsIAtom.h"
|
2006-02-13 19:02:08 +03:00
|
|
|
#include "nsIDOMDocument.h"
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
|
2015-04-22 09:29:22 +03:00
|
|
|
class nsXULTemplateQueryProcessorRDF;
|
|
|
|
|
2006-02-13 19:02:08 +03:00
|
|
|
/**
|
|
|
|
* The nsContentTestNode is always the top node in a query's rule network. It
|
|
|
|
* exists so that Constrain can filter out resources that aren't part of a
|
|
|
|
* result.
|
|
|
|
*/
|
2001-03-23 10:39:31 +03:00
|
|
|
class nsContentTestNode : public TestNode
|
|
|
|
{
|
|
|
|
public:
|
2006-02-13 19:02:08 +03:00
|
|
|
nsContentTestNode(nsXULTemplateQueryProcessorRDF* aProcessor,
|
|
|
|
nsIAtom* aContentVariable);
|
2001-03-23 10:39:31 +03:00
|
|
|
|
2006-03-27 17:53:27 +04:00
|
|
|
virtual nsresult FilterInstantiations(InstantiationSet& aInstantiations,
|
2015-03-21 19:28:04 +03:00
|
|
|
bool* aCantHandleYet) const override;
|
2001-03-23 10:39:31 +03:00
|
|
|
|
2006-02-13 19:02:08 +03:00
|
|
|
nsresult
|
2015-03-21 19:28:04 +03:00
|
|
|
Constrain(InstantiationSet& aInstantiations) override;
|
2001-03-23 10:39:31 +03:00
|
|
|
|
2006-02-13 19:02:08 +03:00
|
|
|
void SetTag(nsIAtom* aTag, nsIDOMDocument* aDocument)
|
|
|
|
{
|
|
|
|
mTag = aTag;
|
|
|
|
mDocument = aDocument;
|
|
|
|
}
|
2001-03-23 10:39:31 +03:00
|
|
|
|
|
|
|
protected:
|
2006-02-13 19:02:08 +03:00
|
|
|
nsXULTemplateQueryProcessorRDF *mProcessor;
|
|
|
|
nsIDOMDocument* mDocument;
|
|
|
|
nsCOMPtr<nsIAtom> mRefVariable;
|
2001-03-23 10:39:31 +03:00
|
|
|
nsCOMPtr<nsIAtom> mTag;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsContentTestNode_h__
|
|
|
|
|