void addField(FieldName name, const std::array<uint8_t, L>& value) { beginField(name); for (auto c : value) buffer << str(boost::format("%02x") % unsigned(c)); }
void VRMLFile::beginFieldDecl(const Char8 *szFieldType, const UInt32 uiFieldTypeId, const Char8 *szFieldName) { Inherited::beginFieldDecl(szFieldType, uiFieldTypeId, szFieldName); getFieldType(szFieldName); beginField(szFieldName, uiFieldTypeId); }
void addField(FieldName name, const std::string& value) { beginField(name); for (auto c : value) { if ((oneline && (std::isblank(c) || std::isprint(c))) || (!oneline && std::isprint(c))) buffer << c; else buffer << str(boost::format("\\x%02x") % (0xff & c)); } }
void addField(FieldName name, const Value& value) { beginField(name); buffer << value; }