64 template<
class TLoader>
66 : m_loader{
info.GetLoader() } {}
80 CBioseq_set::GetTypeInfo(),
81 CBioseq::GetTypeInfo(),
82 CSeq_entry::GetTypeInfo(),
83 CSeq_submit::GetTypeInfo(),
157 if (
auto pTopEntry =
m_pReader->GetTopEntry(); pTopEntry) {
159 pNewEntry->Assign(*pTopEntry);
160 pNewEntry->SetSet().SetSeq_set().push_back(entry);
171 while ( entry && seqid.
Empty());
204 bool processed =
handler(*
this);
221 CAutoRevoker autorevoker(
info);
240 catch(
const std::exception& e)
260 if (temp.IsSet() && temp.GetSet().IsSetClass() &&
User-defined methods of the data storage class.
User-defined methods of the data storage class.
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, const string &loader_name, CHugeAsnReader *reader, CObjectManager::EIsDefault is_default=CObjectManager::eNonDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_Default)
static bool IsHugeSet(CBioseq_set::TClass setClass)
bool ForEachEntry(CRef< CScope > scope, THandlerEntries handler)
bool ForEachBlob(THandlerBlobs)
void Open(const string &file_name, const set< TTypeInfo > *types=&g_supported_types)
static CSeq_entry_Handle GetTopLevelEntry(CBioseq_Handle beh)
bool Read(THandler handler, CRef< CSeq_id > seqid)
CHugeAsnReader & GetReader()
virtual ~CHugeFileProcess(void)
destructor
std::function< void(CConstRef< CSubmit_block >, CRef< CSeq_entry >)> THandler
unique_ptr< CHugeAsnReader > m_pReader
static const set< TTypeInfo > g_supported_types
unique_ptr< CHugeFile > m_pHugeFile
void OpenFile(const string &file_name)
std::function< bool(CSeq_entry_Handle &seh)> THandlerEntries
CHugeFileProcess()
constructors
std::function< bool(CHugeFileProcess &)> THandlerBlobs
static bool IsSupported(TTypeInfo info)
std::function< bool(CHugeAsnReader *, const std::list< CConstRef< CSeq_id > > &)> THandlerIds
CTypeInfo class contains all information about C++ types (both basic and classes): members and layout...
void(*)(CSeq_entry_Handle seh, IWorkbench *wb, const CSerialObject &obj) handler
static string CreateAbsolutePath(const string &path, ERelativeToWhat rtw=eRelativeToCwd)
Get an absolute path from some, possibly relative, path.
void ResetHistory(EActionIfLocked action=eKeepIfLocked)
Clean all unused TSEs from the scope's cache and release the memory.
void AddDataLoader(const string &loader_name, TPriority pri=kPriority_Default)
Add data loader by name.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
void RemoveDataLoader(const string &loader_name, EActionIfLocked action=eThrowIfLocked)
Revoke data loader from the scope.
bool RevokeDataLoader(CDataLoader &loader)
Revoke previously registered data loader.
CSeq_entry_Handle GetParentEntry(void) const
Get parent Seq-entry handle.
bool IsTopLevelEntry(void) const
Check if this handle is top-level entry.
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
CSeq_entry_Handle GetParentEntry(void) const
Get parent Seq-entry handle.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
void Reset(void)
Reset reference object.
bool Empty(void) const THROWS_NONE
Check if CRef is empty – not pointing to any object, which means having a null value.
#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.
TSeq & SetSeq(void)
Select the variant.
static const struct type types[]