NCBI C++ ToolKit
Classes | Macros | Typedefs | Functions | Variables
xm_index.cpp File Reference
#include <ncbi_pch.hpp>
#include "ftacpp.hpp"
#include "index.h"
#include "ftaerr.hpp"
#include "indx_blk.h"
#include "indx_def.h"
#include "utilfun.h"
#include "fta_xml.h"
+ Include dependency graph for xm_index.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  XmlKwordBlk
 

Macros

#define THIS_FILE   "xm_index.cpp"
 
#define XML_FAKE_ACC_TAG   "AC "
 

Typedefs

using XmlKwordBlkPtr = const XmlKwordBlk *
 

Functions

static XmlIndexPtr XMLIndexNew (void)
 
static string XMLRestoreSpecialCharacters (string_view s)
 
char * XMLGetTagValue (const char *entry, const XmlIndex *xip)
 
char * XMLFindTagValue (const char *entry, const XmlIndex *xip, Int4 tag)
 
static bool XMLDelSegnum (IndexblkPtr ibp, const char *segnum, size_t len2)
 
static void XMLGetSegment (const char *entry, IndexblkPtr ibp)
 
static bool s_HasInput (const Parser &config)
 
static int s_GetCharAndAdvance (Parser &config)
 
void s_SetPointer (Parser &config, size_t offset)
 
static void XMLPerformIndex (ParserPtr pp)
 
static void XMLParseVersion (IndexblkPtr ibp, char *line)
 
static void XMLInitialEntry (IndexblkPtr ibp, const char *entry, bool accver, Parser::ESource source)
 
static const char * XMLStringByTag (XmlKwordBlkPtr xkbp, Int4 tag)
 
static bool XMLTagCheck (XmlIndexPtr xip, XmlKwordBlkPtr xkbp)
 
static bool XMLSameTagsCheck (XmlIndexPtr xip, const char *name)
 
static XmlIndexPtr XMLIndexSameSubTags (const char *entry, XmlIndexPtr xip, Int4 tag)
 
static bool XMLAccessionsCheck (ParserPtr pp, IndexblkPtr ibp, const char *entry)
 
static bool XMLKeywordsCheck (const char *entry, IndexblkPtr ibp, Parser::ESource source)
 
static bool XMLErrField (Int4 tag)
 
static bool XMLCheckRequiredTags (ParserPtr pp, IndexblkPtr ibp)
 
char * XMLLoadEntry (ParserPtr pp, bool err)
 
static bool XMLIndexSubTags (const char *entry, XmlIndexPtr xip, XmlKwordBlkPtr xkbp)
 
static bool XMLCheckRequiredFeatTags (XmlIndexPtr xip)
 
static bool XMLCheckRequiredIntTags (XmlIndexPtr xip)
 
static bool XMLCheckRequiredQualTags (XmlIndexPtr xip)
 
static bool XMLIndexFeatures (const char *entry, XmlIndexPtr xip)
 
static bool XMLCheckRequiredRefTags (XmlIndexPtr xip)
 
static Int2 XMLGetRefTypePos (char *reftag, size_t bases)
 
static Int2 XMLGetRefType (char *reftag, size_t bases)
 
static bool XMLCheckRequiredXrefTags (XmlIndexPtr xip)
 
static bool XMLIndexReferences (const char *entry, XmlIndexPtr xip, size_t bases)
 
bool XMLIndex (ParserPtr pp)
 
DataBlkPtr XMLBuildRefDataBlk (char *entry, const XmlIndex *xip, int type)
 
void XMLGetKeywords (const char *entry, const XmlIndex *xip, TKeywordList &keywords)
 
char * XMLConcatSubTags (const char *entry, const XmlIndex *xip, Int4 tag, Char sep)
 

Variables

XmlKwordBlk xmkwl []
 
XmlKwordBlk xmfeatkwl []
 
XmlKwordBlk xmintkwl []
 
XmlKwordBlk xmrefkwl []
 
XmlKwordBlk xmqualkwl []
 
XmlKwordBlk xmxrefkwl []
 
XmlKwordBlk xmsubkwl []
 

Macro Definition Documentation

◆ THIS_FILE

#define THIS_FILE   "xm_index.cpp"

Definition at line 49 of file xm_index.cpp.

◆ XML_FAKE_ACC_TAG

#define XML_FAKE_ACC_TAG   "AC "

Definition at line 51 of file xm_index.cpp.

Typedef Documentation

◆ XmlKwordBlkPtr

Definition at line 60 of file xm_index.cpp.

