63 "Invalid format specification");
127 vector<string> data2write;
135 data2write.push_back(dbmeta.
GetTitle());
147 data2write.push_back(dbmeta.
GetDate());
157 os <<
"Unrecognized format specification: '%" << *fmt <<
"'";
178 SIZE_TYPE data2write_size = accumulate(data2write.begin(), data2write.end(),
181 retval.reserve(
m_FmtSpec.size() + data2write_size -
182 (data2write.size() * 2));
187 retval.append(data2write[
i]);
Defines invalid user input exceptions.
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
Uint8 GetTotalLength() const
Returns the sum of the lengths of all available sequences.
static string ESeqType2String(ESeqType type)
Converts a CSeqDB sequence type into a human readable string.
Int8 GetDiskUsage() const
Retrieve the disk usage in bytes for this BLAST database.
string GetTitle() const
Returns the database title.
int GetNumSeqs() const
Returns the number of sequences available.
string GetDate() const
Returns the construction date of the database.
EBlastDbVersion GetBlastDbVersion() const
Return blast db version.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty – pointing to an object and has a non-null value.
bool Empty(void) const THROWS_NONE
Check if CRef is empty – not pointing to any object, which means having a null value.
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
NCBI_NS_STD::string::size_type SIZE_TYPE
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static string & Replace(const string &src, const string &search, const string &replace, string &dst, SIZE_TYPE start_pos=0, SIZE_TYPE max_replace=0, SIZE_TYPE *num_replace=0)
Replace occurrences of a substring within a string.
static string UInt8ToString(Uint8 value, TNumToStringFlags flags=0, int base=10)
Convert UInt8 to string.
Structure to define basic information to initialize a BLAST DB.
string m_BlastDbName
The BLAST DB name.
CRef< CSeqDB > InitSeqDb() const
Create a new CSeqDB instance from this object.
CSeqDB::ESeqType m_MoleculeType
The molecule type.
Auxiliary functor to compute the length of a string (shamlessly copied from seq_writer....
SIZE_TYPE operator()(SIZE_TYPE a, const string &b) const