BLPAPI C++  3.24.5
Request Class Reference

#include <blpapi_request.h>

Public Member Functions

 Request (blpapi_Request_t *handle)
 
 Request (RequestRef src)
 
 Request (Request &src)
 
 ~Request ()
 
 operator RequestRef ()
 
void set (const char *name, bool value)
 
void set (const char *name, char value)
 
void set (const char *name, Int32 value)
 
void set (const char *name, Int64 value)
 
void set (const char *name, Float32 value)
 
void set (const char *name, Float64 value)
 
void set (const char *name, const Datetime &value)
 
void set (const char *name, const char *value)
 
void set (const Name &name, bool value)
 
void set (const Name &name, char value)
 
void set (const Name &name, Int32 value)
 
void set (const Name &name, Int64 value)
 
void set (const Name &name, Float32 value)
 
void set (const Name &name, Float64 value)
 
void set (const Name &name, const Datetime &value)
 
void set (const Name &name, const char *value)
 
void set (const Name &name, const std::string &value)
 
void set (const Name &name, const void *value, std::size_t length)
 
template<typename BYTES , typename std::enable_if< IsByteSequence< BYTES >::value, bool >::type = true>
void set (const Name &name, const BYTES &value)
 
void append (const char *name, bool value)
 
void append (const char *name, char value)
 
void append (const char *name, Int32 value)
 
void append (const char *name, Int64 value)
 
void append (const char *name, Float32 value)
 
void append (const char *name, Float64 value)
 
void append (const char *name, const Datetime &value)
 
void append (const char *name, const char *value)
 
void append (const Name &name, bool value)
 
void append (const Name &name, char value)
 
void append (const Name &name, Int32 value)
 
void append (const Name &name, Int64 value)
 
void append (const Name &name, Float32 value)
 
void append (const Name &name, Float64 value)
 
void append (const Name &name, const Datetime &value)
 
void append (const Name &name, const char *value)
 
void append (const Name &name, const std::string &value)
 
Element asElement ()
 
Element getElement (const char *name)
 
Element getElement (const Name &name)
 
const Element getElement (const char *name) const
 
const Element getElement (const Name &name) const
 
const Element asElement () const
 
const char * getRequestId () const
 
blpapi_Request_thandle () const
 
std::ostream & print (std::ostream &stream, int level=0, int spacesPerLevel=4) const
 

Detailed Description

A single request to a single service.

Request objects are created using Service::createRequest() or Service::createAuthorizationRequest(). They are used with Session::sendRequest() or Session::sendAuthorizationRequest().

The Request object contains the parameters for a single request to a single service. Once a Request has been created its fields can be populated directly using the convenience functions set() and append() functions or using the Element interface on the Element returned by asElement().

The schema for the Request can be queried using the Element interface on the Element returned by asElement().

Request objects cannot be duplicated. Copying a Request causes the original Request to become invalid. The API provides support for common idioms which require a normal copy constructor. For example, you can write the following code.

Request request(service.createRequest("operationName"));

However, if you write this requestOne will become invalid and unusable.

Request requestOne(service.createRequest("operationName"));
Request requestTwo(requestOne);
// At this point requestOne is no longer valid

This should be written as follows.

Request requestOne(service.createRequest("operationName"));
Request requestTwo(service.createRequest("operationName"));

See Component blpapi_request

Constructor & Destructor Documentation

◆ Request() [1/3]

Request ( blpapi_Request_t handle)
explicit

◆ Request() [2/3]

Request ( RequestRef  src)

◆ Request() [3/3]

Request ( Request src)

Initialize a Request from the specified non-const src. After this the src Request is invalid.

◆ ~Request()

~Request ( )

Destructor.

Member Function Documentation

◆ append() [1/17]

void append ( const char *  name,
bool  value 
)

Equivalent to asElement().append(name, value).

◆ append() [2/17]

void append ( const char *  name,
char  value 
)

Equivalent to asElement().append(name, value).

◆ append() [3/17]

void append ( const char *  name,
Int32  value 
)

Equivalent to asElement().append(name, value).

◆ append() [4/17]

void append ( const char *  name,
Int64  value 
)

Equivalent to asElement().append(name, value).

◆ append() [5/17]

void append ( const char *  name,
Float32  value 
)

Equivalent to asElement().append(name, value).

◆ append() [6/17]

void append ( const char *  name,
Float64  value 
)

Equivalent to asElement().append(name, value).

◆ append() [7/17]

void append ( const char *  name,
const Datetime value 
)

Equivalent to asElement().append(name, value).

◆ append() [8/17]

void append ( const char *  name,
const char *  value 
)

