gsoap 数据绑定,如何访问 gsoap 生成的 .h 文件中的序列
我不知道如何访问 FilenameType_sequence
class ns1__FilenameType
{
public:
// SEQUENCE OF ELEMENTS <xs:sequence minOccurs="1" maxOccurs="unbounded">
$int __size_FilenameType_sequence 1;
class __ns1__FilenameType_sequence
{
// std::string with length 1
std::string filename 1;
} *__FilenameType_sequence ;
// END OF SEQUENCE
// A handle to the soap struct that manages this instance (automatically set)
struct soap *soap ;
};
我尝试使用它的新函数,然后将 ns1_FilenameType->_FilenameType_sequence = 设置为我的新对象,但这不起作用。
ns1__FilenameType_sequence * fnSeq = soap_new__ns1__FilenameType_sequence(soap, -1);
fnSeq->filename = "Name";
s1__FilenameType->__FilenameType_sequence = fnSeq;
我还认为 .push_back 函数可能会起作用,但初始测试没有成功。所以现在我没有主意了。任何新的将不胜感激。 请告诉我
谢谢乔希
如果您需要更多信息,
I have no idea how to access FilenameType_sequence
class ns1__FilenameType
{
public:
// SEQUENCE OF ELEMENTS <xs:sequence minOccurs="1" maxOccurs="unbounded">
$int __size_FilenameType_sequence 1;
class __ns1__FilenameType_sequence
{
// std::string with length 1
std::string filename 1;
} *__FilenameType_sequence ;
// END OF SEQUENCE
// A handle to the soap struct that manages this instance (automatically set)
struct soap *soap ;
};
I tried using its new function and then setting ns1_FilenameType->_FilenameType_sequence = to my new object but that didn't work.
ns1__FilenameType_sequence * fnSeq = soap_new__ns1__FilenameType_sequence(soap, -1);
fnSeq->filename = "Name";
s1__FilenameType->__FilenameType_sequence = fnSeq;
I also thought that maybe the .push_back function would work but initial testing didn't pan out. So now im all out of ideas. Any new ones would be greatly appreciated. Let me know if you need more information
Thanks
Josh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您遇到与我相同的问题,代码如下,
有点直观,但不是真的,希望这会有所帮助
In case you're having the same problem as me the code is as follows
so kinda intuitive but not realy, hope this helps