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

NCBI C++ ToolKit: src/gui/widgets/edit/macro_parse_functions.cpp Source File

73

ostrm <<

"FuncName: "

<< f_args.

m_FuncName

<< endl;

74

ostrm <<

"Negate: "

<< f_args.

m_Negate

<< endl;

98  if

(

value

!= macro::CMacroRep::m_TopFuncName) {

115  auto

do_tree = macro_rep.GetDoTree();

117  LOG_POST

(

Error

<<

"CMacroRep::GetDoFunctions() - Do tree is empty"

);

124

vector<string> do_fncs;

152  string

arg_value = (*arg_it)->GetValue().GetStrValue();

153  auto

pos = arg_value.find(

"."

);

155  string

rt_var_name = arg_value.substr(0, pos);

157  LOG_POST

(

Error

<<

"Found: "

<< rt_var_name <<

" instead of the expected RT var:"

<<

m_RTVar

);

161  string

subtype = arg_value.substr(pos + 1,

NPOS

);

205  bool x_SubtypeIsOk

(

const string

& rt_var_name,

const string

& subtype);

224  if

(subtype ==

"subtype"

&&

237  auto

pos = field.find(

"."

);

240  if

(args.size() == 3) {

241  if

((

subname

==

"subname"

&& args[1] ==

"org.orgname.mod"

) ||

242

(

subname

==

"name"

&& args[1] ==

"subtype"

) ||

243

(

subname

==

"val"

&& (args[1] ==

"qual"

|| args[1] ==

"data.rna.ext.gen.quals"

))) {

244

field = args[1] +

","

+ args[2];

248  else if

(args.size() == 2) {

249  if

(

subname

==

"db"

&& (args[1] ==

"dbxref"

|| args[1] ==

"org.db"

)) {

260  if

(

m_Target

!= macro::CMacroBioData::sm_StrComm)

264  auto

node_type = node.

GetValue

().GetType();

266  bool

prefix_present =

false

;

267  bool

suffix_present =

false

;

270  auto

child_type = (*child_it)->GetValue().GetType();

273  for

(

auto

str_it = (*child_it)->SubNodeBegin(); str_it != (*child_it)->SubNodeEnd(); ++str_it) {

274  auto

subnode = (*str_it)->GetValue();

276  NStr::EqualNocase

(subnode.GetStrValue(), macro::CMacroFunction_StringConstraints::sm_Equal)) {

278  auto

arg_it = (*str_it)->SubNodeBegin();

279  string

first_arg = (*arg_it)->GetValue().GetStrValue();

282  string

second_arg = (*arg_it)->GetValue().GetStrValue();

284  auto

pos = first_arg.find(

"."

);

286  string

rt_var = first_arg.substr(0, pos);

289

prefix_present =

true

;

291

suffix_present =

true

;

293

field_value = second_arg;

300  if

(prefix_present && suffix_present) {

304  else if

(!field_value.empty()) {

311  bool

prefix_present =

false

;

312  bool

suffix_present =

false

;

314  auto

child = (*child_it)->GetValue();

316  NStr::EqualNocase

(child.GetStrValue(), macro::CMacroFunction_StringConstraints::sm_Equal)) {

318  auto

arg_it = (*child_it)->SubNodeBegin();

319  string

first_arg = (*arg_it)->GetValue().GetStrValue();

322  string

second_arg = (*arg_it)->GetValue().GetStrValue();

324  auto

pos = first_arg.find(

"."

);

326  string

rt_var = first_arg.substr(0, pos);

329

prefix_present =

true

;

331

suffix_present =

true

;

336  if

(prefix_present && suffix_present) {

345  string

first_arg = (*arg_it)->GetValue().GetStrValue();

348  string

second_arg = (*arg_it)->GetValue().GetStrValue();

350  auto

pos = first_arg.find(

"."

);

352  string

rt_var = first_arg.substr(0, pos);

365  if

(

m_Target

!= macro::CMacroBioData::sm_DBLink)

369  auto

node_type = node.

GetValue

().GetType();

374  string

first_arg = (*arg_it)->GetValue().GetStrValue();

377  string

second_arg = (*arg_it)->GetValue().GetStrValue();

379  auto

pos = first_arg.find(

"."

);

381  string

rt_var = first_arg.substr(0, pos);

401  auto

arg = (*node_it)->GetValue();

412  auto value

= arg.GetStrValue();

469  auto

arg_node = (*from_it)->GetValue();

473

assign_fn.

m_FuncArgs

.emplace_back(arg_node.GetOrig());

478

assign_fn.

m_FuncName

= arg_node.GetStrValue();

479  for

(

auto

fnc_arg_it = (*from_it)->SubNodeBegin(); fnc_arg_it != (*from_it)->SubNodeEnd(); ++fnc_arg_it) {

480  auto

arg_value = (*fnc_arg_it)->GetValue();

481

assign_fn.

m_FuncArgs

.emplace_back(arg_value.GetStrValue());

493

assign_fn = tmp_assignfn.front();

513  auto

arg_node = (*node_it)->GetValue();

515  func_info

.m_FuncArgs.emplace_back(arg_node.GetStrValue());

546  auto

do_tree = macro_rep.GetDoTree();

554

do_constraints.clear();

572  return

(

NStr::EqualNocase

(fn_name, macro::CMacroFunction_GetSeqdesc::sm_BsrcForFeat) ||

573  NStr::EqualNocase

(fn_name, macro::CMacroFunction_GetSeqdesc::sm_BsrcForMolinfo) ||

575  NStr::EqualNocase

(fn_name, macro::CMacroFunction_GetSeqdesc::sm_BsrcForSeqdesc) ||

576  NStr::EqualNocase

(fn_name, macro::CMacroFunction_GetSeqdesc::sm_MolinfoForBsrc) ||

577  NStr::EqualNocase

(fn_name, macro::CMacroFunction_GetSeqdesc::sm_MolinfoForFeat) ||

578

macro::CMacroFunction_PubFields::s_IsPubFieldFnc(fn_name) ||

590  auto

node_type = qnode.

GetType

();

606  auto

left_arg = (*node_it)->GetValue();

608  NStr::EqualNocase

(left_arg.GetStrValue(), macro::CMacroFunction_ChoiceType::GetFuncName())) {

610  auto

first_arg = (*node_it)->SubNodeBegin();

611  if

(first_arg != (*node_it)->SubNodeEnd()) {

612  func_info

.m_FuncArgs.emplace_back((*first_arg)->GetValue().GetStrValue());

619  func_info

.m_FuncArgs.emplace_back((*node_it)->GetValue().GetStrValue());

638  func_info

.m_FuncArgs.emplace_back((*node_it)->GetValue().GetStrValue());

642  auto

arg = (*node_it)->GetValue();

648  func_info

.m_FuncArgs.emplace_back(arg.GetStrValue());

664  string

first_arg = left_arg.GetStrValue();

665  if

(first_arg ==

"data.rna.type"

) {

669  string

second_arg = (*node_it)->GetValue().GetStrValue();

670  func_info

.m_FuncArgs.emplace_back(second_arg);

674  else if

(first_arg ==

"data.rna.ext.gen.class"

) {

678  string

second_arg = (*node_it)->GetValue().GetStrValue();

679  func_info

.m_FuncArgs.emplace_back(second_arg);

683  else if

(

m_Target

== macro::CMacroBioData::sm_ImpFeat) {

684  if

(first_arg ==

"data.imp.key"

) {

688  string

second_arg = (*node_it)->GetValue().GetStrValue();

689  func_info

.m_FuncArgs.emplace_back(second_arg);

694  else if

(

m_Target

== macro::CMacroBioData::sm_SeqFeat) {

695  if

(first_arg ==

"data.prot.processed"

) {

699  string

second_arg = (*node_it)->GetValue().GetStrValue();

700  func_info

.m_FuncArgs.emplace_back(second_arg);

702  func_info

.m_FuncArgs.emplace_back(

"is_protein"

);

707  else if

(

m_Target

== macro::CMacroBioData::sm_UserObject) {

708  if

(first_arg ==

"type.str"

) {

712  string

second_arg = (*node_it)->GetValue().GetStrValue();

713  func_info

.m_FuncArgs.emplace_back(second_arg);

720  func_info

.m_FuncArgs.emplace_back(first_arg);

723  string

second_arg = (*node_it)->GetValue().GetStrValue();

724  func_info

.m_FuncArgs.emplace_back(second_arg);

740  auto

arg = (*node_it)->GetValue();

746  func_info

.m_FuncArgs.emplace_back(arg.GetStrValue());

787  auto

arg = (*node_it)->GetValue();

798  func_info

.m_FuncArgs.emplace_back(arg.GetStrValue());

837  auto

arg = (*node_it)->GetValue();

848  func_info

.m_FuncArgs.emplace_back(arg.GetStrValue());

861  auto

where_tree = macro_rep.GetWhereClause();

878  for

(

auto

& func_it : func_list) {

879  for

(

auto

& arg_it : func_it.m_FuncArgs) {

880  if

(arg_it.find(

","

) !=

NPOS

) {

881

vector<string> tokens;

883  for

(

auto

& token_it : tokens) {

884  auto

var = macro_rep.GetVar(token_it);

886

token_it = var->GetGUIResolvedValue();

892  auto

var = macro_rep.GetVar(arg_it);

894

arg_it = var->GetGUIResolvedValue();

CAssignQueryTreeGetArgs(SMacroFuncWithArgs &assign_fn, const string &target, TMacroFuncList &constraints, const string &rt_var)

bool x_GetFieldForSubname(string &field)

ETreeTraverseCode operator()(const CTreeNode< CQueryParseNode > &node, int delta)

bool x_IsStructCommField(const CTreeNode< CQueryParseNode > &node)

TMacroFuncList * m_Constraints

SMacroFuncWithArgs * m_AssignFnc

bool x_SubtypeIsOk(const string &rt_var_name, const string &subtype)

bool x_IsDBLinkField(const CTreeNode< CQueryParseNode > &node)

void x_ProcessFunction(const CTreeNode< CQueryParseNode > &node, const CTreeNode< CQueryParseNode > &parent_node, SMacroFuncWithArgs &func_info)

Functor should have the next prototype: ETreeTraverseCode Func(TreeNode& node, int delta_level) where...

CDoQueryTreeGetArgs(TMacroFuncList &func_list, TMacroFuncList &do_constraints, const macro::CMacroRep &macro_rep)

TMacroFuncList * m_Constraints

const macro::CMacroRep * m_MacroRep

TMacroFuncList * m_Functions

ETreeTraverseCode operator()(const CTreeNode< CQueryParseNode > &node, int delta)

vector< CQueryParseTree * > m_AssignQueries

Query tree and associated utility methods.

CQueryTreeListFunctions(vector< string > &functions)

ETreeTraverseCode operator()(const CTreeNode< CQueryParseNode > &node)

vector< string > * m_Functions

definition of a Culling tree

CWhereQueryTreeGetArgs(TMacroFuncList &func_list, const string &target)

void x_ProcessFunction(const CTreeNode< CQueryParseNode > &node, const CTreeNode< CQueryParseNode > &parent_node, SMacroFuncWithArgs &func_info)

ETreeTraverseCode operator()(const CTreeNode< CQueryParseNode > &node, int delta)

bool s_RefersToField(const string &fn_name) const

TMacroFuncList * m_Functions

#define LOG_POST(message)

This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...

void Error(CExceptionArgs_Base &args)

#define NCBI_THROW(exception_class, err_code, message)

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

const char * kStrCommFieldValue

const char * kStrCommFieldName

const char * kStrCommDbname

void Reset(void)

Reset reference object.

TObjectType & GetObject(void)

Get object.

const TNode * GetQueryTree() const

const string & GetStrValue() const

@ eIntConst

Integer const.

@ eBoolConst

Boolean (TRUE or FALSE)

@ eString

String ("free text")

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

IO_PREFIX::ostream CNcbiOstream

Portable alias for ostream.

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.

static const string BoolToString(bool value)

Convert bool to string.

static string Join(const TContainer &arr, const CTempString &delim)

Join strings using the specified delimiter.

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.

Fun TreeBreadthFirstTraverse(TTreeNode &tree_node, Fun func)

Breadth-first tree traversal algorithm.

Fun TreeDepthFirstTraverse(TTreeNode &tree_node, Fun func)

Depth-first tree traversal algorithm.

ETreeTraverseCode

Tree traverse code returned by the traverse predicate function.

unsigned int CountNodes(unsigned int depth=1, TCountNodes how=0) const

Count nodes of the tree of which this node is a root.

TNodeList_CI SubNodeBegin(void) const

Return first const iterator on subnode list.

TNodeList_CI SubNodeEnd(void) const

Return last const iterator on subnode list.

const TValue & GetValue(void) const

Return node's value.

const TTreeType * GetParent(void) const

Get node's parent.

@ eTreeTraverseStop

Stop traversal (return form algorithm)

@ eTreeTraverse

Keep traversal.

@ eTreeTraverseStepOver

Do not traverse current node (pick the next one)

CNcbiOstream & operator<<(CNcbiOstream &ostrm, const SMacroFuncWithArgs &f_args)

vector< SMacroFuncWithArgs > TMacroFuncList

const string kPlaceHolderFn

Temporary function name to return the relevant information from the Where clause.

TMacroFuncList GetWhereFunctionsWithArgs(const macro::CMacroRep &macro_rep)

Returns the list of WHERE functions and their arguments as they appear in the macro.

const string kncRNAclassFn

void LookupFncArguments(const macro::CMacroRep &macro_rep, TMacroFuncList &func_list)

Looks up variables names used as function arguments and substitutes their name with their values.

const string kComparisonOp

vector< string > GetDoFunctions(const macro::CMacroRep &macro_rep)

Returns the list of do-functions present in the DO clause of the macro - includes multiples.

TMacroFuncList GetDoFunctionsWithArgs(const macro::CMacroRep &macro_rep, TMacroFuncList &do_constraints)

Returns the list of DO functions and their arguments as they appear in the macro.

const GenericPointer< typename T::ValueType > T2 value

Int4 delta(size_t dimension_, const Int4 *score_)

void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)

Structure to store parsed function name and its arguments - as it appears in the macro It is used whe...

bool operator==(const SMacroFuncWithArgs &) const

CRef< SMacroFuncWithArgs > m_ChildFnc


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