Function Documentation

◆ s_GetCharAndAdvance()

static int s_GetCharAndAdvance ( Parser config)
static

Definition at line 318 of file xm_index.cpp.

Referenced by XMLLoadEntry(), and XMLPerformIndex().

◆ s_HasInput()

static bool s_HasInput ( const Parser config)
static

Definition at line 312 of file xm_index.cpp.

Referenced by XMLLoadEntry(), and XMLPerformIndex().

◆ s_SetPointer()

void s_SetPointer ( Parser config,
size_t  offset 
)

Definition at line 326 of file xm_index.cpp.

References offset.

Referenced by XMLLoadEntry().

◆ XMLAccessionsCheck()

static bool XMLAccessionsCheck ( ParserPtr  pp,
IndexblkPtr  ibp,
const char *  entry 
)
static

◆ XMLBuildRefDataBlk()

DataBlkPtr XMLBuildRefDataBlk ( char *  entry,
const XmlIndex xip,
int  type 
)

◆ XMLCheckRequiredFeatTags()

static bool XMLCheckRequiredFeatTags ( XmlIndexPtr  xip)
static

◆ XMLCheckRequiredIntTags()

static bool XMLCheckRequiredIntTags ( XmlIndexPtr  xip)
static

◆ XMLCheckRequiredQualTags()

static bool XMLCheckRequiredQualTags ( XmlIndexPtr  xip)
static

◆ XMLCheckRequiredRefTags()

static bool XMLCheckRequiredRefTags ( XmlIndexPtr  xip)
static

◆ XMLCheckRequiredTags()

static bool XMLCheckRequiredTags ( ParserPtr  pp,
IndexblkPtr  ibp 
)
static

◆ XMLCheckRequiredXrefTags()

static bool XMLCheckRequiredXrefTags ( XmlIndexPtr  xip)
static

◆ XMLConcatSubTags()

char* XMLConcatSubTags ( const char *  entry,
const XmlIndex xip,
Int4  tag,
Char  sep 
)

◆ XMLDelSegnum()

static bool XMLDelSegnum ( IndexblkPtr  ibp,
const char *  segnum,
size_t  len2 
)
static

◆ XMLErrField()

static bool XMLErrField ( Int4  tag)
static

Definition at line 860 of file xm_index.cpp.

References ERR_FORMAT_MissingField, ErrPostEx, SEV_ERROR, tag, xmkwl, and XMLStringByTag().

Referenced by XMLCheckRequiredTags().

◆ XMLFindTagValue()

char* XMLFindTagValue ( const char *  entry,
const XmlIndex xip,
Int4  tag 
)

◆ XMLGetKeywords()

void XMLGetKeywords ( const char *  entry,
const XmlIndex xip,
TKeywordList keywords 
)

◆ XMLGetRefType()

static Int2 XMLGetRefType ( char *  reftag,
size_t  bases 
)
static

◆ XMLGetRefTypePos()

static Int2 XMLGetRefTypePos ( char *  reftag,
size_t  bases 
)
static

◆ XMLGetSegment()

static void XMLGetSegment ( const char *  entry,
IndexblkPtr  ibp 
)
static

◆ XMLGetTagValue()

char* XMLGetTagValue ( const char *  entry,
const XmlIndex xip 
)

◆ XMLIndex()

bool XMLIndex ( ParserPtr  pp)

◆ XMLIndexFeatures()

static bool XMLIndexFeatures ( const char *  entry,
XmlIndexPtr  xip 
)
static

◆ XMLIndexNew()

static XmlIndexPtr XMLIndexNew ( void  )
static

◆ XMLIndexReferences()

static bool XMLIndexReferences ( const char *  entry,
XmlIndexPtr  xip,
size_t  bases 
)
static

◆ XMLIndexSameSubTags()

static XmlIndexPtr XMLIndexSameSubTags ( const char *  entry,
XmlIndexPtr  xip,
Int4  tag 
)
static

◆ XMLIndexSubTags()

static bool XMLIndexSubTags ( const char *  entry,
XmlIndexPtr  xip,
XmlKwordBlkPtr  xkbp 
)
static

◆ XMLInitialEntry()

static void XMLInitialEntry ( IndexblkPtr  ibp,
const char *  entry,
bool  accver,
Parser::ESource  source 
)
static

◆ XMLKeywordsCheck()

static bool XMLKeywordsCheck ( const char *  entry,
IndexblkPtr  ibp,
Parser::ESource  source 
)
static

◆ XMLLoadEntry()

