Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with ZeroBuff and [string] type #82

Open
ccrisrober opened this issue Mar 2, 2017 · 1 comment
Open

Problem with ZeroBuff and [string] type #82

ccrisrober opened this issue Mar 2, 2017 · 1 comment

Comments

@ccrisrober
Copy link

I'm Cristian Rodriguez, from the group working back in URJC/UPM with Pablo Toharia. Right now I'm trying to use a custom ZeroBuff fbs file that required a std::vector of char* (or vector) but zerobufCxx generates a std::vector when I use string or [string].
My fbs file contains:

namespace zeroeq.gmrv;

table SelectionStr
{
 ids:[string];
}

I've seen in the python script (zerobufCxx) it converts string to zerobuf::Vector< char >.
With the following fbs, I get the same result in the two attributes:

namespace zeroeq.gmrv;

table SelectionStr
{
 fooStrArr:[string];
 fooStr:string;
}

I had been trying to modify your Python script to generate std::vector (string) and std::vector<char*> ([string]), but I prefer to ask you how can I resolve this without change the script.
Any ideas on this?
Thank you!

@eile
Copy link
Contributor

eile commented Mar 3, 2017

Hi Cristian,

ZeroBuf does not yet support dynamic arrays of dynamic-sized types. This is on the list, but due to the complexity of implementing the allocator code not a very popular topic. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants