1 #ifndef GUI_WIDGETS_EDIT___SUC_DATA__HPP
2 #define GUI_WIDGETS_EDIT___SUC_DATA__HPP
40 #include <unordered_map>
41 #include <wx/string.h>
48 CSUCLine (
const string& line,
const string& accession,
const CObject* obj);
51 void Add(
const string& accession,
const CObject* obj);
52 void Print() { cerr << m_Count <<
"\t" << m_Line << endl; };
55 const string&
GetLine()
const {
return m_Line; }
72 CSUCBlock(objects::CFlatFileConfig::FGenbankBlocks which_block) : m_Block(which_block), m_pos(-1), m_Expanded(
false) {}
75 objects::CFlatFileConfig::FGenbankBlocks
GetBlockType()
const {
return m_Block; };
76 void AddBlock(
const string& block_text,
const string& accession,
const CObject* obj);
77 void AddLine(
const string& line,
const string& accession,
const CObject* obj,
bool can_split);
83 static const char* GetBlockLabel(objects::CFlatFileConfig::FGenbankBlocks block_type);
86 void GetText(wxString&
text)
const;
89 bool HasSecondLevel(
void);
93 objects::CFlatFileConfig::FGenbankBlocks
m_Block;
109 void AddText(
string & block_text, objects::CFlatFileConfig::FGenbankBlocks which_block,
const string& accession,
CConstRef<CObject> obj);
110 size_t CountLines()
const;
112 objects::CFlatFileConfig::FGenbankBlocks GetBlockType(
size_t pos)
const;
113 void ExpandBlock(
bool val, objects::CFlatFileConfig::FGenbankBlocks which_block);
115 bool GetExpanded(objects::CFlatFileConfig::FGenbankBlocks which_block)
const;
116 void GetText(wxString&
text);
118 const unordered_map<unsigned int, CRef< CSUCBlock > >&
GetBlocks(
void) {
return m_Blocks;}
119 const vector<objects::CFlatFileConfig::FGenbankBlocks>&
GetOrder(
void) {
return m_order;}
121 unordered_map<unsigned int, CRef< CSUCBlock > >
m_Blocks;
122 vector<objects::CFlatFileConfig::FGenbankBlocks>
m_order;
124 bool x_GetBlockPos(
size_t pos, objects::CFlatFileConfig::FGenbankBlocks& block_type,
size_t& block_pos)
const;
CSUCBlock(objects::CFlatFileConfig::FGenbankBlocks which_block)
objects::CFlatFileConfig::FGenbankBlocks GetBlockType() const
size_t CountChar(const string &str, const char c)
void SetExpanded(bool val)
map< string, map< CTempString, pair< bool, CRef< CSUCLine > > > > m_SecondLevel
size_t CountLines() const
const map< CTempString, CRef< CSUCLine > > & GetLines(void)
const map< string, map< CTempString, pair< bool, CRef< CSUCLine > > > > & GetSecondLevel(void)
map< CTempString, CRef< CSUCLine > >::const_iterator m_pos_it
map< CTempString, CRef< CSUCLine > > m_Lines
objects::CFlatFileConfig::FGenbankBlocks m_Block
const string & GetLine() const
pair< string, CConstRef< CObject > > TRelatedObject
size_t GetRelatedObjectCount() const
const string & GetAccession()
const string & GetRelatedObjectAccession(size_t row) const
CConstRef< CObject > GetRelatedObject(size_t row) const
int Compare(const string &line)
vector< TRelatedObject > m_RelatedObjects
unordered_map< unsigned int, CRef< CSUCBlock > > m_Blocks
const unordered_map< unsigned int, CRef< CSUCBlock > > & GetBlocks(void)
vector< objects::CFlatFileConfig::FGenbankBlocks > m_order
const vector< objects::CFlatFileConfig::FGenbankBlocks > & GetOrder(void)
void Print(const CCompactSAMApplication::AlignInfo &ai)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static int Compare(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Compare of a substring with another string.
#define NCBI_GUIWIDGETS_EDIT_EXPORT
Defines to provide correct exporting from DLLs in Windows.
static void text(MDB_val *v)
static const char * str(char *buf, int n)
static void ExpandAll(wxTreeCtrl &tree, const wxTreeItemId &id, bool shouldExpand, int toLevel)