[omniORB] Non-NULL terminated strings
movling at gmail.com
Thu Apr 17 19:59:10 BST 2008
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the omniORB-list