Changes to how new-style binary network configs are detected, and a new-style binary serialized meta-data representation.

This commit is contained in:
Adam Ierymenko 2016-05-06 13:29:10 -07:00
parent 69d0562e2c
commit 529515d1d1
5 changed files with 176 additions and 42 deletions

View file

@ -300,6 +300,23 @@ public:
append(s.data(),(unsigned int)s.length());
}
/**
* Append a C string including null termination byte
*
* @param s C string
* @throws std::out_of_range Attempt to append beyond capacity
*/
inline void appendCString(const char *s)
throw(std::out_of_range)
{
for(;;) {
if (_l >= C)
throw std::out_of_range("Buffer: append beyond capacity");
if (!(_b[_l++] = *(s++)))
break;
}
}
/**
* Append a buffer
*