char* XMLLoadEntry ( ParserPtr  pp,
bool  err 
)

◆ XMLParseVersion()

static void XMLParseVersion ( IndexblkPtr  ibp,
char *  line 
)
static

◆ XMLPerformIndex()

static void XMLPerformIndex ( ParserPtr  pp)
static

◆ XMLRestoreSpecialCharacters()

static string XMLRestoreSpecialCharacters ( string_view  s)
static

Definition at line 169 of file xm_index.cpp.

References buf, and i.

Referenced by XMLConcatSubTags(), and XMLGetTagValue().

◆ XMLSameTagsCheck()

static bool XMLSameTagsCheck ( XmlIndexPtr  xip,
const char *  name 
)
static

◆ XMLStringByTag()

static const char* XMLStringByTag ( XmlKwordBlkPtr  xkbp,
Int4  tag 
)
static

◆ XMLTagCheck()

static bool XMLTagCheck ( XmlIndexPtr  xip,
XmlKwordBlkPtr  xkbp 
)
static

Variable Documentation

◆ xmfeatkwl

XmlKwordBlk xmfeatkwl[]
Initial value:
= {
{"<INSDFeature_key>", 1, 33 },
{"<INSDFeature_location>", 2, 34 },
{"<INSDFeature_intervals>", 3, 35 },
{"<INSDFeature_quals>", 4, 36 },
{nullptr, -1, -1}
}

Definition at line 96 of file xm_index.cpp.

Referenced by XMLCheckRequiredFeatTags(), and XMLIndexFeatures().

◆ xmintkwl

XmlKwordBlk xmintkwl[]
Initial value:
= {
{"<INSDInterval_from>", 1, 38 },
{"<INSDInterval_to>", 2, 39 },
{"<INSDInterval_point>", 3, 40 },
{"<INSDInterval_accession>", 4, 41 },
{nullptr, -1, -1}
}

Definition at line 104 of file xm_index.cpp.

Referenced by XMLCheckRequiredIntTags(), and XMLIndexFeatures().

◆ xmkwl

XmlKwordBlk xmkwl[]

◆ xmqualkwl

XmlKwordBlk xmqualkwl[]
Initial value:
= {
{"<INSDQualifier_name>", 1, 43 },
{"<INSDQualifier_value>", 2, 44 },
{nullptr, -1, -1}
}

Definition at line 126 of file xm_index.cpp.

Referenced by XMLCheckRequiredQualTags(), and XMLIndexFeatures().

◆ xmrefkwl

XmlKwordBlk xmrefkwl[]
Initial value:
= {
{"<INSDReference_reference>", 1, 46 },
{"<INSDReference_position>", 2, 47 },
{"<INSDReference_authors>", 3, 48 },
{"<INSDReference_consortium>", 4, 49 },
{"<INSDReference_title>", 5, 50 },
{"<INSDReference_journal>", 6, 51 },
{"<INSDReference_xref>", 7, 55 },
{"<INSDReference_medline>", 8, 52 },
{"<INSDReference_pubmed>", 9, 53 },
{"<INSDReference_remark>", 10, 54 },
{nullptr, -1, -1}
}

Definition at line 112 of file xm_index.cpp.

Referenced by XMLCheckRequiredRefTags(), XMLCheckRequiredXrefTags(), and XMLIndexReferences().

◆ xmsubkwl

XmlKwordBlk xmsubkwl[]
Initial value:
= {
{"<INSDSecondary-accn>", 1, 30 },
{"<INSDKeyword>", 1, 31 },
{"<INSDFeature>", 1, 32 },
{"<INSDInterval>", 1, 37 },
{"<INSDQualifier>", 1, 42 },
{"<INSDReference>", 1, 45 },
{"<INSDAuthor>", 1, 59 },
{"<INSDXref>", 1, 56 },
{nullptr, -1, -1}
}

Definition at line 138 of file xm_index.cpp.

Referenced by XMLCheckRequiredIntTags(), XMLCheckRequiredRefTags(), XMLCheckRequiredXrefTags(), and XMLIndexSameSubTags().

◆ xmxrefkwl

XmlKwordBlk xmxrefkwl[]
Initial value:
= {
{"<INSDXref_dbname>", 1, 57 },
{"<INSDXref_id>", 2, 58 },
{nullptr, -1, -1}
}

Definition at line 132 of file xm_index.cpp.

Referenced by XMLIndexReferences().

Modified on Sat Apr 13 11:45:20 2024 by modify_doxy.py rev. 669887