Lines Matching refs:c
147 #define RAPIDJSON_COPY() c = is.Take(); *codepoint = (*codepoint << 6) | (static_cast<unsigned char… in Decode()
148 #define RAPIDJSON_TRANS(mask) result &= ((GetRange(static_cast<unsigned char>(c)) & mask) != 0) in Decode()
150 typename InputStream::Ch c = is.Take(); in Decode() local
151 if (!(c & 0x80)) { in Decode()
152 *codepoint = static_cast<unsigned char>(c); in Decode()
156 unsigned char type = GetRange(static_cast<unsigned char>(c)); in Decode()
160 *codepoint = (0xFFu >> type) & static_cast<unsigned char>(c); in Decode()
180 #define RAPIDJSON_COPY() os.Put(c = is.Take()) in Validate()
181 #define RAPIDJSON_TRANS(mask) result &= ((GetRange(static_cast<unsigned char>(c)) & mask) != 0) in Validate()
183 Ch c; in Validate() local
185 if (!(c & 0x80)) in Validate()
189 switch (GetRange(static_cast<unsigned char>(c))) { in Validate()
204 static unsigned char GetRange(unsigned char c) { in GetRange()
219 return type[c]; in GetRange()
225 typename InputByteStream::Ch c = Take(is); in TakeBOM() local
226 if (static_cast<unsigned char>(c) != 0xEFu) return c; in TakeBOM()
227 c = is.Take(); in TakeBOM()
228 if (static_cast<unsigned char>(c) != 0xBBu) return c; in TakeBOM()
229 c = is.Take(); in TakeBOM()
230 if (static_cast<unsigned char>(c) != 0xBFu) return c; in TakeBOM()
231 c = is.Take(); in TakeBOM()
232 return c; in TakeBOM()
250 static void Put(OutputByteStream& os, Ch c) { in Put()
252 os.Put(static_cast<typename OutputByteStream::Ch>(c)); in Put()
309 typename InputStream::Ch c = is.Take(); in Decode() local
310 if (c < 0xD800 || c > 0xDFFF) { in Decode()
311 *codepoint = static_cast<unsigned>(c); in Decode()
314 else if (c <= 0xDBFF) { in Decode()
315 *codepoint = (static_cast<unsigned>(c) & 0x3FF) << 10; in Decode()
316 c = is.Take(); in Decode()
317 *codepoint |= (static_cast<unsigned>(c) & 0x3FF); in Decode()
319 return c >= 0xDC00 && c <= 0xDFFF; in Decode()
328 typename InputStream::Ch c; in Validate() local
329 os.Put(static_cast<typename OutputStream::Ch>(c = is.Take())); in Validate()
330 if (c < 0xD800 || c > 0xDFFF) in Validate()
332 else if (c <= 0xDBFF) { in Validate()
333 os.Put(c = is.Take()); in Validate()
334 return c >= 0xDC00 && c <= 0xDFFF; in Validate()
346 CharType c = Take(is); in TakeBOM() local
347 return static_cast<uint16_t>(c) == 0xFEFFu ? Take(is) : c; in TakeBOM()
353 unsigned c = static_cast<uint8_t>(is.Take()); in Take() local
354 c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8; in Take()
355 return static_cast<CharType>(c); in Take()
366 static void Put(OutputByteStream& os, CharType c) { in Put()
368 os.Put(static_cast<typename OutputByteStream::Ch>(static_cast<unsigned>(c) & 0xFFu)); in Put()
369 os.Put(static_cast<typename OutputByteStream::Ch>((static_cast<unsigned>(c) >> 8) & 0xFFu)); in Put()
379 CharType c = Take(is); in TakeBOM() local
380 return static_cast<uint16_t>(c) == 0xFEFFu ? Take(is) : c; in TakeBOM()
386 unsigned c = static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8; in Take() local
387 c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())); in Take()
388 return static_cast<CharType>(c); in Take()
399 static void Put(OutputByteStream& os, CharType c) { in Put()
401 os.Put(static_cast<typename OutputByteStream::Ch>((static_cast<unsigned>(c) >> 8) & 0xFFu)); in Put()
402 os.Put(static_cast<typename OutputByteStream::Ch>(static_cast<unsigned>(c) & 0xFFu)); in Put()
441 Ch c = is.Take(); in Decode() local
442 *codepoint = c; in Decode()
443 return c <= 0x10FFFF; in Decode()
449 Ch c; in Validate() local
450 os.Put(c = is.Take()); in Validate()
451 return c <= 0x10FFFF; in Validate()
461 CharType c = Take(is); in TakeBOM() local
462 return static_cast<uint32_t>(c) == 0x0000FEFFu ? Take(is) : c; in TakeBOM()
468 unsigned c = static_cast<uint8_t>(is.Take()); in Take() local
469 c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8; in Take()
470 c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 16; in Take()
471 c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 24; in Take()
472 return static_cast<CharType>(c); in Take()
485 static void Put(OutputByteStream& os, CharType c) { in Put()
487 os.Put(static_cast<typename OutputByteStream::Ch>(c & 0xFFu)); in Put()
488 os.Put(static_cast<typename OutputByteStream::Ch>((c >> 8) & 0xFFu)); in Put()
489 os.Put(static_cast<typename OutputByteStream::Ch>((c >> 16) & 0xFFu)); in Put()
490 os.Put(static_cast<typename OutputByteStream::Ch>((c >> 24) & 0xFFu)); in Put()
500 CharType c = Take(is); in TakeBOM() local
501 return static_cast<uint32_t>(c) == 0x0000FEFFu ? Take(is) : c; in TakeBOM()
507 unsigned c = static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 24; in Take() local
508 c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 16; in Take()
509 c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())) << 8; in Take()
510 c |= static_cast<unsigned>(static_cast<uint8_t>(is.Take())); in Take()
511 return static_cast<CharType>(c); in Take()
524 static void Put(OutputByteStream& os, CharType c) { in Put()
526 os.Put(static_cast<typename OutputByteStream::Ch>((c >> 24) & 0xFFu)); in Put()
527 os.Put(static_cast<typename OutputByteStream::Ch>((c >> 16) & 0xFFu)); in Put()
528 os.Put(static_cast<typename OutputByteStream::Ch>((c >> 8) & 0xFFu)); in Put()
529 os.Put(static_cast<typename OutputByteStream::Ch>(c & 0xFFu)); in Put()
561 uint8_t c = static_cast<uint8_t>(is.Take()); in Decode() local
562 *codepoint = c; in Decode()
563 return c <= 0X7F; in Decode()
568 uint8_t c = static_cast<uint8_t>(is.Take()); in Validate() local
569 os.Put(static_cast<typename OutputStream::Ch>(c)); in Validate()
570 return c <= 0x7F; in Validate()
576 uint8_t c = static_cast<uint8_t>(Take(is)); in TakeBOM() local
577 return static_cast<Ch>(c); in TakeBOM()
593 static void Put(OutputByteStream& os, Ch c) { in Put()
595 os.Put(static_cast<typename OutputByteStream::Ch>(c)); in Put()
687 inline void PutUnsafe(Stream& stream, typename Stream::Ch c);