x_InitNew(
void);
156 boolIsLocalFile()
const;
161 static boolIsPlainAccession(
const string& acc_or_path);
165 static stringConvertSysPathToPOSIX(
const string& sys_path);
170 static stringConvertAccOrSysPathToPOSIX(
const string& acc_or_path);
173 voidx_Init(
const CVFSManager& mgr,
const string& path, EType
type);
192 voidCommit()
const;
209 string Resolve(
const string& acc)
const;
217:
public CSraRef<const VDBManager>
226eDebugInitialize = 3,
233 static intSetDebugLevel(
intnew_level);
236 stringFindAccPath(
const string& acc)
const;
238 stringFindDereferencedAccPath(
const string& acc_or_path)
const;
247 stringGetCacheRoot()
const;
250 voidSetCacheRoot(
const string& path);
253 voidDeleteCacheOlderThan(
Uint4days);
256 voidCommitConfig()
const;
267 CTimeGetTimestamp(
const string& path)
const;
269 CTimeGetURLTimestamp(
const string& url)
const;
283:
public CSraRef<const VDatabase>
289 CVDB(
const CVDBMgr& mgr,
const string& acc_or_path);
311:
public CSraRef<const VTable>
324EMissing missing = eMissing_Throw);
326 const string& acc_or_path,
327EMissing missing = eMissing_Throw);
337 stringGetFullName(
void)
const;
351:
public CSraRef<const KIndex>
363 const char* index_name,
364EMissing missing = eMissing_Throw);
374 stringGetFullName(
void)
const;
390:
public CSraRef<const VCursor>
394: m_RowOpened(
false)
398: m_RowOpened(
false)
416 returnOpenRowRc(row_id) == 0;
418 voidCloseRow(
void);
460 typedefpair<TVDBRowId, CRef<CObject> >
TSlot;
470 template<
classObject>
500m_Index(kInvalidIndex)
507 Init(cursor, 0, name,
NULL, missing);
511 const char* backup_name =
NULL,
514 Init(cursor, 0, name, backup_name, missing);
517 size_telement_bit_size,
519 const char* backup_name =
NULL,
522 Init(cursor, element_bit_size, name, backup_name, missing);
525 boolIsStatic(
const CVDBCursor& cursor)
const;
529m_Index = kInvalidIndex;
531 voidResetIfAlwaysEmpty(
const CVDBCursor& cursor);
553 size_telement_bit_size,
555 const char* backup_name,
564 template<
size_tElementBitSize>
573 const char* backup_name =
NULL,
575:
CVDBColumn(cursor, ElementBitSize, name, backup_name, missing)
582 #define DECLARE_VDB_COLUMN(name) \ 583 CVDBValue::SRef name(TVDBRowId row, CVDBValue::EMissing missing = CVDBValue::eMissing_Throw) const { \ 584 return CVDBValue::SRef(m_Cursor, row, NCBI_NAME2(m_,name), missing); \ 586 CVDBColumn NCBI_NAME2(m_, name) 589 #define DECLARE_VDB_COLUMN_AS(type, name) \ 590 CVDBValueFor<type> name(TVDBRowId row, CVDBValue::EMissing missing = CVDBValue::eMissing_Throw) const { \ 591 return CVDBValueFor<type>(m_Cursor, row, NCBI_NAME2(m_,name), missing); \ 593 CVDBColumnBits<sizeof(type)*8> NCBI_NAME2(m_, name) 596 #define DECLARE_VDB_COLUMN_AS_STRING(name) \ 597 CVDBStringValue name(TVDBRowId row, CVDBValue::EMissing missing = CVDBValue::eMissing_Throw) const { \ 598 return CVDBStringValue(m_Cursor, row, NCBI_NAME2(m_,name), missing); \ 600 CVDBColumnBits<8> NCBI_NAME2(m_, name) 603 #define DECLARE_VDB_COLUMN_AS_4BITS(name) \ 604 CVDBValueFor4Bits name(TVDBRowId row) const { \ 605 return CVDBValueFor4Bits(m_Cursor, row, NCBI_NAME2(m_,name)); \ 607 CVDBColumnBits<4> NCBI_NAME2(m_, name) 610 #define INIT_VDB_COLUMN(name) \ 611 NCBI_NAME2(m_, name)(m_Cursor, #name) 612 #define INIT_VDB_COLUMN_BACKUP(name, backup_name) \ 613 NCBI_NAME2(m_, name)(m_Cursor, #name, #backup_name) 614 #define INIT_VDB_COLUMN_AS(name, type) \ 615 NCBI_NAME2(m_, name)(m_Cursor, "("#type")"#name)
616 #define INIT_OPTIONAL_VDB_COLUMN(name) \ 617 NCBI_NAME2(m_, name)(m_Cursor, #name, NULL, CVDBColumn::eMissing_Allow) 618 #define INIT_OPTIONAL_VDB_COLUMN_BACKUP(name, backup_name) \ 619 NCBI_NAME2(m_, name)(m_Cursor, #name, #backup_name, CVDBColumn::eMissing_Allow) 620 #define INIT_OPTIONAL_VDB_COLUMN_AS(name, type) \ 621 NCBI_NAME2(m_, name)(m_Cursor, "("#type")"#name, NULL, CVDBColumn::eMissing_Allow)
622 #define INIT_CONDITIONAL_VDB_COLUMN(name, condition) \ 623 NCBI_NAME2(m_, name)(m_Cursor, (condition)? #name: NULL, NULL, CVDBColumn::eMissing_Allow) 624 #define INIT_CONDITIONAL_VDB_COLUMN_AS(name, type, condition) \ 625 NCBI_NAME2(m_, name)(m_Cursor, (condition)? "("#type")"#name: NULL, NULL, CVDBColumn::eMissing_Allow)
650: m_Table(0), m_ColumnName(0), m_Row(0)
659m_ColumnName =
column.GetName();
694 const char* param_name,
const CTempString& param_value,
699cursor.
SetParam(param_name, param_value);
714 returnm_Ref.PrintFullName(
out);
723EMissing missing = eMissing_Throw);
725 voidx_ReportIndexOutOfBounds(
size_tindex)
const;
726 voidx_ReportNotOneValue(
void)
const;
729 if( index >=
size() ) {
730x_ReportIndexOutOfBounds(index);
733 voidx_CheckRange(
size_tpos,
size_t len)
const;
736 if(
size() != 1 ) {
737x_ReportNotOneValue();
794 returnx_ValueByRawIndex(index+raw_offset());
798 return Value(index);
805 returnm_Ref.PrintFullName(
out);
814 returnsub_index? (v&0xf): (v>>4);
818 returnsub_value(raw_data()[raw_index/2], raw_index%2);
821 voidx_ReportIndexOutOfBounds(
size_tindex)
const;
824 if( index >=
size() ) {
825x_ReportIndexOutOfBounds(index);
828 voidx_CheckRange(
size_tpos,
size_t len)
const;
893 returnx_ValueByRawIndex(index+raw_offset());
897 return Value(index);
904 returnm_Ref.PrintFullName(
out);
913 return(v>>(6-2*sub_index))&3;
917 returnsub_value(raw_data()[raw_index/4], raw_index%4);
920 voidx_ReportIndexOutOfBounds(
size_tindex)
const;
923 if( index >=
size() ) {
924x_ReportIndexOutOfBounds(index);
927 voidx_CheckRange(
size_tpos,
size_t len)
const;
967 const char* param_name,
const CTempString& param_value,
1019 operatordouble(
void)
const;
1045 const char* param_name,
const CTempString& param_value,
1053 return static_cast<const char*
>(
m_Data);
1080 #ifndef NCBI_OS_MSWINCTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
CVDBColumnBits(const CVDBCursor &cursor, const char *name, const char *backup_name=NULL, EMissing missing=eMissing_Throw)
CVDBColumn(const CVDBCursor &cursor, const char *name, EMissing missing)
DECLARE_OPERATOR_BOOL(m_Index !=kInvalidIndex)
CVDBColumn(const CVDBCursor &cursor, size_t element_bit_size, const char *name, const char *backup_name=NULL, EMissing missing=eMissing_Throw)
TVDBColumnIdx GetIndex(void) const
const char * GetName(void) const
CVDBColumn(const CVDBCursor &cursor, const char *name, const char *backup_name=NULL, EMissing missing=eMissing_Throw)
TVDBRowIdRange GetRowIdRange(const CVDBCursor &cursor) const
bool RowIsOpened(void) const
CVDBCursor(const CVDBTable &table)
const CVDBTable & GetTable(void) const
void SetParam(const char *name, const CTempString &value) const
bool TryOpenRow(TVDBRowId row_id)
TVDBRowIdRange GetRowIdRange(TVDBColumnIdx column=0) const
CRequestContextUpdater(const CRequestContextUpdater &)=delete
CObject * Get(TVDBRowId row)
CVDBObjectCacheBase(const CVDBObjectCacheBase &)
void Put(CObject *curs, TVDBRowId row)
pair< TVDBRowId, CRef< CObject > > TSlot
void operator=(const CVDBObjectCacheBase &)
void Put(CRef< Object > &ref, TVDBRowId row=0)
CRef< Object > Get(TVDBRowId row=0)
CVDBStringValue(const CVDBCursor &cursor, TVDBRowId row, const CVDBColumn &column, EMissing missing=eMissing_Throw)
CVDBStringValue(const CVDBValue::SRef &ref)
const char * data(void) const
CVDBStringValue(CVDBCursor &cursor, const char *param_name, const CTempString ¶m_value, const CVDBColumn &column)
CVDBStringValue(const CVDBCursor &cursor, const CVDBColumn &column)
CTempString operator*(void) const
const char * GetName(void) const
const CVDBTable & GetTable(void) const
const CVDB & GetDb(void) const
const string & GetName(void) const
uint32_t size(void) const
TValue x_ValueByRawIndex(size_t raw_index) const
CVDBValueFor2Bits(const CVDBValue::SSaveRef &ref, const char *raw, uint32_t offset, uint32_t sz)
uint32_t raw_offset(void) const
const char * raw_data(void) const
CVDBValueFor2Bits(const CVDBCursor &cursor, TVDBRowId row, const CVDBColumn &column)
CVDBValue::SSaveRef m_Ref
static TValue sub_value(uint8_t v, size_t sub_index)
CNcbiOstream & PrintFullName(CNcbiOstream &out) const
CVDBValueFor2Bits(const CVDBValue::SRef &ref)
TValue operator[](size_t index) const
void x_CheckIndex(size_t index) const
TValue Value(size_t index) const
CVDBValueFor4Bits(const CVDBCursor &cursor, TVDBRowId row, const CVDBColumn &column)
TValue operator[](size_t index) const
TValue x_ValueByRawIndex(size_t raw_index) const
void x_CheckIndex(size_t index) const
uint32_t raw_offset(void) const
CVDBValue::SSaveRef m_Ref
const char * raw_data(void) const
static TValue sub_value(uint8_t v, size_t sub_index)
uint32_t size(void) const
CNcbiOstream & PrintFullName(CNcbiOstream &out) const
TValue Value(size_t index) const
CVDBValueFor4Bits(const CVDBValue::SRef &ref)
CVDBValueFor4Bits(const CVDBValue::SSaveRef &ref, const char *raw, uint32_t offset, uint32_t sz)
CVDBValueFor(const CVDBCursor &cursor, TVDBRowId row, const CVDBColumn &column, EMissing missing=eMissing_Throw)
const_iterator end() const
const TValue & operator*(void) const
CVDBValueFor< TValue > substr(size_t pos, size_t len) const
CVDBValueFor(CVDBCursor &cursor, const char *param_name, const CTempString ¶m_value, const CVDBColumn &column)
CVDBValueFor(const CVDBCursor &cursor, const CVDBColumn &column)
const TValue & operator[](size_t i) const
CVDBValueFor(const CVDBValue::SRef &ref)
const TValue * const_iterator
const TValue * data() const
const_iterator begin() const
const TValue * operator->(void) const
const TValue & Value(void) const
void x_CheckRange(size_t pos, size_t len) const
CNcbiOstream & PrintFullName(CNcbiOstream &out) const
CVDBValue(const CVDBCursor &cursor, TVDBRowId row, const CVDBColumn &column, EMissing missing=eMissing_Throw)
CVDBValue(const CVDBCursor &cursor, const CVDBColumn &column)
CVDBValue(const SRef &ref)
void x_CheckOneValue(void) const
CVDBValue(const CVDBCursor &cursor, const char *param_name, const CTempString ¶m_value, const CVDBColumn &column)
void x_CheckIndex(size_t index) const
const string & GetFullName(void) const
const string & GetName(void) const
static string ConvertAccOrSysPathToPOSIX(const string &acc_or_path)
static string ConvertSysPathToPOSIX(const string &sys_path)
CSraRef< const VPath > TParent
CVPath(const VPath *path)
Include a standard set of the NCBI C++ Toolkit most basic headers.
std::ofstream out("events_result.xml")
main entry point for tests
static const char table_name[]
static const char * column
#define NCBI_DEPRECATED_CTOR(decl)
Macro used to mark a constructor as deprecated.
TObjectType * ReleaseOrNull(void)
Release a reference to the object and return a pointer to the object.
uint32_t Uint4
4-byte (32-bit) unsigned integer
#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::ostream CNcbiOstream
Portable alias for ostream.
#define NCBI_SRAREAD_EXPORT
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
const TYPE & Get(const CNamedParameterList *param)
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
GenericValue< UTF8<> > Value
GenericValue with UTF8 encoding.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
@ Resolve
Try to resolve provided seq-ids.
static int GetDebugLevel()
#define row(bind, expected)
SRef(const CVDBCursor &cur, TVDBRowId r, const CVDBColumn &col)
const CVDBColumn & column
const CVDBCursor & cursor
void Set(const CVDBCursor &cursor, TVDBRowId row, const CVDBColumn &column)
const CVDBTable * m_Table
const char * m_ColumnName
DECLARE_SRA_REF_TRAITS(VDBManager, const)
CVDBValueFor< uint16_t > CVDBUInt16Value
pair< TVDBRowId, TVDBRowCount > TVDBRowIdRange
CVDBValueFor< char > CVDBBytesValue
string ToString(const wxRect &rc)
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