Public Member Functions

blpapi::Request Class Reference

#include <blpapi_request.h>

List of all members.

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 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)
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
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"));




Constructor & Destructor Documentation

blpapi::Request::Request ( blpapi_Request_t handle  )  [explicit]
blpapi::Request::Request ( RequestRef  src  ) 
blpapi::Request::Request ( Request src  ) 

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

blpapi::Request::~Request (  ) 

Destructor.


Member Function Documentation

blpapi::Request::operator RequestRef (  ) 
void blpapi::Request::set ( const char *  name,
bool  value 
)

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

void blpapi::Request::set ( const char *  name,
char  value 
)

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

void blpapi::Request::set ( const char *  name,
Int32  value 
)

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

void blpapi::Request::set ( const char *  name,
Int64  value 
)

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

void blpapi::Request::set ( const char *  name,
Float32  value 
)

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

void blpapi::Request::set ( const char *  name,
Float64  value 
)

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

void blpapi::Request::set ( const char *  name,
const Datetime value 
)

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

void blpapi::Request::set ( const char *  name,
const char *  value 
)

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

void blpapi::Request::set ( const Name name,
bool  value 
)

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

void blpapi::Request::set ( const Name name,
char  value 
)

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

void blpapi::Request::set ( const Name name,
Int32  value 
)

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

void blpapi::Request::set ( const Name name,
Int64  value 
)

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

void blpapi::Request::set ( const Name name,
Float32  value 
)

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

void blpapi::Request::set ( const Name name,
Float64  value 
)

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

void blpapi::Request::set ( const Name name,
const Datetime value 
)

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

void blpapi::Request::set ( const Name name,
const char *  value 
)

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

void blpapi::Request::append ( const char *  name,
bool  value 
)

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

void blpapi::Request::append ( const char *  name,
char  value 
)

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

void blpapi::Request::append ( const char *  name,
Int32  value 
)

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

void blpapi::Request::append ( const char *  name,
Int64  value 
)

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

void blpapi::Request::append ( const char *  name,
Float32  value 
)

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

void blpapi::Request::append ( const char *  name,
Float64  value 
)

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

void blpapi::Request::append ( const char *  name,
const Datetime value 
)

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

void blpapi::Request::append ( const char *  name,
const char *  value 
)

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

void blpapi::Request::append ( const Name name,
bool  value 
)

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

void blpapi::Request::append ( const Name name,
char  value 
)

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

void blpapi::Request::append ( const Name name,
Int32  value 
)

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

void blpapi::Request::append ( const Name name,
Int64  value 
)

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

void blpapi::Request::append ( const Name name,
Float32  value 
)

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

void blpapi::Request::append ( const Name name,
Float64  value 
)

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

void blpapi::Request::append ( const Name name,
const Datetime value 
)

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

void blpapi::Request::append ( const Name name,
const char *  value 
)

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

Element blpapi::Request::asElement (  ) 

Returns the contents of this request as a modifiable Element.

Element blpapi::Request::getElement ( const char *  name  ) 

Equivalent to asElement().getElement(name).

Element blpapi::Request::getElement ( const Name name  ) 

Equivalent to asElement().getElement(name).

const Element blpapi::Request::getElement ( const char *  name  )  const

Equivalent to asElement().getElement(name).

const Element blpapi::Request::getElement ( const Name name  )  const

Equivalent to asElement().getElement(name).

const Element blpapi::Request::asElement (  )  const

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

blpapi_Request_t* blpapi::Request::handle (  )  const
std::ostream& blpapi::Request::print ( std::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const

Format this Element 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).


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