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/obj__sniff_8cpp_source.html below:

NCBI C++ ToolKit: src/objmgr/util/obj_sniff.cpp Source File

42 #define NCBI_USE_ERRCODE_X ObjMgr_Sniffer 64

m_EventMode(event_mode)

77 class

CCallStackGuard {

83

m_Stack.push_back(&

object

);

85

~CCallStackGuard(

void

)

113  in

.SetDiscardCurrObject(discard);

127

: m_TopLevelObjectCount(0),

129

m_DiscardCurrObj(

false

),

130

m_DiscardObjInfo(

false

),

131

m_ReportErrors(

false

)

165

vector<CRef<COffsetReadHook> > hooks;

172

it->type_info.SetLocalReadHook(

input

, &(*h));

196

it->type_info.ResetLocalReadHook(

input

);

235

format_name =

"ASN.1 text"

;

238

format_name =

"XML"

;

242

TCandidates::const_iterator last_cand =

m_Candidates

.end();

245  string

header =

input

.ReadFileHeader();

248

header == last_cand->type_info.GetName() ) {

253

<< format_name <<

" top level object found:" 254

<< last_cand->type_info.GetName());

261  if

( header == it->type_info.GetName() ) {

265  _TRACE_X

(2, format_name <<

" top level object found:" 266

<< it->type_info.GetName());

280  catch

( bad_alloc&

) {

288

<< format_name <<

" "

<< e.what());

296

TCandidates::const_iterator last_cand =

m_Candidates

.end();

304  _TRACE

(

"Same type ASN.1 binary top level object found:" 305

<< last_cand->type_info.GetName());

313  if

( it == last_cand ) {

320  _TRACE_X

( 2,

"ASN.1 binary top level object found:" 321

<< it->type_info.GetName());

339  string

format_name(

"Unknown format"

);

340  switch

(

input

.GetDataFormat())

350

known_types.

insert

( c.type_info.GetTypeInfo());

355  for

( ; !

input

.EndOfData(); ) {

359  input

.ReadFileHeader();

363  for

(

const TTypeInfo

& type_info : candidates) {

364

tname = type_info->GetName();

368  _TRACE_X

(2, format_name <<

" top level object found: " 369

<< type_info->GetName());

383  catch

( bad_alloc&

) {

391

<< format_name <<

" "

<< e.what());

Serialized objects sniffer.

virtual void OnObjectFoundPre(const CObjectInfo &object, CNcbiStreampos stream_pos)

Event handling virtual function, called when candidate is found but before deserialization.

CNcbiStreampos m_StreamPos

Stream offset of the top level object.

bool x_ReadObject(CObjectIStream &input, CObjectTypeInfo object_info)

friend class COffsetReadHook

vector< SCandidateInfo > TCandidates

virtual void OnObjectFoundPost(const CObjectInfo &object)

Event handling virtual function, called when candidate is found and deserialized.

bool m_ReportErrors

Report data errors.

bool x_TryReadObject(CObjectIStream &input, CObjectTypeInfo object_info)

void AddCandidate(CObjectTypeInfo ti, EEventCallBackMode emode=eCallAlways)

Add new possible type to the recognition list.

list< const CObjectInfo * > TObjectStack

bool GetDiscardObjectInfo() const

void Probe(CObjectIStream &input)

The main worker function.

void ProbeAny(CObjectIStream &input)

virtual ~CObjectsSniffer()

Uint8 m_TopLevelObjectCount

Count of objects found.

void SetDiscardCurrObject(bool discard=true)

Set the discard flag.

virtual void Reset()

Event indicates that sniffer objects needs to reset it's status and get ready for the next probing.

TTopLevelMapVector m_TopLevelMap

Vector of level object descriptions.

TCandidates m_Candidates

Possible candidates for type probing.

bool GetDiscardCurrObject() const

void ProbeText(CObjectIStream &input)

void ProbeASN1_Bin(CObjectIStream &input)

virtual void ReadObject(CObjectIStream &in, const CObjectInfo &object)

This method will be called at approriate time when the object of requested type is to be read.

CObjectsSniffer * m_Sniffer

COffsetReadHook(CObjectsSniffer *sniffer, CObjectsSniffer::EEventCallBackMode event_mode)

CObjectsSniffer::EEventCallBackMode m_EventMode

Read hook for a standalone object.

CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...

iterator_bool insert(const value_type &val)

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define _TRACE_X(err_subcode, message)

CNcbiIstream & ReadObject(CNcbiIstream &str, TObjectPtr ptr, TTypeInfo info)

@ eSerial_AsnText

ASN.1 text.

@ eSerial_AsnBinary

ASN.1 binary.

void DefaultRead(CObjectIStream &in, const CObjectInfo &object)

Default read.

void DefaultSkip(CObjectIStream &in, const CObjectTypeInfo &object)

Default skip.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define END_SCOPE(ns)

End the previously defined scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

#define BEGIN_SCOPE(ns)

Define a new scope.

IO_PREFIX::streampos CNcbiStreampos

Portable alias for streampos.

Definition of all error codes used in objmgr libraries (xobjmgr.lib, xobjutil.lib and others).

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

NCBI_DEFINE_ERR_SUBCODE_X(5)


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