n_brackets_left = 0;
56 size_tn_brackets_right = 0;
57 boolcan_split(
true);
61 size_tpos = posE + 1;
62posE = block_text.find(
'\n', pos);
63 stringline = (posE == string::npos) ? block_text.substr(pos) : block_text.substr(pos, posE - pos);
68 for(
const auto& c : line) {
77 AddLine(line, accession, obj, can_split);
78 if(n_quotes % 2 == 0 && n_brackets_left == n_brackets_right)
87}
while(posE != string::npos);
93 static const char* spaces =
" \t";
94 if(line.find_first_not_of(spaces) == string::npos)
107lit->second->Add(accession, obj);
116 whole.erase(0,
whole.find_first_not_of(spaces));
117 whole.erase(
whole.find_last_not_of(spaces) + 1);
132 map.emplace(new_line->
GetLine(), make_pair(can_split, new_line));
136lit->second.second->Add(accession, obj);
158 m_pos=
static_cast<int>(pos);
160 else if(pos !=
m_pos)
162 intdiff =
static_cast<int>(pos);
165 m_pos=
static_cast<int>(pos);
176 text<< line.second->GetCount();
178 text<< line.second->GetLine();
185 switch(block_type) {
215 return "SOURCEFEAT";
278 autoit =
m_Blocks.find(which_block);
282new_block->AddBlock(block_text, accession, obj);
284 m_order.push_back(which_block);
288it->second->AddBlock(block_text, accession, obj);
298 if(it->second->GetExpanded())
300 count+= it->second->CountLines();
308 for(
size_t i= 0;
i<
m_order.size();
i++)
310objects::CFlatFileConfig::FGenbankBlocks which_block =
m_order[
i];
311 autoit =
m_Blocks.find(which_block);
314it->second->SetExpanded(
true);
315it->second->GetText(
text);
322 size_tblock_pos = 0;
326 autoit =
m_Blocks.find(block_type);
328 returnit->second->GetLine(block_pos);
336 size_tblock_pos = 0;
349 autoit =
m_Blocks.find(which_block);
352it->second->SetExpanded(
val);
361it->second->SetExpanded(
val);
369 autoit =
m_Blocks.find(which_block);
372rval = it->second->GetExpanded();
380 size_tremainder = pos;
382 for(
size_t i= 0;
i<
m_order.size();
i++)
384objects::CFlatFileConfig::FGenbankBlocks which_block =
m_order[
i];
385 autoit =
m_Blocks.find(which_block);
386 if(it !=
m_Blocks.end() && it->second->GetExpanded())
388 size_tnum_lines = it->second->CountLines();
389 if(remainder < num_lines)
391block_type = which_block;
392block_pos = remainder;
395remainder -= num_lines;
@ fGenbankBlocks_FeatAndGap
@ fGenbankBlocks_Sourcefeat
@ fGenbankBlocks_Keywords
@ fGenbankBlocks_Reference
@ fGenbankBlocks_Sequence
@ fGenbankBlocks_Featheader
@ fGenbankBlocks_Accession
@ fGenbankBlocks_Basecount
void AddBlock(const string &block_text, const string &accession, const CObject *obj)
map< string, map< CTempString, pair< bool, CRef< CSUCLine > > > > m_SecondLevel
static const char * GetBlockLabel(objects::CFlatFileConfig::FGenbankBlocks block_type)
bool HasSecondLevel(void)
void AddLine(const string &line, const string &accession, const CObject *obj, bool can_split)
map< CTempString, CRef< CSUCLine > >::const_iterator m_pos_it
map< CTempString, CRef< CSUCLine > > m_Lines
objects::CFlatFileConfig::FGenbankBlocks m_Block
void GetText(wxString &text) const
CConstRef< CSUCLine > GetLine(size_t pos) const
CSUCLine(const string &line, const string &accession, const CObject *obj)
const string & GetLine() const
void Add(const string &accession, const CObject *obj)
vector< TRelatedObject > m_RelatedObjects
CConstRef< CSUCLine > GetLine(size_t pos) const
objects::CFlatFileConfig::FGenbankBlocks GetBlockType(size_t pos) const
void GetText(wxString &text)
unordered_map< unsigned int, CRef< CSUCBlock > > m_Blocks
void AddText(string &block_text, objects::CFlatFileConfig::FGenbankBlocks which_block, const string &accession, CConstRef< CObject > obj)
bool x_GetBlockPos(size_t pos, objects::CFlatFileConfig::FGenbankBlocks &block_type, size_t &block_pos) const
size_t CountLines() const
void ExpandBlock(bool val, objects::CFlatFileConfig::FGenbankBlocks which_block)
vector< objects::CFlatFileConfig::FGenbankBlocks > m_order
bool GetExpanded(objects::CFlatFileConfig::FGenbankBlocks which_block) const
const_iterator end() const
const_iterator find(const key_type &key) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is whole
static void text(MDB_val *v)
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