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/nst__config_8cpp_source.html below:

NCBI C++ ToolKit: src/app/netstorage/nst_config.cpp Source File

48

vector<string> & warnings,

49  bool

throw_port_exception);

51

vector<string> & warnings);

53

vector<string> & warnings);

55

vector<string> & warnings);

57  const string

& section,

59

vector<string> & warnings);

61  const string

& section,

63

vector<string> & warnings);

65  const string

& section,

const string

& entry,

66

vector<string> & warnings);

68  const string

& section,

const string

& entry,

69

vector<string> & warnings);

71  const string

& section,

const string

& entry,

72

vector<string> & warnings);

74  const string

& section,

const string

& entry,

75

vector<string> & warnings);

76 static string NSTRegValName

(

const string

& section,

const string

& entry);

79  unsigned int

low_limit,

80  unsigned int

high_limit);

84

vector<string> & warnings,

85  bool

throw_port_exception)

96

vector<string> & warnings,

97  bool

throw_port_exception)

99  const string

section =

"server"

;

105  int

port_val = reg.

GetInt

(section,

"port"

, 0);

108  " value. Allowed range: "

+

111  if

(throw_port_exception)

113

warnings.push_back(

msg

);

116  if

(throw_port_exception)

124  int val

= reg.

GetInt

(section,

"max_connections"

,

145

max_threads_val =

val

;

159

init_threads_val =

val

;

162  if

(init_threads_val > max_threads_val)

166  " break the mandatory condition " 167  "init_threads <= max_threads"

);

172  int val

= reg.

GetInt

(section,

"network_timeout"

,

189

vector<string> & warnings)

191  const string

section =

"database"

;

199  " must not be empty"

);

208  " must not be empty"

);

217  " must not be empty"

);

226  " must not be empty"

);

243

vector<string> & warnings)

245  const string

section =

"metadata_conf"

;

269

list<string> sections;

272  const string

prefix =

"service_"

;

273  for

(list<string>::const_iterator k = sections.begin();

274

k != sections.end(); ++k) {

278  string

service(k->c_str() + prefix.size());

279  if

(service.empty()) {

280

warnings.push_back(

"Section ["

+ *k +

"] does not have " 285  if

(!reg.

HasEntry

(*k,

"metadata"

))

291  if

(!reg.

GetBool

(*k,

"metadata"

,

false

))

303  const string

& section,

304  const string

& entry,

305

vector<string> & warnings)

312  if

(!

value

.empty()) {

322

warnings.push_back(

"The "

+

324  "be a positive value."

);

328

}

catch

(

const

exception & ex) {

329

warnings.push_back(

"Exception while validating "

+

331  " value: "

+ ex.what());

333

warnings.push_back(

"Unknown exception while validating "

+

335  " value: "

+

value

+

". It must be " 336  " in a recognizable format."

);

344  const string

& section,

345  const string

& entry,

346

vector<string> & warnings)

353

}

catch

(

const

exception & ex) {

354

warnings.push_back(

"Exception while validating "

+

356  " value: "

+ ex.what());

358

warnings.push_back(

"Unknown exception while validating "

+

360  " value: "

+

value

+

". It must be " 361  "'infinity' or a recognizable format."

);

370  return "["

+ section +

"]/"

+ entry;

376  const string

& entry,

377  unsigned int

low_limit,

378  unsigned int

high_limit)

389  const string

& section,

const string

& entry,

390

vector<string> & warnings)

393

reg.

GetBool

(section, entry,

false

);

396

warnings.push_back(

g_LogPrefix

+

"unexpected value of "

+

398  ". Expected boolean value."

);

407  const string

& section,

const string

& entry,

408

vector<string> & warnings)

411

reg.

GetInt

(section, entry, 0);

414

warnings.push_back(

g_LogPrefix

+

"unexpected value of "

+

416  ". Expected integer value."

);

426  const string

& section,

const string

& entry,

427

vector<string> & warnings)

433

warnings.push_back(

g_LogPrefix

+

"unexpected value of "

+

435  ". Expected floating point value."

);

445  const string

& section,

const string

& entry,

446

vector<string> & warnings)

452

warnings.push_back(

g_LogPrefix

+

"unexpected value of "

+

454  ". Expected string value."

);

463

vector<string> & warnings)

478

warnings.push_back(

std::string

(

"CException while retrieving " 479  "backend configuration when no " 480  "service is provided: "

) + ex.

what

());

481

}

catch

