A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/col__validator_8cpp_source.html below:

NCBI C++ ToolKit: src/app/tableval/col_validator.cpp Source File

17 #define DEFINE_COL_VALIDATOR_WITH_ALT_NAMES(name, text1, text2, text3) \ 18 class CAutoColValidator##name: public CColumnValidator \ 21  static CAutoColValidator##name _singleton; \ 22  CAutoColValidator##name() \ 24  if (text1) CColumnValidatorRegistry::GetInstance().Register(text1, this); \ 25  if (text2) CColumnValidatorRegistry::GetInstance().Register(text2, this); \ 26  if (text3) CColumnValidatorRegistry::GetInstance().Register(text3, this); \ 28  bool DoValidate(const CTempString& value, string& error) const; \ 30 CAutoColValidator##name CAutoColValidator##name::_singleton; \ 31 bool CAutoColValidator##name::DoValidate(const CTempString& value, string& error) const 33 #define DEFINE_COL_VALIDATOR(name) DEFINE_COL_VALIDATOR_WITH_ALT_NAMES(name, #name, 0, 0) 34 #define DEFINE_COL_VALIDATOR2(name, text) DEFINE_COL_VALIDATOR_WITH_ALT_NAMES(name, text, 0, 0) 35 #define DEFINE_COL_VALIDATOR3(name, text1, text2) DEFINE_COL_VALIDATOR_WITH_ALT_NAMES(name, text1, text2, 0) 36 #define DEFINE_COL_VALIDATOR4(name, text1, text2, text3) DEFINE_COL_VALIDATOR_WITH_ALT_NAMES(name, text1, text2, text3) 41

unique_ptr<objects::CTaxon1> m_taxClient;

94  names

.insert(it->first);

97  static const char

* message =

"Supported data types are: "

;

98  size_t n

= strlen(message);

99

out_stream << message;

102  if

(it !=

names

.begin()) {

106  if

(

n

+ it->length() > 77) {

122  error

=

"Datatype \""

;

124  error

+=

"\" is unknown"

;

129  return

it->second->DoValidate(

value

,

error

);

138  bool

operator()(

const

pair<string, CColumnValidator*>&

l

)

const 140  return

(

l

.second == _this);

154  if

(m_taxClient.get() == 0)

156

m_taxClient.reset(

new CTaxon1

);

162  TTaxId

taxid = NStr::StringToNumeric<TTaxId>(

value

);

163

m_taxClient->GetById(taxid);

176  if

(m_taxClient.get() == 0)

178

m_taxClient.reset(

new CTaxon1

);

184 

m_taxClient->GetTaxIdByName(

value

);

204  error

=

"unknown origin type"

;

243  error

=

"Unknown accession type"

;

266  if

(!

value

.empty())

282  static const char

* supported_formats[]= {

283  "d-b-Y"

,

"d-B-Y"

,

"b-Y"

,

"B-Y"

,

"Y"

,

287  bool

bad_format(

true

), in_future(

false

);

297  for

(

const char

** fmt = supported_formats; *fmt && bad_format; fmt++)

313  error

=

"Unsupported date format"

;

316  error

=

"Date in future"

;

325  if

(!

value

.empty())

328  bool

is_miscapitalized(

false

);

330  error

=

"Country is not valid"

;

331  if

(is_miscapitalized)

332  error

=

"Country is miscapitalized"

;

344  if

(

value

!=

"TRUE"

&&

346  error

=

"Can have TRUE only"

;

static CBioSource::EOrigin GetOriginByString(const string &origin, NStr::ECase use_case=NStr::eCase, bool starts_with=false)

static CBioSource::EGenome GetGenomeByOrganelle(const string &organelle, NStr::ECase use_case=NStr::eCase, bool starts_with=false)

~CColumnValidatorRegistry()

bool DoValidate(const string &datatype, const CTempString &value, string &error) const

bool IsSupported(const string &datatype) const

void UnRegister(CColumnValidator *val)

void PrintSupported(CNcbiOstream &out_stream) const

void Register(const CTempString &name, CColumnValidator *val)

CColumnValidatorRegistry()

static CColumnValidatorRegistry & GetInstance()

static bool IsDiscouraged(const string &column)

virtual ~CColumnValidator()

static bool IsValid(const string &country)

ECompare Compare(const CDate &date) const

@ eCompare_after

*this comes second.

static bool IsDiscouraged(const TSubtype stype, bool indexer=false)

static TSubtype GetSubtypeValue(const string &str, EVocabulary vocabulary=eVocabulary_raw)

Root class for all serialization exceptions.

static bool IsISOFormatDate(const string &orig_date)

static TSubtype GetSubtypeValue(const string &str, EVocabulary vocabulary=eVocabulary_raw)

static CRef< CDate > GetDateFromISODate(const string &orig_date)

static bool IsDiscouraged(const TSubtype subtype)

CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...

container_type::const_iterator const_iterator

const_iterator begin() const

const_iterator end() const

const_iterator find(const key_type &key) const

#define DEFINE_COL_VALIDATOR4(name, text1, text2, text3)

#define DEFINE_COL_VALIDATOR(name)

#define DEFINE_COL_VALIDATOR3(name, text1, text2)

static const struct name_t names[]

static const char * column

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

SStrictId_Tax::TId TTaxId

Taxon id type.

#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.

static EAccessionInfo IdentifyAccession(const CTempString &accession, TParseFlags flags=fParse_AnyRaw)

Deduces information from a bare accession a la WHICH_db_accession; may report false negatives on prop...

EAccessionInfo

For IdentifyAccession (below)

@ fParse_AnyLocal

Treat otherwise unidentified strings as local accessions as long as they don't resemble FASTA-style I...

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

IO_PREFIX::ostream CNcbiOstream

Portable alias for ostream.

@ eCurrent

Use current time. See also CCurrentTime.

const GenericPointer< typename T::ValueType > T2 value

Defines NCBI C++ exception handling.

static const GLdouble origin[]

static SLJIT_INLINE sljit_ins st(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

CRef< objects::CObjectManager > om


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