question

Upvotes
Accepted
3 2 2 6

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?

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @liyarthomas,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
11.3k 25 9 14

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.