[omniORB] Non-NULL terminated strings
David
movling at gmail.com
Thu Apr 17 19:59:10 BST 2008
Hi,
How would I represent a non-NULL terminated string in the best way? In the
C++ codebase I'm working with, those kinds of strings are represented with a
char * and a length field, put together in a struct. Unfortunately, omniidl
seems to map the string type to a char *, and not a C++ string. This means
that the IDL string datatype cannot be used for strings containing NULLs.
The spontaneous workaround was to do this in IDL:
typedef sequence<char> StringData;
Will this be incredibly inefficient? Are there other collection-type
datatypes in IDL, or is sequence the only one? Reason I'm asking is because
I think it's quite a hassle to use. A growable list would be a lot easier to
work with. Just to re-iterate, here's my original question: how do you guys
handle this scenario? Any help is appreciated.
/David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20080417/129a8916/attachment.htm
More information about the omniORB-list
mailing list