Hi,
I'm trying to implement a module that would iterate over the members of a dynamic data object, calling get or set method based on the member's typecode.
I was wondering whether I should treat TK_WSTRING as a primitive type? TK_STRING is primitive, and get_string/set_string are used, but I see no such methods in the api for wstring. Calling get_string on a TK_WSTRING member throws an exception.
Interestingly enough, I did find get_wstring/set_wstring in the c++ api. Is there a reason it is missing in java api?
Thanks,
Michael
Hi Michael,
I think the reason why there are getters and setters for
DDS_TK_WSTRING
in C and C++ is theDDS_Wchar
data type is internally mapped toRTI_UINT32
, instead of just achar
likeDDS_Char
does. However, in the Java implementation all strings are mapped to the nativeString
class.Best regards,
Fernando.