A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/objistrjson_8cpp_source.html below:

NCBI C++ ToolKit: src/serial/objistrjson.cpp Source File

39 #define NCBI_USE_ERRCODE_X Serial_OStream 51

m_FileHeader(

false

),

52

m_BlockStart(

false

),

53

m_ExpectValue(

false

),

54

m_GotNameless(

false

),

64

m_FileHeader(

false

),

65

m_BlockStart(

false

),

66

m_ExpectValue(

false

),

67

m_GotNameless(

false

),

201  msg

+=

"' expected"

;

210  "\""

+

string

(

id

)+

"\": unexpected member, should be one of: "

;

217 template

<

typename

Type>

inline 233  for

(

int

p=0; p<4; ++p) {

235  if

(c >=

'0'

&& c <=

'9'

) {

236

v = v * 16 + (c -

'0'

);

237

}

else if

(c >=

'A'

&& c <=

'F'

) {

238

v = v * 16 + (c -

'A'

+ 0xA);

239

}

else if

(c >=

'a'

&& c <=

'f'

) {

240

v = v * 16 + (c -

'a'

+ 0xA);

243  "invalid symbol in escape sequence"

);

281  if

(enc_in != enc_out) {

286  return

char(ch & 0xFF);

288  if

((c & 0x80) == 0) {

304  while

(chU && more--) {

319  bool

encoded =

false

;

322  if

(c ==

'\r'

|| c ==

'\n'

) {

324

}

else if

(c ==

'\"'

) {

330  if

(

str

.size() > 128 && (

double

)

str

.capacity()/((

double

)

str

.size()+1.0) < 1.1 ) {

331  str

.reserve(

str

.size()*2);

334  str

.reserve(

str

.size());

342  bool

encoded =

false

;

344  if

(!encoded && strchr(

",]} \r\n"

, c)) {

350  if

(

str

.size() > 128 && (

double

)

str

.capacity()/((

double

)

str

.size()+1.0) < 1.1 ) {

351  str

.reserve(

str

.size()*2);

354  str

.reserve(

str

.size());

360  if

(

str

==

"null"

) {

376  bool

encoded =

false

;

384  else if

(strchr(

",]} \r\n"

, c)) {

441  return

c !=

'}'

&& c !=

']'

;

449  else if

( c !=

'}'

&& c !=

']'

)

459  if

((

unsigned char

)c == 0xEF) {

526  return

x_UseMemberDefault<Int8>();

538  return

x_UseMemberDefault<Uint8>();

555  char

* endptr =

nullptr

;

557  if

( *endptr != 0 ) {

562  return

x_UseMemberDefault<double>();

631  if

(name[0] !=

'#'

) {

654

}

else if

(to ==

'['

) {

656

}

else if

(to ==

'\"'

) {

674  if

(c ==

'\"'

|| c ==

'{'

|| c ==

'['

) {

698 #if BITSTRING_AS_VECTOR 714

}

else if

(c !=

'0'

) {

737  while

( block.

Read

(

buf

,

sizeof

(

buf

)) != 0 )

755 #ifdef VIRTUAL_MID_LEVEL_IO 832  if

(name == item_name) {

840  if

(

id

.IsAttlist() ||

id

.HasNotag()) {

885  if

(tagName[0] ==

'#'

) {

886

tagName = tagName.substr(1);

968  if

(tagName[0] ==

'#'

) {

969

tagName = tagName.substr(1);

1051

}

else if

(c ==

'['

) {

1067  if

( c >=

'0'

&& c <=

'9'

) {

1070  else if

( c >=

'A'

&& c <=

'Z'

) {

1071  return

c -

'A'

+ 10;

1073  else if

( c >=

'a'

&& c <=

'z'

) {

1074  return

c -

'a'

+ 10;

1085  if

( (c >=

'0'

&& c <=

'9'

) ||

1086

(c >=

'A'

&& c <=

'Z'

) ||

1087

(c >=

'a'

&& c <=

'z'

) ||

1088

(c ==

'+'

|| c ==

'/'

|| c ==

'='

)) {

1095  ByteBlock

& block,

char

* dst,

size_t

length)

1108  ByteBlock

& block,

char

* dst,

size_t

length)

1115  bool

end_of_data =

false

;

1117  while

( !end_of_data && length-- > 0 ) {

1126

end_of_data = !

GetChar

(

','

,

true

);

1136

end_of_data = !

GetChar

(

','

,

true

);

1144

end_of_data = !

GetChar

(

','

,

true

);

1152

end_of_data =

t

==

'\"'

||

t

==

'B'

;

1153  if

(!end_of_data &&

t

!=

'0'

) {

1160  if

(

mask

!= 0x40) {

1174  ByteBlock

& block,

char

* dst,

size_t

length)

1177  bool

end_of_data =

false

;

1178  const size_t

chunk_in = 80;

1179  char

src_buf[chunk_in];

1180  size_t

bytes_left = length;

1181  size_t

src_size, src_read, dst_written;

1182  while

(!end_of_data && bytes_left > chunk_in && bytes_left <= length) {

1183  for

( src_size = 0; src_size < chunk_in; ) {

1186

end_of_data =

true

;

1190

src_buf[ src_size++ ] = (char)c;

1195

dst, bytes_left, &dst_written);

1196  if

(src_size != src_read) {

1199  count

+= dst_written;

1200

bytes_left -= dst_written;

1210  ByteBlock

& block,

char

* dst,

size_t

length)

1213  while

( length-- > 0 ) {

1221

*dst++ = char(c1 << 4);

1227

*dst++ = char((c1 << 4) | c2);

ncbi::TMaskedQueryRegions mask

Serializable object that stores any combination of parsable data.

Root class for all serialization exceptions.

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...

void resize(size_type new_size)

Change size of the bvector.

bool set_bit(size_type n, bool val=true)

Sets bit n.

bvector_size_type size_type

void clear(const size_type *ids, size_type ids_size, bm::sort_order so=bm::BM_UNKNOWN)

clear list of bits in this bitset

Include a standard set of the NCBI C++ Toolkit most basic headers.

static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)

static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)

static const char * str(char *buf, int n)

static const char * expect

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

virtual const char * what(void) const noexcept

Standard report (includes full backlog).

const CMemberId & GetId(void) const

bool HasAnyContent(void) const

bool IsAttlist(void) const

const string & GetName(void) const

TMemberIndex Find(const CTempString &name) const

static const CTypeInfo * FindRealTypeInfo(const CTypeInfo *info)

TMemberIndex FindDeep(const CTempString &name, bool search_attlist=false, const CClassTypeInfoBase **classInfo=nullptr) const

const CItemInfo * GetItemInfo(TMemberIndex index) const

static TMemberIndex FirstIndex(void)

bool HasNotag(void) const

TEnumValueType FindValue(const CTempString &name) const

Find numeric value by the name of the enum.

TTypeInfo GetTypeInfo(void) const

TMemberIndex LastIndex(void) const

string ToString(void) const

static TObjectType & Get(TObjectPtr object)

size_t TMemberIndex

Type used for indexing class members and choice variants.

const TMemberIndex kInvalidMember

Special value returned from FindMember.

void SetName(const string &name)

Set local name.

void AddAttribute(const string &name, const string &ns_name, const CStringUTF8 &value)

Add attribute.

void SetValue(const CStringUTF8 &value)

Set normalized value.

@ eStringTypeUTF8

UTF8-encoded string.

@ eStringTypeVisible

VisibleString (in ASN.1 sense)

virtual size_t ReadBytes(ByteBlock &block, char *buffer, size_t count) override

virtual bool ReadBool(void) override

EBinaryDataFormat GetBinaryDataFormat(void) const

Get formatting of binary data.

~CObjectIStreamJson(void)

virtual double ReadDouble(void) override

virtual void SkipUNumber(void) override

MLIOVIR void ReadClassSequential(const CClassTypeInfo *classType, TObjectPtr classPtr)

bool x_ReadDataAndCheck(string &data, EStringType type=eStringTypeUTF8)

string x_ReadString(EStringType type)

virtual void SkipString(EStringType type=eStringTypeVisible) override

static TTypeInfo GetRealTypeInfo(TTypeInfo typeInfo)

virtual void UndoClassMember(void) override

virtual void ResetState(void) override

virtual void EndClassMember(void) override

virtual void EndChoiceVariant(void) override

virtual void Location(string &, size_t &) const override

Get current stream location as tuple (positiontype:string, size_t).

void SetDefaultStringEncoding(EEncoding enc)

Set default encoding of 'string' objects If data encoding is different, string will be converted to t...

#define ThrowError(flag, mess)

void x_ReadData(string &data, EStringType type=eStringTypeUTF8)

virtual void ReadString(string &s, EStringType type=eStringTypeVisible) override

Type x_UseMemberDefault(void)

virtual void SkipByteBlock(void) override

virtual void BeginContainer(const CContainerTypeInfo *containerType) override

virtual TMemberIndex BeginClassMember(const CClassTypeInfo *classType) override

virtual bool EndOfData(void)

Check if there is still some meaningful data that can be read; in text streams this function will ski...

string ReadValue(EStringType type=eStringTypeVisible)

bool IsCompressed(void) const

void SetSpecialCaseUsed(ESpecialCaseRead used)

virtual void ResetState(void) override

CStringUTF8::const_iterator m_Utf8Pos

void SetNotag(bool set=true)

virtual void ReadAnyContentObject(CAnyContentObject &obj) override

bool CanSkipUnknownMembers(void)

Simple check if it's allowed to skip unknown members.

virtual void SkipSNumber(void) override

virtual string ReadFileHeader(void) override

Read file header.

virtual void EndChoice(void) override

virtual void SkipBitString(void) override

TFrame & FetchFrameFromTop(size_t index)

void UnexpectedMember(const CTempString &id, const CItemsInfo &items)

void SkipEndOfLine(char c)

virtual Int8 ReadInt8(void) override

virtual void BeginChoice(const CChoiceTypeInfo *choiceType) override

virtual void SkipAnyContentObject(void) override

virtual void BeginClass(const CClassTypeInfo *classInfo) override

EEncoding m_StringEncoding

int ReadEscapedChar(bool *encoded=0)

size_t GetStackDepth(void) const

static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)

Create serial object reader and attach it to an input stream.

virtual bool EndOfData(void) override

Check if there is still some meaningful data that can be read; this function will skip white spaces a...

virtual void EndOfRead(void) override

EBinaryDataFormat m_BinaryFormat

virtual void SkipBool(void) override

EEncoding GetDefaultStringEncoding(void) const

Get default encoding of 'string' objects.

TUnicodeSymbol ReadUtf8Char(char c)

virtual void SkipNull(void) override

virtual bool BeginContainerElement(TTypeInfo elementType) override

char SkipWhiteSpace(void)

const TFrame & TopFrame(void) const

TTypeInfo GetTypeInfo(void) const

virtual void EndClass(void) override

virtual Uint8 ReadUint8(void) override

virtual size_t ReadChars(CharBlock &block, char *buffer, size_t count) override

void EndBlock(char expect)

virtual TObjectIndex ReadObjectPointer(void) override

virtual void EndBytes(const ByteBlock &block) override

virtual TEnumValueType ReadEnum(const CEnumeratedTypeValues &values) override

virtual void BeginBytes(ByteBlock &block) override

virtual void EndContainerElement(void) override

void SkipAnyContent(void)

TFailFlags SetFailFlags(TFailFlags flags, const char *message=0)

Set fail flags.

virtual void SkipFNumber(void) override

virtual void SkipChar(void) override

bool StackIsEmpty(void) const

virtual EPointerType ReadPointerType(void) override

void StartBlock(char expect)

TConstObjectPtr GetMemberDefault(void) const

virtual void EndContainer(void) override

virtual void ReadNull(void) override

int ExpectSpecialCase(void) const

MLIOVIR void SkipClassSequential(const CClassTypeInfo *classType)

virtual void EndChars(const CharBlock &block) override

virtual char ReadChar(void) override

TMemberIndex FindDeep(const CItemsInfo &items, const CTempString &name, bool &deep) const

size_t ReadCustomBytes(ByteBlock &block, char *buffer, size_t count)

size_t ReadHexBytes(ByteBlock &block, char *buffer, size_t count)

void Expect(char c, bool skipWhiteSpace=false)

bool CanSkipUnknownVariants(void)

Simple check if it's allowed to skip unknown variants.

EBinaryDataFormat

formatting of binary data ('OCTET STRING', 'hexBinary', 'base64Binary')

void SetBinaryDataFormat(EBinaryDataFormat fmt)

Set formatting of binary data.

static CObjectIStream * CreateObjectIStreamJson(void)

size_t ReadBase64Bytes(ByteBlock &block, char *buffer, size_t count)

virtual string ReadOtherPointer(void) override

virtual TMemberIndex BeginChoiceVariant(const CChoiceTypeInfo *choiceType) override

virtual void ReadBitString(CBitString &obj) override

virtual void BeginChars(CharBlock &block) override

MLIOVIR void SkipClassRandom(const CClassTypeInfo *classType)

char SkipWhiteSpaceAndGetChar(void)

MLIOVIR void ReadClassRandom(const CClassTypeInfo *classType, TObjectPtr classPtr)

virtual void EndOfRead(void)

size_t Read(void *dst, size_t length, bool forceLength=false)

char ReadEncodedChar(EStringType type, bool &encoded)

@ fEOF

End of file in the middle of reading an object.

@ fNotImplemented

Method is not implemented.

@ fInvalidData

Input data is incorrect (e.g. invalid enum)

@ fFail

Internal error, the real reason is unclear.

@ fUnknownValue

Unknown value was present in the input.

@ fFormatError

Input file formatting does not conform with specification.

@ eArray_Uint

array of unsigned integers

@ eArray_01

array of 1 and 0

@ eString_Base64

Base64Binary string.

@ 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

@ eString_Hex

HEX string.

uint8_t Uint1

1-byte (8-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.

char PeekChar(size_t offset=0)

void SkipEndOfLine(char lastChar)

size_t GetLine(void) const

void SkipChars(size_t count)

IO_PREFIX::istream CNcbiIstream

Portable alias for istream.

static bool StringToBool(const CTempString str)

Convert string to bool.

static Int8 StringToInt8(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to Int8.

static double StringToDoublePosix(const char *str, char **endptr=0, TStringToNumFlags flags=0)

Convert string to double-precision value (analog of strtod function)

char32_t TUnicodeSymbol

Unicode character.

static TUnicodeSymbol DecodeFirst(char ch, SIZE_TYPE &more)

Begin converting first character of UTF8 sequence into Unicode.

static string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)

Replace occurrences of a substring within a string.

static char SymbolToChar(TUnicodeSymbol sym, EEncoding encoding)

Convert Unicode code point into encoded character.

static CStringUTF8 AsUTF8(const CTempString &src, EEncoding encoding, EValidate validate=eNoValidate)

Convert into UTF8 from a C/C++ string.

static TUnicodeSymbol DecodeNext(TUnicodeSymbol chU, char ch)

Convert next character of UTF8 sequence into Unicode.

static Uint8 StringToUInt8(const CTempString str, TStringToNumFlags flags=0, int base=10)

Convert string to Uint8.

static TUnicodeSymbol CharToSymbol(char ch, EEncoding encoding)

Convert encoded character into Unicode.

size_type find_first_of(const CTempString match, size_type pos=0) const

Find the first occurrence of any character in the matching string within the current string,...

static string & ReplaceInPlace(string &src, const string &search, const string &replace, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)

Replace occurrences of a substring within a string.

static const size_type npos

@ fDecimalPosixFinite

StringToDouble*(): Keep result finite and normalized: if DBL_MAX < result < INF, result becomes DBL_M...

const string & GetName(void) const

Get name of this type.

const CItemsInfo & GetItems(void) const

EDataSpec GetDataSpec(void) const

ETypeFamily GetTypeFamily(void) const

const CItemsInfo & GetVariants(void) const

const CMemberInfo * GetMemberInfo(TMemberIndex index) const

const CItemsInfo & GetMembers(void) const

TTypeInfo GetElementType(void) const

enum ENcbiOwnership EOwnership

Ownership relations between objects.

const GenericPointer< typename T::ValueType > T2 value

std::istream & in(std::istream &in_, double &x_)

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4