class IO2GValueMap

Parents
IAddRef

Brief

A value map containing order parameters.

Details

To create IO2GValueMap use IO2GRequestFactory.createValueMap.
IO2GValueMap contains elements of O2GRequestParamsEnum (order parameters) as keys and corresponding string, boolean, double, or integer values.
IO2GValueMap is used to combine order parameters when creating order request by IO2GRequestFactory.createOrderRequest.

Create and fill IO2GValueMap [hide]

     IO2GValueMap* CExample::createOrder(const char* offerID, const char* accountID, double rate, int amount, const char* buySell, const char* orderType)
    {
        using namespace O2G2;
        O2G2Ptr<IO2GRequestFactory> factory = getRequestFactory();
        IO2GValueMap* valuemap = factory->createValueMap();
        valuemap->setString(Command, Commands::CreateOrder);
        valuemap->setString(OrderType, orderType);
        valuemap->setString(AccountID, accountID);
        valuemap->setString(OfferID, offerID);
        valuemap->setString(BuySell, buySell);
        valuemap->setDouble(Rate, rate);
        valuemap->setInt(Amount, amount);
        return valuemap;
    }

Public Methods

appendChild

Adds the value map to the list of child value maps.

clear

Clears the value map.

clone

Makes a copy of the value map.

getChild

Gets a child value map.

getChildrenCount

Gets the number of child value maps.

setBoolean

Sets a boolean value.

setDouble

Sets a double value.

setInt

Sets an integer value.

setString

Sets a string value.

back