1 #ifndef OBJISTRJSON__HPP
2 #define OBJISTRJSON__HPP
80 virtual void Location(
string&,
size_t&)
const override;
88 void SetDefaultStringEncoding(
EEncoding enc);
94 EEncoding GetDefaultStringEncoding(
void)
const;
111 EBinaryDataFormat GetBinaryDataFormat(
void)
const;
117 void SetBinaryDataFormat(EBinaryDataFormat fmt);
125 virtual bool ReadBool(
void)
override;
126 virtual void SkipBool(
void)
override;
128 virtual char ReadChar(
void)
override;
129 virtual void SkipChar(
void)
override;
145 virtual void ReadNull(
void)
override;
146 virtual void SkipNull(
void)
override;
149 void SkipAnyContent(
void);
159 #ifdef VIRTUAL_MID_LEVEL_IO
173 virtual void EndClass(
void)
override;
188 virtual void BeginBytes(ByteBlock& block)
override;
190 int GetBase64Char(
void);
192 virtual void EndBytes(
const ByteBlock& block)
override;
195 virtual void BeginChars(CharBlock& block)
override;
197 virtual void EndChars(
const CharBlock& block)
override;
209 char GetChar(
bool skipWhiteSpace);
210 char PeekChar(
bool skipWhiteSpace);
216 bool GetChar(
char c,
bool skipWhiteSpace =
false);
217 void Expect(
char c,
bool skipWhiteSpace =
false);
219 template<
typename Type>
220 Type x_UseMemberDefault(
void);
222 int ReadEscapedChar(
bool* encoded=0);
228 void x_SkipData(
void);
229 string ReadKey(
void);
232 void StartBlock(
char expect);
233 void EndBlock(
char expect);
234 bool NextElement(
void);
237 size_t ReadCustomBytes(ByteBlock& block,
char*
buffer,
size_t count);
238 size_t ReadBase64Bytes(ByteBlock& block,
char*
buffer,
size_t count);
239 size_t ReadHexBytes(ByteBlock& block,
char*
buffer,
size_t count);
void ReadValue(CStreamBuffer &b)
char SkipWhiteSpace(CStreamBuffer &b)
void SkipEndOfLine(CStreamBuffer &b, char lastChar)
int GetHexChar(CStreamBuffer &b)
char SkipWhiteSpaceAndGetChar(CStreamBuffer &b)
Serializable object that stores any combination of parsable data.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
Include a standard set of the NCBI C++ Toolkit most basic headers.
static const char * expect
size_t TMemberIndex
Type used for indexing class members and choice variants.
@ eStringTypeUTF8
UTF8-encoded string.
@ eStringTypeVisible
VisibleString (in ASN.1 sense)
virtual void ReadString(string &s, EStringType type=eStringTypeVisible)=0
virtual EPointerType ReadPointerType(void)=0
virtual bool ReadBool(void)=0
virtual void EndClassMember(void)
virtual void Location(string &, size_t &) const
Get current stream location as tuple (positiontype:string, size_t).
MLIOVIR void ReadClassSequential(const CClassTypeInfo *classType, TObjectPtr classPtr)
virtual void EndContainerElement(void)
virtual void ReadNull(void)=0
virtual void UndoClassMember(void)
virtual void EndContainer(void)=0
virtual void EndBytes(const ByteBlock &block)
virtual void SkipByteBlock(void)=0
virtual bool EndOfData(void)
Check if there is still some meaningful data that can be read; in text streams this function will ski...
virtual TMemberIndex BeginClassMember(const CClassTypeInfo *classType)=0
virtual size_t ReadChars(CharBlock &block, char *buffer, size_t count)=0
virtual string ReadOtherPointer(void)=0
virtual void SkipString(EStringType type=eStringTypeVisible)=0
virtual void SkipFNumber(void)=0
virtual void BeginBytes(ByteBlock &block)=0
virtual double ReadDouble(void)=0
virtual string ReadFileHeader(void)
Read file header.
virtual void ResetState(void) override
CStringUTF8::const_iterator m_Utf8Pos
virtual void SkipBool(void)=0
virtual TMemberIndex BeginChoiceVariant(const CChoiceTypeInfo *choiceType)=0
virtual void SkipSNumber(void)=0
virtual void BeginContainer(const CContainerTypeInfo *containerType)=0
virtual void SkipUNumber(void)=0
EEncoding m_StringEncoding
virtual void SkipNull(void)=0
virtual void BeginChars(CharBlock &block)=0
EBinaryDataFormat m_BinaryFormat
virtual char ReadChar(void)=0
virtual void ReadAnyContentObject(CAnyContentObject &obj)=0
virtual size_t ReadBytes(ByteBlock &block, char *buffer, size_t count)=0
virtual void ReadBitString(CBitString &obj)=0
virtual void SkipBitString(void)=0
virtual TEnumValueType ReadEnum(const CEnumeratedTypeValues &values)=0
virtual bool BeginContainerElement(TTypeInfo elementType)=0
virtual Int8 ReadInt8(void)=0
virtual TObjectIndex ReadObjectPointer(void)=0
MLIOVIR void SkipClassSequential(const CClassTypeInfo *classType)
virtual void SkipAnyContentObject(void)=0
virtual Uint8 ReadUint8(void)=0
EBinaryDataFormat
formatting of binary data ('OCTET STRING', 'hexBinary', 'base64Binary')
virtual void EndClass(void)
virtual void EndChoiceVariant(void)
virtual void BeginClass(const CClassTypeInfo *classInfo)=0
virtual void EndChars(const CharBlock &block)
virtual void EndChoice(void)
virtual void BeginChoice(const CChoiceTypeInfo *choiceType)
virtual void EndOfRead(void)
virtual void SkipChar(void)=0
@ eArray_Uint
array of unsigned integers
@ eArray_01
array of 1 and 0
@ eArray_Bool
array of 'true' and 'false'
@ eString_01
string of 0 and 1
@ eString_01B
string of 0 and 1, plus 'B' at the end
int64_t Int8
8-byte (64-bit) signed integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
char32_t TUnicodeSymbol
Unicode character.
enum ENcbiOwnership EOwnership
Ownership relations between objects.
#define NCBI_XSERIAL_EXPORT
std::istream & in(std::istream &in_, double &x_)