162 t_FORMAT_CONTEXT& formatContext)
const
168 const Specification& parsedSpec = this->specification();
170 const int maxPrefixSize = 4;
171 char prefixBuf[maxPrefixSize];
172 char *prefixBegin = prefixBuf;
173 char *prefixEnd = prefixBuf;
180 const int maxValueSize =
181 NFUtil::ToCharsMaxLength<unsigned char, 2>::k_VALUE > 5
182 ? NFUtil::ToCharsMaxLength<unsigned char, 2>::k_VALUE
184 t_CHAR valueBuf[maxValueSize];
185 t_CHAR *valueBegin = valueBuf;
186 t_CHAR *valueEnd = valueBuf;
188 if (Specification::e_BOOLEAN_STRING == parsedSpec.formatType()) {
191 const char *stringRepresentation = value ?
"true" :
"false";
192 const int stringRepresentationLength = value ? 4 : 5;
193 valueEnd = CharUtil::outputFromChar(
194 stringRepresentation,
195 stringRepresentation + stringRepresentationLength,
199 unsigned char intRepresentation =
static_cast<unsigned char>(value);
200 prefixEnd = this->formatPrefix(prefixBuf,
203 valueEnd = this->formatValue(valueBuf,
207 return this->outputValue(prefixBegin,