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

NCBI C++ ToolKit: include/objtools/blast/seqdb_reader/impl/seqdbgeneral.hpp Source File

1 #ifndef CORELIB__SEQDB__SEQDBGENERAL_HPP 2 #define CORELIB__SEQDB__SEQDBGENERAL_HPP 58 template

<

typename

T>

61 #ifdef WORDS_BIGENDIAN 62  unsigned char

* stdord =

63

(

unsigned char

*)(stdord_obj);

65  unsigned char

* pend = stdord +

sizeof

(

T

) - 1;

66  unsigned char

* pcur = stdord;

77  if

(

sizeof

(

T

) == 8) {

79

}

else if

(

sizeof

(

T

) == 4) {

81

}

else if

(

sizeof

(

T

) == 2) {

103 template

<

typename

T>

106  unsigned char

* stdord =

107

(

unsigned char

*)(stdord_obj);

109  unsigned char

* pend = stdord;

110  unsigned char

* pcur = stdord +

sizeof

(

T

) - 1;

114  while

(pcur > pend) {

127 #define IS_POWER_OF_TWO(x) (((x) & ((x)-1)) == 0) 130 #define ALIGNED_TO_POW2(x,y) (! ((x) & (0-y))) 134 #define PTR_ALIGNED_TO_SELF_SIZE(x) \ 135  (IS_POWER_OF_TWO(sizeof(*x)) && ALIGNED_TO_POW2((size_t)(x), sizeof(*x))) 140 #ifdef WORDS_BIGENDIAN 145 template

<

typename

T>

158 template

<

typename

T>

169 template

<

typename

T>

178 template

<

typename

T>

192 #define SEQDB_ISEOL(x) (((x) == '\n') || ((x) == '\r')) 212  size_t

length = ep - bp;

214  if

(dst.capacity() < length) {

215  size_t

increment = 16;

216  size_t

newcap = dst.capacity() ? dst.capacity() : increment;

218  while

(length > newcap) {

266  m_End

= s + strlen(s);

410  if

(other.

Size

() == sz) {

892  file

.GetFileNameSub(),

910  m_Value

.reserve(base.size() + 4);

911  m_Value

.assign(base.data(), base.data() + base.size());

1121  const string

&

text

);

1123 #define SEQDB_FILE_ASSERT(YESNO) \ 1126  SeqDB_FileIntegrityAssert(__FILE__, __LINE__, (#YESNO)); \ 1163 template

<

typename

TValue>

1190  if

(slot.first !=

key

) {

1192

slot.second = TValue();

1221

vector<CSeqDB_Substring> & dbs,

1222  bool

keep_quote =

false

);

1229 #define FENCE_SENTRY 201 1242 template

<

class

T,

class

U>

1247  if

(iter == m.

end

()) {

1251  return

iter->second;

1268 template

<

class

T,

class

U>

1274  if

(

i

< v.size()) {

1282  return static_cast<int>

(

i

);

static Int8 GetInt8(const unsigned char *ptr)

static Int2 GetInt2(const unsigned char *ptr)

static Int4 GetInt4(const unsigned char *ptr)

EErrCode

Errors are classified into one of two types.

CSeqDBIntCache(int sz)

Constructor.

std::pair< int, TDeflineCacheItem > TSlot

Type used for cache slots.

vector< TSlot > m_Slots

Values are stored here.

TValue & Lookup(int key)

Find a value in the cache.

const string & GetBaseNameS() const

Returns the base name as a string.

CSeqDB_BaseName(const string &n)

Constructor taking a string.

bool operator==(const CSeqDB_BaseName &other) const

Compares the basename to another basename.

CSeqDB_Substring GetBaseNameSub() const

Returns the base name as a substring.

CSeqDB_BaseName(const CSeqDB_Substring &n)

Constructor taking a substring.

void FixDelimiters()

Change any internal delimiters to the platform specific kind.

string m_Value

The base name.

CSeqDB_Substring GetBasePathSub() const

Return this path as a substring.

CSeqDB_BasePath()

Construct an empty path.

CSeqDB_BasePath & operator=(const CSeqDB_BasePath &other)

Assign the value from another base path object.

bool Valid() const

Return true if the value is not empty.

CSeqDB_Substring FindBaseName() const

Return the portion of this path representing the base name.

CSeqDB_BasePath(const string &bp)

Constructor taking a string.

const string & GetBasePathS() const

Return this path as a string.

CSeqDB_BasePath(const CSeqDB_DirName &d, const CSeqDB_BasePath &b)

Constructor taking a directory and basepath.

void Assign(const CSeqDB_Substring &sub)

Assign the value from a substring.

void FixDelimiters()

Change any internal delimiters to the platform specific kind.

void Assign(const string &path)

Assign the value from a string.

CSeqDB_BasePath(const CSeqDB_DirName &d, const CSeqDB_BaseName &b)

Constructor taking a directory and filename.

CSeqDB_Substring FindDirName() const

Return the portion of this path representing the directory.

CSeqDB_BasePath(const CSeqDB_Substring &bp)

Constructor taking a substring.

string m_Value

The value stored here.

bool operator==(const CSeqDB_BasePath &other) const

Compare this value to another base path.

void Assign(const CSeqDB_Substring &sub)

Assign a new directory name from a substring.

CSeqDB_DirName(const string &n)

Constructor taking a string.

CSeqDB_DirName(const CSeqDB_Substring &n)

Constructor taking a substring.

const string & GetDirNameS() const

Get the directory name as a string.

CSeqDB_DirName & operator=(const CSeqDB_DirName &other)

Assign a new directory name from a string.

CSeqDB_Substring GetDirNameSub() const

Get the directory name as a substring.

string m_Value

The directory name.

string m_Value

The filename.

void Assign(const CSeqDB_Substring &sub)

Assign a new filename to this object.

CSeqDB_FileName()

Default constructor.

void FixDelimiters()

Change any internal delimiters to the platform specific kind.

CSeqDB_FileName(const string &n)

Construct a filename using the given string.

const string & GetFileNameS() const

Get the filename as a string.

CSeqDB_Substring GetFileNameSub() const

Get the filename as a substring.

CSeqDB_Substring FindDirName() const

Returns the portion of this path containing the directory.

const string & GetPathS() const

Get the path as a string.

CSeqDB_Substring FindBasePath() const

Returns the portion of this path containing the base path.

CSeqDB_Path & operator=(const CSeqDB_Path &other)

Assigns the provided value to this path.

void ReplaceFilename(const CSeqDB_Path &dir_src, const CSeqDB_Substring &fname)

Combines the directory from a path with a filename.

CSeqDB_Path(const CSeqDB_DirName &d, const CSeqDB_BaseName &b, char ext1, char ext2, char ext3)

Constructor taking a directory, filename, and extension.

CSeqDB_Substring FindFileName() const

Returns the portion of this path containing the file name.

void Assign(const string &path)

Assigns the provided value to this path.

CSeqDB_Path(const CSeqDB_BasePath &bp, char ext1, char ext2, char ext3)

Constructor taking a basepath and extension.

CSeqDB_Substring FindBaseName() const

Returns the portion of this path containing the base name.

CSeqDB_Path(const CSeqDB_Substring &dir, const CSeqDB_Substring &file)

Constructor taking a directory and filename.

bool Valid() const

Returns true if this object has a value.

bool operator==(const CSeqDB_Path &other) const

Returns true if the paths are equal.

CSeqDB_Path(const CSeqDB_DirName &dir, const CSeqDB_FileName &file)

Constructor taking a directory and filename.

CSeqDB_Path()

Construct an empty path.

CSeqDB_Path(const string &n)

Constructor taking a string.

string m_Value

The string containing this path.

const char * m_End

Points to the end of the string (post notation) or null.

CSeqDB_Substring(const string &s)

Construct a substring for a C++ std::string.

void GetString(string &s) const

Return the data by assigning it to a string.

bool operator==(const CSeqDB_Substring &other) const

Compares the contents of the string to another substring.

CSeqDB_Substring(const char *b, const char *e)

Construct a substring for a range of memory.

int Size() const

Return the length of the string in bytes.

void Clear()

Reset the string to an empty state.

void EraseBack(int n)

Disinclude data from the end of the string.

CSeqDB_Substring()

Constructor, builds empty substring.

const char * GetEnd() const

Returns a pointer to the end of the string, which is always a pointer to the character past the last ...

const char * m_Begin

Points to the beginning of the string's data or null.

void EraseFront(int n)

Disinclude data from the beginning of the string.

const char & operator[](int n) const

Returns a reference to a specific character of the string.

void Resize(int n)

Change the length of the string.

CSeqDB_Substring(const char *s)

Construct a substring for a string literal.

const char * GetBegin() const

Returns a pointer to the start of the string.

void GetStringQuick(string &s) const

Return the data by quick-assigning it to a string.

bool Empty() const

Returns true iff the string is empty.

int FindLastOf(char ch) const

Find last instance of a character in the substring.

container_type::const_iterator const_iterator

const_iterator end() const

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

#define NCBI_XOBJREAD_EXPORT

char * dbname(DBPROCESS *dbproc)

Get name of current database.

unsigned int

A callback function used to compare two keys in a database.

static void text(MDB_val *v)

constexpr auto front(list< Head, As... >, T=T()) noexcept -> Head

const struct ncbi::grid::netcache::search::fields::SIZE size

const struct ncbi::grid::netcache::search::fields::KEY key

Defines exception class and several constants for SeqDB.

CSeqDB_Substring SeqDB_RemoveExtn(CSeqDB_Substring s)

Returns a filename minus greedy path.

string SeqDB_FindBlastDBPath(const string &file_name, char dbtype, string *sp, bool exact, CSeqDBAtlas &atlas)

Finds a file in the search path.

int SeqDB_VectorAssign(const T &data, vector< U > &v)

Copy into a vector efficiently.

void SeqDB_SplitQuoted(const string &dbname, vector< CSeqDB_Substring > &dbs, bool keep_quote=false)

Combine and quote list of database names.

CSeqDB_Substring SeqDB_RemoveFileName(CSeqDB_Substring s)

Returns a path minus filename.

#define IS_POWER_OF_TWO(x)

Discretely tests whether an integer is a power of two.

void SeqDB_JoinDelim(string &a, const string &b, const string &delim)

Join two strings with a delimiter.

T SeqDB_GetBrokenUnaligned(const T *stdord_obj)

Read an unaligned integer into memory.

void SeqDB_FileIntegrityAssert(const string &file, int line, const string &text)

Report file corruption by throwing an eFile CSeqDBException.

CSeqDB_Substring SeqDB_RemoveDirName(CSeqDB_Substring s)

Returns a filename minus greedy path.

T SeqDB_GetStdOrdUnaligned(const T *stdord_obj)

Reads a network order integer and returns a value.

void SeqDB_CombinePath(const CSeqDB_Substring &path, const CSeqDB_Substring &file, const CSeqDB_Substring *extn, string &outp)

Combine a filesystem path and file name.

void SeqDB_CombineAndQuote(const vector< string > &dbs, string &dbname)

Combine and quote list of database names.

const U & SeqDB_MapFind(const std::map< T, U > &m, const T &k, const U &dflt)

Find a map value or return a default.

void SeqDB_ThrowException(CSeqDBException::EErrCode code, const string &msg)

Thow a SeqDB exception; this is seperated into a function primarily to allow a breakpoint to be set.

bool SeqDB_SplitString(CSeqDB_Substring &buffer, CSeqDB_Substring &front, char delim)

Parse a prefix from a substring.

T SeqDB_GetStdOrd(const T *stdord_obj)

Read a network order integer value.

void s_SeqDB_QuickAssign(string &dst, const char *bp, const char *ep)

Higher Performance String Assignment.

#define PTR_ALIGNED_TO_SELF_SIZE(x)

Is the provided pointer aligned to the size (which must be a power of two) of the type to which it po...

T SeqDB_GetBroken(const T *stdord_obj)

Read a non-network-order integer value.

void SeqDB_ConvertOSPath(string &dbs)

Change path delimiters to platform preferred kind in-place.

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

OID-Range type to simplify interfaces.

SSeqDBSlice()

Default constructor.

SSeqDBSlice(int b, int e)

Constructor.

int begin

First oid in range.

int end

OID after last included oid.


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