1 #ifndef OBJISTRXML__HPP
2 #define OBJISTRXML__HPP
82 virtual void Location(
string&,
size_t&)
const override;
96 void SetDefaultStringEncoding(
EEncoding enc);
102 EEncoding GetDefaultStringEncoding(
void)
const;
111 void SetEnforcedStdXml(
bool set =
true);
118 return m_StdXml ?
false :
124 void FindFileHeader(
bool find_XMLDecl =
true);
131 virtual bool ReadBool(
void)
override;
132 virtual char ReadChar(
void)
override;
138 virtual void ReadNull(
void)
override;
143 bool ReadAnyContent(
const string& ns_prefix,
string&
value);
145 bool SkipAnyContent(
void);
154 virtual void SkipBool(
void)
override;
155 virtual void SkipChar(
void)
override;
160 virtual void SkipNull(
void)
override;
169 bool HasAttlist(
void);
170 bool NextIsTag(
void);
171 bool NextTagIsClosing(
void);
172 bool ThisTagIsSelfClosed(
void);
173 void OpenTag(
const string& e);
174 void CloseTag(
const string& e);
175 void OpenStackTag(
size_t level);
176 void CloseStackTag(
size_t level);
181 bool WillHaveName(
TTypeInfo elementType);
184 bool HasMoreElements(
TTypeInfo elementType);
186 #ifdef VIRTUAL_MID_LEVEL_IO
207 void BeginArrayElement(
TTypeInfo elementType);
208 void EndArrayElement(
void);
213 virtual void EndClass(
void)
override;
227 int GetBase64Char(
void);
252 bool EndOpeningTagSelfClosed(
void);
254 char BeginOpeningTag(
void);
255 char BeginClosingTag(
void);
257 bool UseSpecialCaseRead(
void);
259 int ReadEscapedChar(
char endingChar,
bool* encoded=0);
262 bool ReadCDSection(
string& s);
269 void ReadAttributeValue(
string&
value,
bool skipClosing=
false);
270 char ReadUndefinedAttributes(
void);
272 void SkipAttributeValue(
char c);
273 void SkipQDecl(
void);
276 char SkipWSAndComments(
void);
280 void x_EndTypeNamespace(
void);
282 template<
typename Type>
283 Type x_UseMemberDefault(
void);
284 int x_VerifyChar(
int);
285 int x_ReadEncodedChar(
char endingChar,
EStringType type,
bool& encoded);
int GetHexChar(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.
void ReadWord(CNcbiIstream &is, word_t &data)
Read a word from the input stream.
size_t TMemberIndex
Type used for indexing class members and choice variants.
const TMemberIndex kInvalidMember
Special value returned from FindMember.
@ 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
bool InsideClosingTag(void) const
virtual void EndClassMember(void)
virtual void Location(string &, size_t &) const
Get current stream location as tuple (positiontype:string, size_t).
bool SelfClosedTag(void) const
virtual void EndContainerElement(void)
bool InsideOpeningTag(void) const
bool GetEnforcedStdXml(void)
Get scope prefixes handling parameter.
virtual void ReadNull(void)=0
virtual void UndoClassMember(void)
virtual void EndContainer(void)=0
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
MLIOVIR void ReadContainer(const CContainerTypeInfo *containerType, TObjectPtr containerPtr)
EEncoding m_StringEncoding
void OpenTag(TTypeInfo type)
virtual void SkipFNumber(void)=0
map< string, string > m_NsNameToPrefix
virtual void BeginBytes(ByteBlock &block)=0
virtual void BeginNamedType(TTypeInfo namedTypeInfo)
TFlags GetFlags(void) const
void Found_slash_gt(void)
virtual double ReadDouble(void)=0
virtual string ReadFileHeader(void)
Read file header.
virtual void ResetState(void) override
virtual void SkipBool(void)=0
bool InsideTag(void) const
void EndSelfClosedTag(void)
void Found_lt_slash(void)
virtual void EndNamedType(void)
virtual TMemberIndex BeginChoiceVariant(const CChoiceTypeInfo *choiceType)=0
virtual void SkipSNumber(void)=0
virtual void BeginContainer(const CContainerTypeInfo *containerType)=0
virtual void SkipUNumber(void)=0
virtual Uint4 ReadUint4(void)
virtual char * ReadCString(void)
virtual void SkipNull(void)=0
CTempString SkipTagName(CTempString tag, const string &s)
virtual void BeginChars(CharBlock &block)=0
virtual string PeekNextTypeName(void)
Peek next data type name in XML stream.
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
bool OutsideTag(void) const
virtual void SkipBitString(void)=0
virtual TEnumValueType ReadEnum(const CEnumeratedTypeValues &values)=0
MLIOVIR void ReadNamedType(TTypeInfo namedTypeInfo, TTypeInfo typeInfo, TObjectPtr object)
virtual bool BeginContainerElement(TTypeInfo elementType)=0
virtual Int8 ReadInt8(void)=0
virtual TObjectIndex ReadObjectPointer(void)=0
CStringUTF8::const_iterator m_Utf8Pos
MLIOVIR void SkipContainer(const CContainerTypeInfo *containerType)
virtual Int4 ReadInt4(void)
void CloseTag(TTypeInfo type)
virtual void SkipAnyContentObject(void)=0
virtual Uint8 ReadUint8(void)=0
map< string, string > m_NsPrefixToName
virtual void EndClass(void)
virtual void StartDelayBuffer(void)
virtual void EndChoiceVariant(void)
virtual void BeginClass(const CClassTypeInfo *classInfo)=0
virtual void EndChoice(void)
CTempString SkipTagName(CTempString tag, const char *s)
virtual CRef< CByteSource > EndDelayBuffer(void)
virtual void BeginChoice(const CChoiceTypeInfo *choiceType)
virtual void SkipChar(void)=0
int32_t Int4
4-byte (32-bit) signed integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
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
const GenericPointer< typename T::ValueType > T2 value
std::istream & in(std::istream &in_, double &x_)