(

const

std::exception & ex) {

482

warnings.push_back(

std::string

(

"std::exception while retrieving " 483  "backend configuration when no " 484  "service is provided: "

) + ex.

what

());

486

warnings.push_back(

"Unknown exception while retrieving backend " 487  "configuration when no service is provided"

);

492

list<string> sections;

495  const string

prefix =

"service_"

;

496  for

(list<string>::const_iterator k = sections.begin();

497

k != sections.end(); ++k) {

501  string

service(k->c_str() + prefix.size());

511

warnings.push_back(

"CException while retrieving backend " 512  "configuration for service "

+ service +

514

}

catch

(

const

std::exception & ex) {

515

warnings.push_back(

"std::exception while retrieving backend " 516  "configuration for service "

+ service +

519

warnings.push_back(

"Unknown exception while retrieving " 520  "backend configuration for service "

+ service);

523  return

configuration;

531  if

(allow_infinity) {

538  result

.m_IsNull =

false

;

539  result

.m_Value.AssignFromSmartString(reg_value);

CJsonNode ReportConfig() const

void SetByKey(const string &key, CJsonNode::TInstance value)

For a JSON object node, insert a new element or update an existing element.

static CJsonNode NewObjectNode()

Create a new JSON object node.

CCompoundIDPool GetCompoundIDPool(void) const

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

virtual const char * what(void) const noexcept

Standard report (includes full backlog).

virtual bool GetBool(const string &section, const string &name, bool default_value, TFlags flags=0, EErrAction err_action=eThrow) const

Get boolean value of specified parameter name.

virtual void EnumerateSections(list< string > *sections, TFlags flags=fAllLayers) const

Enumerate section names.

virtual int GetInt(const string &section, const string &name, int default_value, TFlags flags=0, EErrAction err_action=eThrow) const

Get integer value of specified parameter name.

virtual double GetDouble(const string &section, const string &name, double default_value, TFlags flags=0, EErrAction err_action=eThrow) const

Get double value of specified parameter name.

virtual bool HasEntry(const string &section, const string &name=kEmptyStr, TFlags flags=0) const

virtual string GetString(const string &section, const string &name, const string &default_value, TFlags flags=0) const

Get the parameter string value.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-insensitive compare of a substring with another string.

static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)

Check if a string ends with a specified suffix value.

static double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)

Convert string to double.

static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)

Truncate whitespace in a string (in-place)

static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)

Check if a string starts with a specified prefix value.

static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)

Case-insensitive equality of a substring with another string.

static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)

Convert numeric value to string.

@ fAllowTrailingSpaces

Ignore trailing whitespace characters.

@ eNocase

Case insensitive compare.

const GenericPointer< typename T::ValueType > T2 value

const unsigned short port_high_limit

const unsigned int default_max_threads

const unsigned int default_init_threads

const unsigned short port_low_limit

const unsigned int max_threads_high_limit

const unsigned int max_connections_low_limit

const unsigned int default_max_connections

const unsigned int max_threads_low_limit

const unsigned int init_threads_high_limit

const unsigned int init_threads_low_limit

const unsigned int max_connections_high_limit

const unsigned int default_network_timeout

CJsonNode NSTGetBackendConfiguration(const IRegistry &reg, CNetStorageServer *server, vector< string > &warnings)

static bool NSTValidateDouble(const IRegistry &reg, const string &section, const string &entry, vector< string > &warnings)

static string NSTRegValName(const string &section, const string &entry)

static void NSTValidateDatabaseSection(const IRegistry &reg, vector< string > &warnings)

static void NSTValidateProlongValue(const IRegistry &reg, const string &section, const string &entry, vector< string > &warnings)

static bool NSTValidateBool(const IRegistry &reg, const string &section, const string &entry, vector< string > &warnings)

TNSTDBValue< CTimeSpan > ReadTimeSpan(const string &reg_value, bool allow_infinity)

static void NSTValidateServerSection(const IRegistry &reg, vector< string > &warnings, bool throw_port_exception)

static bool NSTValidateString(const IRegistry &reg, const string &section, const string &entry, vector< string > &warnings)

static void NSTValidateServices(const IRegistry &reg, vector< string > &warnings)

static void NSTValidateMetadataSection(const IRegistry &reg, vector< string > &warnings)

static string NSTOutOfLimitMessage(const string &section, const string &entry, unsigned int low_limit, unsigned int high_limit)

static bool NSTValidateInt(const IRegistry &reg, const string &section, const string &entry, vector< string > &warnings)

void NSTValidateConfigFile(const IRegistry &reg, vector< string > &warnings, bool throw_port_exception)

static void NSTValidateTTLValue(const IRegistry &reg, const string &section, const string &entry, vector< string > &warnings)

const double default_execute_sp_timeout

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

bool operator()(const string &m)

SCaseInsensitivePredicate(const string &pattern)


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