Sparksee 6.1.0
QueryStreamManager Class Referenceabstract

QueryStreamManager interface. More...

#include <Query.h>

Public Member Functions

virtual ~QueryStreamManager ()
 Destructor.
virtual QueryStreamGetQueryStream (const std::wstring &name, Session *session)=0
 Returns an instance of a QueryStream with the given name or NULL.
virtual void ReleaseQueryStream (QueryStream *qstream)=0
 Release a QueryStream.

Protected Member Functions

 QueryStreamManager ()
 Default constructor.

Friends

class Database

Detailed Description

QueryStreamManager interface.

A QueryStreamManager is the interface to handle objects that will implement user defined query operations through the STREAM operator.

When a query using a custom named STREAM operator requires it it will allocate a QueryStream object using the provided QueryStreamManagers. And once it's finished it will be released through the same QueryStreamManager that was used to allocate it.

Application exceptions must be cached by the subclass that implements the interface.

Maintaining and freeing the QueryStreamManager itself is responsibility of the caller.

Author
Sparsity Technologies http://www.sparsity-technologies.com

Member Function Documentation

◆ GetQueryStream()

virtual QueryStream * QueryStreamManager::GetQueryStream ( const std::wstring & name,
Session * session )
pure virtual

Returns an instance of a QueryStream with the given name or NULL.

If this manager handles the given name it will return an instance of a QueryStream that will provide the requested QueryStream operation.

The ReleaseQueryStream will be called once it's usage is finished. It's up to the QueryStreamManager implementation to really allocate/deallocate a new QueryStream each time or share a static one.

Parameters
name[In] The name of the QueryStream that we want to get
session[In] A pointer to the Session used in the Query and may be required by the Stream.
Returns
Returns a QueryStream or NULL

◆ ReleaseQueryStream()

virtual void QueryStreamManager::ReleaseQueryStream ( QueryStream * qstream)
pure virtual

Release a QueryStream.

Precondition
The QueryStream must have been reserved by the same QueryStreamManager

The Manager must free the QueryStream if it was allocated or handle it as it requires for it's implementation.

Parameters
qstream[In] The QueryStream to be released.

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