FeatureNeg Class Reference

`#include <featureneg.h>`

Inheritance diagram for FeatureNeg:
[legend]

## Public Member Functions

| FeatureNeg (DataForm *form)
| FeatureNeg (const Tag *tag=0)
virtual | ~FeatureNeg ()
const DataForm * | form () const
virtual const std::string & | filterString () const
virtual StanzaExtension * | newInstance (const Tag *tag) const
virtual Tag * | tag () const
virtual StanzaExtension * | clone () const
Public Member Functions inherited from StanzaExtension
| StanzaExtension (int type)
virtual | ~StanzaExtension ()
virtual Stanza * | embeddedStanza () const
virtual Tag * | embeddedTag () const
int | extensionType () const

## Detailed Description

An abstraction of Feature Negotiation (XEP-0020), implemented as a StanzaExtension.

XEP Version: 1.5

Author
  Jakob Schröter js@ca.nosp@m.maya.nosp@m..net

Since
  1.0

Definition at line 35 of file featureneg.h.

## Constructor & Destructor Documentation

## FeatureNeg() [1/2]

FeatureNeg | ( | DataForm * | form | ) |

Creates a new wrapper object using the given DataForm.

Parameters

  form | The DataForm to embed. The FeatureNeg object will own the DataForm.

Definition at line 21 of file featureneg.cpp.

## FeatureNeg() [2/2]

FeatureNeg | ( | const Tag * | tag = 0 | ) |

Creates a new wrapper object from the given Tag.

Parameters

  tag | The Tag to parse.

Definition at line 26 of file featureneg.cpp.

## ~FeatureNeg()

~FeatureNeg | ( |  | ) |

virtual

Virtual destructor.

Definition at line 37 of file featureneg.cpp.

## Member Function Documentation

## clone()

virtual StanzaExtension * clone | ( |  | ) | const

inline virtual

Returns an identical copy of the current StanzaExtension.

Returns
  An identical copy of the current StanzaExtension.

Implements StanzaExtension.

Definition at line 74 of file featureneg.h.

## filterString()

const std::string & filterString | ( |  | ) | const

virtual

Returns an XPath expression that describes a path to child elements of a stanza that an extension handles.

Returns
  The extension's filter string.

Implements StanzaExtension.

Definition at line 42 of file featureneg.cpp.

## form()

const DataForm * form | ( |  | ) | const

inline

Returns the wrapped DataForm.

Returns
  The wrapped DataForm. May be 0.

Definition at line 59 of file featureneg.h.

## newInstance()

virtual StanzaExtension * newInstance | ( | const Tag * | tag | ) | const

inline virtual

Returns a new Instance of the derived type. Usually, for a derived class FooExtension, the implementation of this function looks like:

StanzaExtension* FooExtension::newInstance( const Tag* tag ) const
{
return new FooExtension( tag );
}
gloox::FeatureNeg::tag
virtual Tag * tag() const
Definition featureneg.cpp:49
gloox::StanzaExtension::StanzaExtension
StanzaExtension(int type)
Definition stanzaextension.h:211
gloox::Tag
This is an abstraction of an XML element.
Definition tag.h:47

Returns
  The derived extension's new instance.

Implements StanzaExtension.

Definition at line 65 of file featureneg.h.

## tag()

Tag * tag | ( |  | ) | const

virtual

Returns a Tag representation of the extension.

Returns
  A Tag representation of the extension.

Implements StanzaExtension.

Definition at line 49 of file featureneg.cpp.

The documentation for this class was generated from the following files:

- featureneg.h
- featureneg.cpp