BLPAPI C++  3.24.11
RequestTemplate Class Reference

#include <blpapi_requesttemplate.h>

Public Member Functions

 RequestTemplate (blpapi_RequestTemplate_t *handle=0)
 
 RequestTemplate (const RequestTemplate &original)
 
 ~RequestTemplate ()
 
RequestTemplateoperator= (const RequestTemplate &rhs)
 
const blpapi_RequestTemplate_timpl () const
 
blpapi_RequestTemplate_timpl ()
 

Detailed Description

A handle to a single request template.

The RequestTemplate is a handle to a single underlying request template. The underlying request template is reference counted and destroyed when the last RequestTemplate object which references it is destroyed. RequestTemplate objects are copyable, there is no difference which instance of a RequestTemplate is used for sending requests. A copy of an RequestTemplate contains a reference to the same underlying request template as an original object.

Request templates may accelerate request processing by caching information required for a response (as it is done by the snapshot service) and eliminating the need to create a new request object every time.

Request templates are obtained from a Session and should be always used with the session that creates the template. When a session is terminated, any request templates associated with that session become invalid. Results of sending or canceling of invalid requests templates is undefined.

In order to send a request represented by a template, the "Session::sendRequest" method should be called with the RequestTemplate object passed as the first argument.

See Component blpapi_requesttemplate

Constructor & Destructor Documentation

◆ RequestTemplate() [1/2]

RequestTemplate ( blpapi_RequestTemplate_t handle = 0)
explicit

Construct a request template handle for the underlying request template specified by optionally specified handle.

◆ RequestTemplate() [2/2]

RequestTemplate ( const RequestTemplate original)

Construct a request template handle using underlying request template from original. This will add a reference to the underlying request template.

◆ ~RequestTemplate()

Destroy this request template handle. This will also destroy the underlying request template if there no other references to it.

Member Function Documentation

◆ impl() [1/2]

const blpapi_RequestTemplate_t * impl ( ) const

Returns the internal implementation.

◆ impl() [2/2]

Returns the internal implementation.

◆ operator=()

RequestTemplate & operator= ( const RequestTemplate rhs)

Copies the request template handle specified by rhs into the current request template handle. It will increase reference count of the underlying request template of the rhs and decrease reference count (and possibly destroy) of the underlying request template previously referenced by this object.


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