NCBI C++ ToolKit
Classes | Macros | Typedefs | Enumerations | Functions | Variables
attributes.c File Reference
#include "common.h"
#include <ctype.h>
#include <common/test_assert.h>
+ Include dependency graph for attributes.c:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  lookup_int
 
struct  attribute
 

Macros

#define TYPE(s)   { #s, s }
 
#define TYPE(s)   { #s, s }
 
#define TYPE(s)   { #s, s }
 
#define TYPE(s)   { #s, s }
 
#define TYPE(s)   { #s, s }
 
#define TYPE(s)   { #s, s }
 
#define TYPE(s)   { #s, s }
 
#define TYPE(s)   { #s, s }
 
#define ATTR(s, t)   { #s, s, type_##t, NULL }
 
#define ATTR2(s, t, l)   { #s, s, type_##t, l }
 
#define SEP   " \t\n"
 
#define ATTR_PARAMS   const struct attribute *attr, int expected
 
#define TEST_FILE   "attributes.in"
 

Typedefs

typedef int(* get_attr_t) (const struct attribute *attr, int expected)
 

Enumerations

enum  test_type_t {
  type_INTEGER , type_UINTEGER , type_SMALLINT , type_LEN ,
  type_CHARP , type_DESC , type_VOIDP , type_INTEGER ,
  type_SMALLINT , type_LEN , type_CHARP , type_INTEGER ,
  type_UINTEGER , type_SMALLINT , type_LEN , type_CHARP ,
  type_DESC , type_VOIDP , type_INTEGER , type_SMALLINT ,
  type_LEN , type_CHARP
}
 

Functions

static void fatal (const char *msg,...)
 
static int get_int (const char *s)
 
static int lookup (const char *name, const struct lookup_int *table)
 
static const char * unlookup (int value, const struct lookup_int *table)
 
static const struct attributelookup_attr (const char *name)
 
static int get_attr_stmt (const struct attribute *attr, int expected)
 
int main (int argc, char *argv[])
 

Variables

static int g_result = 0
 
static unsigned int line_num
 
static struct lookup_int concurrency []
 
static struct lookup_int scrollable []
 
static struct lookup_int sensitivity []
 
static struct lookup_int cursor_type []
 
static struct lookup_int noscan []
 
static struct lookup_int retrieve_data []
 
static struct lookup_int simulate_cursor []
 
static struct lookup_int use_bookmarks []
 
static const struct attribute attributes []
 

Macro Definition Documentation

◆ ATTR

