memfile = std::make_unique<CMemoryFile>(filename,
87 m_memory= (
const char*)memfile->GetPtr();
112std::unique_ptr<std::ifstream> stream{
newstd::ifstream(filename, ios::binary)};
113 if(!stream->is_open())
133std::istream istr(&strbuf);
196 if(object_type ==
nullptr)
204unique_ptr<CObjectIStream>
str;
213std::unique_ptr<std::ifstream> stream{
newstd::ifstream(
m_filename, ios::binary)};
218 str->UseMemoryPool();
Wraps CFormatGuess, and if CFormatGuess's result is Unknown, it tries every file reader until one wor...
CFormatGuess::EFormat GuessFormatAndContent(CFileContentInfo &contentInfo)
CFormatGuess::CFormatHints & GetFormatHints(void)
Get format hints.
void SetRecognizedGenbankTypes(const set< TTypeInfo > &recognizedGenbankTypes)
CFormatHints & AddPreferredFormat(TFormat fmt)
Mark the format as preferred.
CFormatHints & DisableAllNonpreferred(void)
Disable all formats not marked as preferred.
@ eBZip2
bzip2 compressed file
@ eBinaryASN
Binary ASN.1.
@ eLzo
lzo compressed file
@ eGtf
New GTF, CGtfReader.
@ eGZip
GNU zip compressed file.
@ eZip
zip compressed file
@ eGff3
GFF3, CGff3Reader.
@ eFasta
FASTA format sequence record, CFastaReader.
@ eZstd
Zstandard (zstd) compressed data.
unique_ptr< CObjectIStream > MakeObjStream(std::streampos pos=0) const
std::unique_ptr< CMemoryFile > m_memfile
std::unique_ptr< std::istream > m_stream
const set< TTypeInfo > * m_supported_types
std::unique_ptr< std::streambuf > m_streambuf
CFormatGuess::EFormat m_format
TTypeInfo RecognizeContent(std::streampos pos)
void Open(const std::string &filename, const set< TTypeInfo > *supported_types)
void OpenPlain(const std::string &filename)
std::streampos m_filesize
bool x_TryOpenStreamFile(const string &filename, std::streampos filesize)
bool x_TryOpenMemoryFile(const string &filename)
ESerialDataFormat m_serial_format
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
static const char * str(char *buf, int n)
@ eTakeOwnership
An object can take ownership of another.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
const string & GetMsg(void) const
Get message string.
#define NCBI_THROW2(exception_class, err_code, message, extra)
Throw exception with extra parameter.
TErrCode GetErrCode(void) const
Int8 GetLength(void) const
Get size of file.
@ eMMS_Private
Changes are private (write do not change file)
@ eMMP_Read
Data can be read.
@ eSerial_AsnText
ASN.1 text.
@ eSerial_AsnBinary
ASN.1 binary.
static CObjectIStream * Create(ESerialDataFormat format)
Create serial object reader.
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
@ eDelayBufferPolicyAlwaysParse
Parse always.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
#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.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
const CharType(& source)[N]
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
CFileContentInfoGenbank mInfoGenbank
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