enums: Enumerated Types

enumsR Documentation

Enumerated Types

Description

Enumerated types are used in few places across the API. These are types that can have only a limited set of named constant values.

These functions facilitate the conversion between integer value and string representation.

Usage

map_enum2int(enum, name)

map_int2enum(enum, value)

Arguments

enum

name of the enumeration type: e.g. "Condition", "FaDataType", "MarketData", "PriceTrigger".

name

string representation of value.

value

integer representation of name.

Value

map_enum2int returns the corresponding value.

map_int2enum returns the corresponding name.

Examples

map_enum2int("MarketData", "DELAYED")   # -> 3

map_int2enum("MarketData", 3)           # -> "DELAYED"

lbilli/rib documentation built on April 22, 2024, 7:26 p.m.