コード例 #1
0
ファイル: shared.hpp プロジェクト: florian-asche/hexabus
	void addField(FieldName name, const std::array<uint8_t, L>& value)
	{
		beginField(name);

		for (auto c : value)
			buffer << str(boost::format("%02x") % unsigned(c));
	}
コード例 #2
0
void VRMLFile::beginFieldDecl(const Char8  *szFieldType,
                              const UInt32  uiFieldTypeId,
                              const Char8  *szFieldName)
{
    Inherited::beginFieldDecl(szFieldType, uiFieldTypeId, szFieldName);

    getFieldType(szFieldName);

    beginField(szFieldName, uiFieldTypeId);
}
コード例 #3
0
ファイル: shared.hpp プロジェクト: florian-asche/hexabus
	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));
		}
	}
コード例 #4
0
ファイル: shared.hpp プロジェクト: florian-asche/hexabus
	void addField(FieldName name, const Value& value)
	{
		beginField(name);
		buffer << value;
	}