Equivalent to asElement().append(name, value).

◆ append() [9/17]

void append ( const Name name,
bool  value 
)

Equivalent to asElement().append(name, value).

◆ append() [10/17]

void append ( const Name name,
char  value 
)

Equivalent to asElement().append(name, value).

◆ append() [11/17]

void append ( const Name name,
Int32  value 
)

Equivalent to asElement().append(name, value).

◆ append() [12/17]

void append ( const Name name,
Int64  value 
)

Equivalent to asElement().append(name, value).

◆ append() [13/17]

void append ( const Name name,
Float32  value 
)

Equivalent to asElement().append(name, value).

◆ append() [14/17]

void append ( const Name name,
Float64  value 
)

Equivalent to asElement().append(name, value).

◆ append() [15/17]

void append ( const Name name,
const Datetime value 
)

Equivalent to asElement().append(name, value).

◆ append() [16/17]

void append ( const Name name,
const char *  value 
)

Equivalent to asElement().append(name, value).

◆ append() [17/17]

void append ( const Name name,
const std::string &  value 
)

Equivalent to asElement().append(name, value).

◆ asElement() [1/2]

Element asElement ( )

Returns the contents of this request as a modifiable Element.

◆ asElement() [2/2]

const Element asElement ( ) const

Returns the contents of this request as a read-only Element.

◆ getElement() [1/4]

Element getElement ( const char *  name)

Equivalent to asElement().getElement(name).

◆ getElement() [2/4]

Element getElement ( const Name name)

Equivalent to asElement().getElement(name).

◆ getElement() [3/4]

const Element getElement ( const char *  name) const

Equivalent to asElement().getElement(name).

◆ getElement() [4/4]

const Element getElement ( const Name name) const

Equivalent to asElement().getElement(name).

◆ getRequestId()

const char * getRequestId ( ) const

Return a pointer offering unmodifiable access to the request's id if one exists, otherwise return null.

If there are issues with this request, the request id can be reported to Bloomberg for troubleshooting purposes.

Note that request id is not the same as correlation id and should not be used for correlation purposes.

◆ handle()

blpapi_Request_t * handle ( ) const

◆ operator RequestRef()

operator RequestRef ( )

◆ print()

std::ostream & print ( std::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const

Format this Request to the specified output stream at the (absolute value of) the optionally specified indentation level and return a reference to stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level).

◆ set() [1/19]

void set ( const char *  name,
bool  value 
)

Equivalent to asElement().set(name, value).

◆ set() [2/19]

void set ( const char *  name,
char  value 
)

Equivalent to asElement().set(name, value).

◆ set() [3/19]

void set ( const char *  name,
Int32  value 
)

Equivalent to asElement().set(name, value).

◆ set() [4/19]

void set ( const char *  name,
Int64  value 
)

Equivalent to asElement().set(name, value).

◆ set() [5/19]

void set ( const char *  name,
Float32  value 
)

Equivalent to asElement().set(name, value).

◆ set() [6/19]

void set ( const char *  name,
Float64  value 
)

Equivalent to asElement().set(name, value).

◆ set() [7/19]

void set ( const char *  name,
const Datetime value 
)

Equivalent to asElement().set(name, value).

◆ set() [8/19]

void set ( const char *  name,
const char *  value 
)

Equivalent to asElement().set(name, value).

◆ set() [9/19]

void set ( const Name name,
bool  value 
)

Equivalent to asElement().set(name, value).

◆ set() [10/19]

void set ( const Name name,
char  value 
)

Equivalent to asElement().set(name, value).

◆ set() [11/19]

void set ( const Name name,
Int32  value 
)

Equivalent to asElement().set(name, value).

◆ set() [12/19]

void set ( const Name name,
Int64  value 
)

Equivalent to asElement().set(name, value).

◆ set() [13/19]

void set ( const Name name,
Float32  value 
)

Equivalent to asElement().set(name, value).

◆ set() [14/19]

void set ( const Name name,
Float64  value 
)

Equivalent to asElement().set(name, value).

◆ set() [15/19]

void set ( const Name name,
const Datetime value 
)

Equivalent to asElement().set(name, value).

◆ set() [16/19]

void set ( const Name name,
const char *  value 
)

Equivalent to asElement().set(name, value).

◆ set() [17/19]

void set ( const Name name,
const std::string &  value 
)

Equivalent to asElement().set(name, value).

◆ set() [18/19]

void set ( const Name name,
const void *  value,
std::size_t  length 
)

Equivalent to asElement().set(name, value, length).

◆ set() [19/19]

void set ( const Name name,
const BYTES &  value 
)

Equivalent to asElement().set(name, value).


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