B
Brian
Shalom
Release 1.13 of the C++ Middleware Writer is now on line. This
release
adds support for the following:
1. A lil_string class which throws an exception if an operation
would result in a string more than 255 characters. This
guarantees that the length of the string can be marshalled
with one byte. Lil_string is used, for example, to hold account
passwords.
2. Move semantics. A config file parameter, 'Permit-std::move',
is used to indicate that the generated code may use std::move.
The following shows an example of output when
Permit-std::move is turned on.
template <typename B>
void
Receive(B* buf, vector<deque<lil_string> >& abt1)
{
uint32_t headCount[2];
buf->Give(headCount[0]);
abt1.reserve(abt1.size() + headCount[0]);
while (headCount[0] > 0) {
--headCount[0];
deque<lil_string> rep4;
buf->Give(headCount[1]);
while (headCount[1] > 0) {
--headCount[1];
lil_string rep5(buf);
rep4.push_back(std::move(rep5));
}
abt1.push_back(std::move(rep4));
}
}
I believe the C++ MIddleware Writer is the only marshalling/
serialization option with std::move support.
3. Bug fixes and refactoring of C++ Middleware Writer guts.
Comments welcome.
Brian Wood
http://webEbenezer.net
(651) 251-9384
Release 1.13 of the C++ Middleware Writer is now on line. This
release
adds support for the following:
1. A lil_string class which throws an exception if an operation
would result in a string more than 255 characters. This
guarantees that the length of the string can be marshalled
with one byte. Lil_string is used, for example, to hold account
passwords.
2. Move semantics. A config file parameter, 'Permit-std::move',
is used to indicate that the generated code may use std::move.
The following shows an example of output when
Permit-std::move is turned on.
template <typename B>
void
Receive(B* buf, vector<deque<lil_string> >& abt1)
{
uint32_t headCount[2];
buf->Give(headCount[0]);
abt1.reserve(abt1.size() + headCount[0]);
while (headCount[0] > 0) {
--headCount[0];
deque<lil_string> rep4;
buf->Give(headCount[1]);
while (headCount[1] > 0) {
--headCount[1];
lil_string rep5(buf);
rep4.push_back(std::move(rep5));
}
abt1.push_back(std::move(rep4));
}
}
I believe the C++ MIddleware Writer is the only marshalling/
serialization option with std::move support.
3. Bug fixes and refactoring of C++ Middleware Writer guts.
Comments welcome.
Brian Wood
http://webEbenezer.net
(651) 251-9384