#define ATTR (   s,
  t 
)    { #s, s, type_##t, NULL }

◆ ATTR2

#define ATTR2 (   s,
  t,
 
)    { #s, s, type_##t, l }

◆ ATTR_PARAMS

#define ATTR_PARAMS   const struct attribute *attr, int expected

Definition at line 222 of file attributes.c.

◆ SEP

#define SEP   " \t\n"

Definition at line 220 of file attributes.c.

◆ TEST_FILE

#define TEST_FILE   "attributes.in"

◆ TYPE [1/8]

#define TYPE (   s)    { #s, s }

◆ TYPE [2/8]

#define TYPE (   s)    { #s, s }

◆ TYPE [3/8]

#define TYPE (   s)    { #s, s }

◆ TYPE [4/8]

#define TYPE (   s)    { #s, s }

◆ TYPE [5/8]

#define TYPE (   s)    { #s, s }

◆ TYPE [6/8]

#define TYPE (   s)    { #s, s }

◆ TYPE [7/8]

#define TYPE (   s)    { #s, s }

◆ TYPE [8/8]

#define TYPE (   s)    { #s, s }

Typedef Documentation

◆ get_attr_t

typedef int(* get_attr_t) (const struct attribute *attr, int expected)

Definition at line 223 of file attributes.c.

Enumeration Type Documentation

◆ test_type_t

Enumerator
type_INTEGER 
type_UINTEGER 
type_SMALLINT 
type_LEN 
type_CHARP 
type_DESC 
type_VOIDP 
type_INTEGER 
type_SMALLINT 
type_LEN 
type_CHARP 
type_INTEGER 
type_UINTEGER 
type_SMALLINT 
type_LEN 
type_CHARP 
type_DESC 
type_VOIDP 
type_INTEGER 
type_SMALLINT 
type_LEN 
type_CHARP 

Definition at line 146 of file attributes.c.

Function Documentation

◆ fatal()

static void fatal ( const char *  msg,
  ... 
)
static

◆ get_attr_stmt()

static int get_attr_stmt ( const struct attribute attr,
int  expected 
)
static

◆ get_int()

static int get_int ( const char *  s)
static

Definition at line 30 of file attributes.c.

References fatal(), and line_num.

Referenced by lookup(), and main().

◆ lookup()

static int lookup ( const char *  name,
const struct lookup_int table 
)
static

Definition at line 50 of file attributes.c.

References get_int(), util::strcmp(), and table.

Referenced by AalookupTestFixture::AalookupTestFixture(), BlastAaLookupFinalize(), BlastAaLookupIndexQuery(), BlastAaLookupTableDestruct(), BlastAaLookupTableNew(), BlastCompressedAaLookupTableDestruct(), BlastCompressedAaLookupTableNew(), BlastNaHashLookupTableDestruct(), BlastNaHashLookupTableNew(), BlastNaLookupTableDestruct(), BlastNaLookupTableNew(), BlastNaWordFinder(), BlastRPSScanSubject(), BlastSmallNaLookupTableDestruct(), BlastSmallNaLookupTableNew(), BOOST_AUTO_TEST_CASE(), CompressedAalookupTestFixture::CompressedAalookupTestFixture(), CompressedAalookupTestFixture::FillLookupTable(), AalookupTestFixture::FillLookupTable(), GetOffsetArraySize(), CSeqDBLMDB::GetTaxIdsForOids(), JumperNaWordFinder(), LookupTableWrapFree(), LookupTableWrapInit_MT(), main(), NaHashLookupThreadDataNew(), CSeqDBLMDB::NegativeSeqIdsToOids(), CSeqDBLMDB::NegativeTaxIdsToOids(), CAlignSort::SAlignExtractor::operator()(), RPSLookupTableDestruct(), RPSLookupTableNew(), s_AddNeighboringWords(), s_AddPSSMNeighboringWords(), s_AddPSSMWordHits(), s_AddPSSMWordHitsCore(), s_AddWordHits(), s_AddWordHitsCore(), s_BlastAaScanSubject(), s_BlastAaWordFinder_OneHit(), s_BlastAaWordFinder_TwoHit(), s_BlastCompressedAaScanSubject(), s_BlastLookupGetNumHits(), s_BlastLookupRetrieve(), s_BlastMBLookupHasHits(), s_BlastMBLookupRetrieve(), s_BlastMBLookupRetrieve2(), s_BlastNaHashLookupFinalize(), s_BlastNaHashLookupRetieveHits(), s_BlastNaHashScanSubject_Any(), s_BlastNaLookupFinalize(), s_BlastNaScanSubject_8_4(), s_BlastNaScanSubject_Any(), s_BlastRPSWordFinder_OneHit(), s_BlastRPSWordFinder_TwoHit(), s_BlastSearchEngineCore(), s_BlastSearchEngineOneContext(), s_BlastSmallAaScanSubject(), s_BlastSmallNaLookupFinalize(), s_BlastSmallNaScanSubject_4_1(), s_BlastSmallNaScanSubject_5_1(), s_BlastSmallNaScanSubject_6_1(), s_BlastSmallNaScanSubject_6_2(), s_BlastSmallNaScanSubject_7_1(), s_BlastSmallNaScanSubject_7_2(), s_BlastSmallNaScanSubject_7_3(), s_BlastSmallNaScanSubject_8_1Mod4(), s_BlastSmallNaScanSubject_8_2Mod4(), s_BlastSmallNaScanSubject_8_3Mod4(), s_BlastSmallNaScanSubject_8_4(), s_BlastSmallNaScanSubject_Any(), s_CompressedAddNeighboringWords(), s_CompressedAddWordHits(), s_CompressedAddWordHitsCore(), s_CompressedListGetNewCell(), s_CompressedLookupAddEncoded(), s_CompressedLookupAddUnencoded(), s_CompressedLookupAddWordHit(), s_CompressedLookupFinalize(), s_ComputeCompressedIndex(), s_GetAlignmentMismatches(), s_NaChooseScanSubject(), s_NaHashChooseScanSubject(), s_NaHashLookupCountWordsInSubject_16_1(), s_NaHashLookupFillPV(), s_NaHashLookupRemovePolyAWords(), s_NaHashLookupScanSubjectForWordCounts(), s_NaLookup(), s_PopulateScores(), s_PopulateScoreSet(), s_RPSPreliminarySearchEngine(), s_SmallNaChooseScanSubject(), s_SmallNaLookup(), SubjectIndexIteratorNew(), SubjectIndexIteratorNext(), SubjectIndexIteratorPrev(), COrg_ref::UpdateFromTable(), and CTaxValidationAndCleanup::x_CreateQualifierMap().

◆ lookup_attr()

static const struct attribute* lookup_attr ( const char *  name)
static

Definition at line 207 of file attributes.c.

References attributes, fatal(), i, line_num, attribute::name, NULL, and util::strcmp().

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ unlookup()

static const char* unlookup ( int  value,
const struct lookup_int table 
)
static

Definition at line 63 of file attributes.c.

Referenced by main().

Variable Documentation

◆ attributes

const struct attribute attributes[]
static

Definition at line 63 of file attributes.c.

Referenced by CQueue::CheckJobsExpiry(), CollectAttributes(), CAnnotationASN1::CImplementationData::create_internal_feature(), CGff3ImportData::Initialize(), CGtfImportData::Initialize(), lookup_attr(), operator>>(), ParseAttributes(), psa_get_key_algorithm(), psa_get_key_domain_parameters(), psa_get_key_enrollment_algorithm(), psa_get_key_id(), psa_get_key_lifetime(), psa_get_key_type(), psa_get_key_usage_flags(), psa_set_key_algorithm(), psa_set_key_bits(), psa_set_key_domain_parameters(), psa_set_key_enrollment_algorithm(), psa_set_key_id(), psa_set_key_lifetime(), psa_set_key_type(), psa_set_key_usage_flags(), psa_verify_hash_interruptible_operation_init(), readGFF3(), CNSNotificationList::RegisterListener(), RestoreModelAttributes(), CGff3SourceRecord::StrAttributes(), CGff3FeatureRecord::StrAttributes(), CGffBaseRecord::StrAttributes(), CGffAlignRecord::StrAttributes(), CGtfReadRecord::xAssignAttributesFromGff(), CGvfReadRecord::xAssignAttributesFromGff(), CGtfReader::xFeatureSetDataCds(), CGtfReader::xFeatureSetDataGene(), CGtfReader::xFeatureTrimQualifiers(), CGff3ImportData::xInitializeAttributes(), CGtfImportData::xInitializeAttributes(), CGff3LineReader::xInitializeAttributes(), CGtfLineReader::xInitializeAttributes(), CGff3LineReader::xInitializeRecord(), CGtfLineReader::xInitializeRecord(), CGff2Record::xMigrateAttributeDefault(), CGff2Record::xMigrateAttributeSingle(), CGff2Record::xSplitGffAttributes(), CGff3LineReader::xSplitLine(), and CGtfLineReader::xSplitLine().

◆ concurrency

struct lookup_int concurrency[]
static
Initial value:
= {
#define TYPE(s)
{ "SQL_CONCUR_READ_ONLY", SQL_CONCUR_READ_ONLY },
{ "SQL_CONCUR_LOCK", SQL_CONCUR_LOCK },
{ "SQL_CONCUR_ROWVER", SQL_CONCUR_ROWVER },
{ "SQL_CONCUR_VALUES", SQL_CONCUR_VALUES },
{ NULL, 0 }
}
#define NULL
Definition: ncbistd.hpp:225
#define SQL_CONCUR_VALUES
Definition: sqlext.h:345
#define SQL_CONCUR_READ_ONLY
Definition: sqlext.h:342
#define SQL_CONCUR_LOCK
Definition: sqlext.h:343
#define SQL_CONCUR_ROWVER
Definition: sqlext.h:344

Definition at line 63 of file attributes.c.

◆ cursor_type

struct lookup_int cursor_type[]
static
Initial value:
= {
#define TYPE(s)
{ "SQL_CURSOR_FORWARD_ONLY", SQL_CURSOR_FORWARD_ONLY },
{ "SQL_CURSOR_STATIC", SQL_CURSOR_STATIC },
{ "SQL_CURSOR_KEYSET_DRIVEN", SQL_CURSOR_KEYSET_DRIVEN },
{ "SQL_CURSOR_DYNAMIC", SQL_CURSOR_DYNAMIC },
{ NULL, 0 }
}
#define SQL_CURSOR_FORWARD_ONLY
Definition: sqlext.h:349
#define SQL_CURSOR_KEYSET_DRIVEN
Definition: sqlext.h:350
#define SQL_CURSOR_DYNAMIC
Definition: sqlext.h:351
#define SQL_CURSOR_STATIC
Definition: sqlext.h:352

Definition at line 63 of file attributes.c.

Referenced by SQLSetScrollOptions().

◆ g_result

int g_result = 0
static

Definition at line 10 of file attributes.c.

Referenced by main().

◆ line_num

unsigned int line_num
static

◆ noscan

struct lookup_int noscan[]
static
Initial value:
= {
#define TYPE(s)
{ "SQL_NOSCAN_OFF", SQL_NOSCAN_OFF },
{ "SQL_NOSCAN_ON", SQL_NOSCAN_ON },
{ NULL, 0 }
}
#define SQL_NOSCAN_OFF
Definition: sqlext.h:325
#define SQL_NOSCAN_ON
Definition: sqlext.h:326

Definition at line 63 of file attributes.c.

◆ retrieve_data

struct lookup_int retrieve_data[]
static
Initial value:
= {
#define TYPE(s)
{ "SQL_RD_ON", SQL_RD_ON },
{ "SQL_RD_OFF", SQL_RD_OFF },
{ NULL, 0 }
}
#define SQL_RD_ON
Definition: sqlext.h:368
#define SQL_RD_OFF
Definition: sqlext.h:367

Definition at line 63 of file attributes.c.

◆ scrollable

struct lookup_int scrollable[]
static
Initial value:
= {
#define TYPE(s)
{ "SQL_NONSCROLLABLE", SQL_NONSCROLLABLE },
{ "SQL_SCROLLABLE", SQL_SCROLLABLE },
{ NULL, 0 }
}
#define SQL_SCROLLABLE
Definition: sql.h:94
#define SQL_NONSCROLLABLE
Definition: sql.h:93

Definition at line 63 of file attributes.c.

◆ sensitivity

struct lookup_int sensitivity[]
static
Initial value:
= {
#define TYPE(s)
{ "SQL_UNSPECIFIED", SQL_UNSPECIFIED },
{ "SQL_INSENSITIVE", SQL_INSENSITIVE },
{ "SQL_SENSITIVE", SQL_SENSITIVE },
{ NULL, 0 }
}
#define SQL_UNSPECIFIED
Definition: sql.h:189
#define SQL_INSENSITIVE
Definition: sql.h:190
#define SQL_SENSITIVE
Definition: sql.h:191

Definition at line 63 of file attributes.c.

◆ simulate_cursor

struct lookup_int simulate_cursor[]
static
Initial value:
= {
#define TYPE(s)
{ "SQL_SC_NON_UNIQUE", SQL_SC_NON_UNIQUE },
{ "SQL_SC_TRY_UNIQUE", SQL_SC_TRY_UNIQUE },
{ "SQL_SC_UNIQUE", SQL_SC_UNIQUE },
{ NULL, 0 }
}
#define SQL_SC_UNIQUE
Definition: sqlext.h:364
#define SQL_SC_TRY_UNIQUE
Definition: sqlext.h:363
#define SQL_SC_NON_UNIQUE
Definition: sqlext.h:362

Definition at line 63 of file attributes.c.

◆ use_bookmarks

struct lookup_int use_bookmarks[]
static
Initial value:
= {
#define TYPE(s)
{ "SQL_UB_OFF", SQL_UB_OFF },
{ "SQL_UB_VARIABLE", SQL_UB_VARIABLE },
{ "SQL_UB_FIXED", SQL_UB_FIXED },
{ NULL, 0 }
}
#define SQL_UB_OFF
Definition: sqlext.h:372
#define SQL_UB_FIXED
Definition: sqlext.h:378
#define SQL_UB_VARIABLE
Definition: sqlext.h:379

Definition at line 63 of file attributes.c.

Modified on Tue Apr 30 06:40:58 2024 by modify_doxy.py rev. 669887