NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ITreeMacroFunction Class Reference

Search Toolkit Book for ITreeMacroFunction

Base class for functions which can be called from the WHERE or DO clauses of macros/queries using the CQueryFuncPromote classes (phylogenetic tree, table query) More...

#include <gui/widgets/phylo_tree/phylo_tree_query_macro_fns.hpp>

+ Inheritance diagram for ITreeMacroFunction:
+ Collaboration diagram for ITreeMacroFunction:

Public Member Functions

 ITreeMacroFunction (EScopeEnum func_scope, CPhyloTree *tree)
 Ctor. More...
 

Protected Member Functions

virtual void x_InitCall (CPhyloTreeNode &data)
 Functions make the action and collect statistics. More...
 
virtual void x_SetUserObjects (CQueryParseTree::TNode &qnode)
 
void x_AssignReturnValue (const CObjectInfo &oi, const string &field_name)
 function useful mostly for functions in the WHERE clause More...
 

Static Protected Member Functions

static string JSFilter (const string &str)
 Filter out java/javascript keywords that could possibly be used in xss attacks, particularly event handler names and < and > symbols. More...
 

Protected Attributes

CPhyloTreeNodem_Node
 
CPhyloTreem_Tree
 
vector< CRef< CQueryNodeValue > > m_Args
 
CRef< CQueryNodeValuem_Result
 

Static Protected Attributes

static string s_JSFilterdKeywords []
 
static pair< string, strings_JSSwapKeywords []
 

Detailed Description

Base class for functions which can be called from the WHERE or DO clauses of macros/queries using the CQueryFuncPromote classes (phylogenetic tree, table query)

Definition at line 54 of file phylo_tree_query_macro_fns.hpp.

Constructor & Destructor Documentation

◆ ITreeMacroFunction()

ITreeMacroFunction::ITreeMacroFunction ( EScopeEnum  func_scope,
CPhyloTree tree 
)
inline

Ctor.

Definition at line 59 of file phylo_tree_query_macro_fns.hpp.

Member Function Documentation

◆ JSFilter()

string ITreeMacroFunction::JSFilter ( const string str)
staticprotected

Filter out java/javascript keywords that could possibly be used in xss attacks, particularly event handler names and < and > symbols.

Definition at line 238 of file phylo_tree_query_macro_fns.cpp.

References NStr::eNocase, NStr::Find(), NPOS, NStr::ReplaceInPlace(), result, and str().

Referenced by CMacroFunction_SetProperty::TheFunction().

◆ x_AssignReturnValue()

void ITreeMacroFunction::x_AssignReturnValue ( const CObjectInfo oi,
const string field_name 
)
protected

function useful mostly for functions in the WHERE clause

◆ x_InitCall()

virtual void ITreeMacroFunction::x_InitCall ( CPhyloTreeNode data)
inlineprotectedvirtual

Functions make the action and collect statistics.

Definition at line 68 of file phylo_tree_query_macro_fns.hpp.

References data, and m_Node.

◆ x_SetUserObjects()

virtual void ITreeMacroFunction::x_SetUserObjects ( CQueryParseTree::TNode qnode)
inlineprotectedvirtual

Member Data Documentation

◆ m_Args

vector<CRef<CQueryNodeValue> > ITreeMacroFunction::m_Args
protected

Definition at line 107 of file phylo_tree_query_macro_fns.hpp.

Referenced by x_SetUserObjects().

◆ m_Node

CPhyloTreeNode* ITreeMacroFunction::m_Node
protected

Definition at line 99 of file phylo_tree_query_macro_fns.hpp.

Referenced by x_InitCall().

◆ m_Result

CRef<CQueryNodeValue> ITreeMacroFunction::m_Result
protected

Definition at line 108 of file phylo_tree_query_macro_fns.hpp.

Referenced by x_SetUserObjects().

◆ m_Tree

CPhyloTree* ITreeMacroFunction::m_Tree
protected

Definition at line 100 of file phylo_tree_query_macro_fns.hpp.

◆ s_JSFilterdKeywords

string ITreeMacroFunction::s_JSFilterdKeywords
staticprotected

Definition at line 104 of file phylo_tree_query_macro_fns.hpp.

◆ s_JSSwapKeywords

std::pair< string, string > ITreeMacroFunction::s_JSSwapKeywords
staticprotected
Initial value:
= {
{ "<", " less "},
{ "&lt", " less "},
{ "&LT", " less "},
{ "%3c", " less "},
{ "%3C", " less "},
{ "&#60", " less "},
{ "&#x3c", " less "},
{ "&#x3C", " less "},
{ "&#x003c", " less "},
{ "&#x003C", " less "},
{ "&#x00003c", " less "},
{ "&#x00003C", " less "},
{ ">", " greater " },
{ "&gt", " greater "},
{ "&GT", " greater "},
{ "%3e", " greater "},
{ "%3E", " greater "},
{ "&#62", " greater "},
{ "&#x3e", " greater "},
{ "&#x3E", " greater "},
{ "&#x003e", " greater "},
{ "&#x003E", " greater "},
{ "&#x00003e", " greater "},
{ "&#x00003E", " greater "}
}

Definition at line 105 of file phylo_tree_query_macro_fns.hpp.


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:09 2024 by modify_doxy.py rev. 669887