I need to move the parameters of OmmConsumerConfig(0 into a configuration file. I understand that th

I need to move the parameters of OmmConsumerConfig(0 into a configuration file. I understand that the username is of type const thomsonreuters::ema::access::EmaString. How can I convert a cpp string to that data type?

Best Answer

  • Hi @liyarthomas

    EmaString class is a container of a null terminated Ascii character string. The constructor accept the pointer to the memory containing copied in character string.

    thomsonreuters::ema::access::EmaString::EmaString(const char * str,
    UInt32 length = EmaString::npos
    )

    For std::string, you can call the c_str() function to get a pointer to an array that contains a null-terminated sequence of characters for creating EmaString object.