Poco::Netconf

class Filter

Library: Netconf
Package: Filtering
Header: Poco/Netconf/Filter.h

Description

A Filter filters a document either by xpath or by a XML tree. A uninitialized filter will return everything, If a filter is initialized with an empty Document (which is valid), it will return nothing. If it is not initialized at all, it will return everything.

Member Summary

Member Functions: getSubTree, getXPath, setSubTree, setToGetAll, setXPath, type

Enumerations

Type

F_GETALL = 0

F_XPATH = 1

F_SUBTREE = 2

Constructors

Filter

Filter();

Creates a default Filter, which doesn't filter at all.

Destructor

~Filter

~Filter();

Destroys the Filter.

Member Functions

getSubTree inline

Poco::AutoPtr < XML::Document > getSubTree() const;

Returns the tree, which can be 0.

getXPath inline

const std::string & getXPath() const;

Returns an xpath expression, can be empty.

setSubTree

void setSubTree(
    Poco::AutoPtr < XML::Document > filter = Poco::AutoPtr < XML::Document > ()
);

Creates a subtree filter, removes a previously set xpath filter. If the document is null, the filter will filter everything, i.e. returning nothing.

setToGetAll

void setToGetAll();

Disables filtering.

setXPath

void setXPath(
    const std::string & xPathExpress
);

Creates a xpath filter, removes a previously set XML::Document filter.

type inline

Type type() const;

Returns the type of the filter.