98 m_ColorGradType(eTwoColorGradient)
149 ITERATE(list<string>, it, values) {
150 const string&
val = *it;
153 }
else if(
val ==
"Protein") {
156 ERR_POST(
"CTemplateScoringMethod::Load() - unsupported method type \""
161 string gradient = reg.
Get(
"Info",
"Gradient");
186 gradtype =
"3Colors";
188 gradtype =
"2Colors";
222 const string def_value)
229 catch (std::exception&) {
class CRgbaColor provides a simple abstraction for managing colors.
virtual ~CTemplateScoringMethod()
virtual string GetDescription() const
returns a detailed description of the method that is used in UI
virtual string GetName() const
returns unique name of the method that is used in UI to identify it
virtual bool SaveInfo(CNcbiRegistry ®)
saves only descriptive information
EColorGradType m_ColorGradType
virtual bool Save(CNcbiRegistry ®)
virtual bool Load(CNcbiRegistry ®)
CTemplateScoringMethod()
CTemplateScoringMethod.
CRgbaColor x_GetColor(CNcbiRegistry ®, const string &key, const string def_value)
void SetDescription(const string &s)
virtual int GetType() const
returns combination of EAlignType flags defining types of alignments that can be colored with this me...
virtual bool LoadInfo(CNcbiRegistry ®)
loads only descriptive information
void SetName(const string &s)
virtual int GetSupportedColorTypes() const
returns a combination of EColorType flags
virtual bool IsAverageable() const
return "true" if scores could be averaged
static const char * GetAlignmentTagByType(IAlnExplorer::EAlignType type)
returns symbolic label for the given alignment type, should be
static IAlnExplorer::EAlignType GetAlignmentTypeByTag(const string &tag)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
static CRgbaColor GetColor(const string &color_type)
return a color based on a string.
virtual const string & Get(const string §ion, const string &name, TFlags flags=0) const
Get the parameter value.
virtual string GetString(const string §ion, const string &name, const string &default_value, TFlags flags=0) const
Get the parameter string value.
bool Set(const string §ion, const string &name, const string &value, TFlags flags=0, const string &comment=kEmptyStr)
Set the configuration parameter value.
@ fTruncate
Leading, trailing blanks can be truncated.
@ fPersistent
Persistent – saved when file is written.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
@ fSplit_Tokenize
All delimiters are merged and trimmed, to get non-empty tokens only.
const struct ncbi::grid::netcache::search::fields::KEY key
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
Process information in the NCBI Registry, including working with configuration files.
The NCBI C++/STL use hints.
static const char * str(char *buf, int n)
static const struct type types[]