1 #ifndef OBJTOOLS_READERS_SEQDB__SEQDBCOL_HPP
2 #define OBJTOOLS_READERS_SEQDB__SEQDBCOL_HPP
50 #if ((!defined(NCBI_COMPILER_WORKSHOP) || (NCBI_COMPILER_VERSION > 550)) && \
51 (!defined(NCBI_COMPILER_MIPSPRO)) )
79 const string & index_extn,
80 const string & data_extn,
296 void SetMapValue(
const string & k,
const string & v);
`Blob' Class for SeqDB (and WriteDB).
EStringFormat
String termination style.
@ eSizeVar
Write string length as VarInt, then string data.
Guard object for the SeqDBAtlas singleton.
CNcbiStreamoff TIndx
The type used for file offsets.
string m_Title
The title identifies this column's purpose.
Int4 m_NumOIDs
Number of OIDs (Blobs) in this column.
CSeqDBColumn(const string &basename, const string &index_extn, const string &data_extn, CSeqDBLockHold *lockedp)
Constructor.
static bool ColumnExists(const string &basename, const string &extn, CSeqDBAtlas &atlas)
Determine if the column exists.
void x_ReadMetaData(CSeqDBLockHold &locked)
Open files and read field data from the atlas.
CSeqDBAtlasHolder m_AtlasHolder
This callback functor allows the atlas code to flush any cached region holds prior to garbage collect...
CSeqDBColumn(const CSeqDBColumn &)
Prevent copy construction.
void Flush()
Flush any held memory.
ESelectFile
Which file to access.
Int8 m_DataLength
Total length of data stored in the data file.
Int4 m_OffsetArrayStart
Start offset (in the index file) of the offset array.
int GetNumOIDs() const
Get the number of OIDs stored here.
CSeqDBRawFile m_DataFile
Data file.
map< string, string > m_MetaData
All key/value metadata for this column.
const map< string, string > & GetMetaData()
Get the column's Key/Value meta data.
CSeqDBFileMemMap m_DataLease
Data file lease.
void x_GetFileRange(TIndx begin, TIndx end, ESelectFile select_file, bool lifetime, CBlastDbBlob &blob, CSeqDBLockHold &locked)
Get a range of the index or data file.
static const CBlastDbBlob::EStringFormat kStringFmt
String format used by column files.
void GetBlob(int oid, CBlastDbBlob &blob, bool keep, CSeqDBLockHold *lockedp)
Fetch the data blob for the given oid.
string m_Date
The create date of the column files.
CSeqDBAtlas & m_Atlas
Reference to the atlas.
const string & GetTitle() const
Get the column title.
CSeqDBColumn & operator=(CSeqDBColumn &)
Prevent copy assignment.
CSeqDBRawFile m_IndexFile
Index file.
Int4 m_MetaDataStart
Start offset (in the index file) of the metadata section.
CSeqDBFileMemMap m_IndexLease
Index file lease.
~CSeqDBColumn()
Destructor.
void x_ReadFields(CSeqDBLockHold &locked)
Open files and read field data from the atlas.
CSeqDBAtlas::TIndx TIndx
File offset type.
Database-wide column information.
CSeqDB_ColumnEntry(const vector< int > &indices)
Constructor.
const map< string, string > & GetMap()
Get the metadata map.
vector< int > m_VolIndices
The indices of columns with this title in each volume.
bool m_HaveMap
True if the metadata map is stored.
void SetHaveMap()
Indicate that the metadata map is now complete.
int GetVolumeIndex(int volnum)
Get a volume-specific column ID.
bool HaveMap()
Determine if we have the metadata map yet.
map< string, string > m_Map
The combined metadata map for this column.
void SetMapValue(const string &k, const string &v)
Add a meta-data key/value association.
int32_t Int4
4-byte (32-bit) signed integer
int64_t Int8
8-byte (64-bit) signed integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
The SeqDB memory management layer.
USING_SCOPE(objects)
Import definitions from the objects namespace.
CSeqDBAtlas::TIndx TIndx
Index file.
File access objects for CSeqDB.