xn::Query Class Reference
C++ Reference to Application Programmer Interface (API) » Managing the Production Graph

`#include <XnCppWrapper.h>`

## Public Member Functions

| Query ()
| Query (XnNodeQuery *pNodeQuery)
| ~Query ()
const XnNodeQuery * | GetUnderlyingObject () const
XnNodeQuery * | GetUnderlyingObject ()
XnStatus | SetVendor (const XnChar *strVendor)
XnStatus | SetName (const XnChar *strName)
XnStatus | SetMinVersion (const XnVersion &minVersion)
XnStatus | SetMinVersion (const Version &minVersion)
XnStatus | SetMaxVersion (const XnVersion &maxVersion)
XnStatus | SetMaxVersion (const Version &maxVersion)
XnStatus | AddSupportedCapability (const XnChar *strNeededCapability)
XnStatus | AddSupportedMapOutputMode (const XnMapOutputMode &MapOutputMode)
XnStatus | SetSupportedMinUserPositions (const XnUInt32 nCount)
XnStatus | SetExistingNodeOnly (XnBool bExistingNode)
XnStatus | AddNeededNode (const XnChar *strInstanceName)
XnStatus | SetCreationInfo (const XnChar *strCreationInfo)

## Detailed Description

Purpose: Represents a query, containing filters regarding node info objects. Note that the relation between the filters is an AND relation.

Usage: Instantiate a Query object and then use the provided methods to set up the filter conditions.

Remarks: The Query class provides a mechanism for searching and returning NodeInfo objects from a list while filtering them according to a filter argument. The relation between the filters is an AND relationship.

The mechanism works by instantiating a Query object and then using the provided methods to set up the filter conditions. The Query object is then used by a number of methods that search for nodes, e.g., the Create() method.

## Constructor & Destructor Documentation

## Query() [1/2]

xn::Query::Query | ( |  | ) |

inline

## Query() [2/2]

xn::Query::Query | ( | XnNodeQuery * | pNodeQuery | ) |

inline

## ~Query()

xn::Query::~Query | ( |  | ) |

inline

## Member Function Documentation

## AddNeededNode()

XnStatus xn::Query::AddNeededNode | ( | const XnChar * | strInstanceName | ) |

inline

Sets in the Query object that a specified node must be a dependant of the named node type.

Parameters

  [in] | strInstanceName | Name of the needed node.

## AddSupportedCapability()

XnStatus xn::Query::AddSupportedCapability | ( | const XnChar * | strNeededCapability | ) |

inline

Sets in the Query object a capability that the Node Alternative must support.

Parameters

  [in] | strNeededCapability | Name of the capability that the Node Alternative must support.

Remarks

Note that for checking if a capability is supported, the node must be created if it's not an already existing node. This operation might take a bit longer than usual.

## AddSupportedMapOutputMode()

XnStatus xn::Query::AddSupportedMapOutputMode | ( | const XnMapOutputMode & | MapOutputMode | ) |

inline

Sets in the Query object a MapOutput mode that the Node Alternative must support.

Parameters

  [in] | MapOutputMode | Map output mode. Each field of the mode can be set to (-1), meaning results will not be filtered by this field.

Remarks
  Note that for checking if a capability is supported, the node must be created if it's not an already existing node. This operation might take a bit longer than usual.

## GetUnderlyingObject() [1/2]

XnNodeQuery * xn::Query::GetUnderlyingObject | ( |  | ) |

inline

## GetUnderlyingObject() [2/2]

const XnNodeQuery * xn::Query::GetUnderlyingObject | ( |  | ) | const

inline

Gets the underlying C object

## SetCreationInfo()

XnStatus xn::Query::SetCreationInfo | ( | const XnChar * | strCreationInfo | ) |

inline

Sets the creation information field of the Query object. This relates to the creation information of the xn::NodeInfo class.

Parameters

  [in] | strCreationInfo | Creation information to set in the Query object.

## SetExistingNodeOnly()

XnStatus xn::Query::SetExistingNodeOnly | ( | XnBool | bExistingNode | ) |

inline

Sets in the Query object that the query will return only existing nodes, i.e., nodes that have been created, in other words their `Create()` method has been called.

Parameters

  [in] | bExistingNode | TRUE to return only existing nodes, FALSE otherwise.

Remarks

Note that there are many ways to create nodes, not just by their Create() method.

## SetMaxVersion() [1/2]

XnStatus xn::Query::SetMaxVersion | ( | const Version & | maxVersion | ) |

inline

Sets in the Query object the maximum required version allowed for the node alternative.

## SetMaxVersion() [2/2]

XnStatus xn::Query::SetMaxVersion | ( | const XnVersion & | maxVersion | ) |

inline

Sets in the Query object the maximum required version allowed for the node alternative.

## SetMinVersion() [1/2]

XnStatus xn::Query::SetMinVersion | ( | const Version & | minVersion | ) |

inline

Sets in the Query object the minimum required version allowed for the Node Alternative.

## SetMinVersion() [2/2]

XnStatus xn::Query::SetMinVersion | ( | const XnVersion & | minVersion | ) |

inline

Sets in the Query object the minimum required version allowed for the Node Alternative.

## SetName()

XnStatus xn::Query::SetName | ( | const XnChar * | strName | ) |

inline

Sets in the Query object the implementation name to search for. The same vendor might have more than one implementation, for example, two DepthGenerators "SensorV2" and "EEDepthGenerator". This is not the same as the instance name.

Parameters

  [in] | strName | Implementation name.

## SetSupportedMinUserPositions()

XnStatus xn::Query::SetSupportedMinUserPositions | ( | const XnUInt32 | nCount | ) |

inline

For full details and usage, see xnNodeQuerySetSupportedMinUserPositions

## SetVendor()

XnStatus xn::Query::SetVendor | ( | const XnChar * | strVendor | ) |

inline

Sets in the Query object the vendor name to search for.

Parameters

  [in] | strVendor | Vendor Name.

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

- XnCppWrapper.h