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

Search Toolkit Book for CMacroFunction_PubFields

#include <gui/objutils/macro_fn_pubfields.hpp>

+ Inheritance diagram for CMacroFunction_PubFields:
+ Collaboration diagram for CMacroFunction_PubFields:

Public Member Functions

 CMacroFunction_PubFields (EScopeEnum func_scope, objects::EPublication_field field)
 
virtual ~CMacroFunction_PubFields ()
 
virtual void TheFunction ()
 Function implementation. More...
 
- Public Member Functions inherited from IEditMacroFunction
virtual ~IEditMacroFunction ()
 Virtual destructor. More...
 
virtual void operator() (CMacroCmdComposite &cmd_composite, CIRef< IMacroBioDataIter > &data, CQueryParseTree::TNode &qnode) override
 Function operator. More...
 
bool SetQualStringValue (CObjectInfo &oi, const string &value)
 Functions make the action and collect statistics. More...
 
bool HasDataChanged () const
 
const CRef< IFunctionLog > & GetFunctionLog () const
 
- Public Member Functions inherited from IMacroFunction< CIRef< IMacroBioDataIter > >
 IMacroFunction (EScopeEnum func_scope)
 Constructor. More...
 
virtual ~IMacroFunction ()
 Virtual destructor. More...
 
EScopeEnum GetFuncScope ()
 
ENestedFunc GetNestedState ()
 
const stringGetFuncReport () const
 Function extracts statistic from the object. More...
 
const stringGetErrorReport () const
 
void SetNestedState (ENestedFunc type)
 

Static Public Member Functions

static void s_GetObjectsFromTitle (const CObjectInfo &title, CMQueryNodeValue::TObs &objs)
 
static void s_GetObjectsFromImprint (const CObjectInfo &imp, const string &field_name, CMQueryNodeValue::TObs &objs)
 
static void s_GetObjectsFromDate (const CObjectInfo &date, const string &field_name, CMQueryNodeValue::TObs &objs)
 
static void s_GetObjectsFromAffil (const CObjectInfo &affil, const string &field_name, CMQueryNodeValue::TObs &objs)
 
static void s_GetObjectsFromAuthListNames (const CObjectInfo &names, const string &field_name, CMQueryNodeValue::TObs &objs)
 
static void s_GetObjectsFromPersonID (const CObjectInfo &names, const string &field_name, CMQueryNodeValue::TObs &objs)
 
static void s_CopyResolvedObjs (const CMQueryNodeValue::TObs &objs_from, CMQueryNodeValue::TObs &objs_to)
 
static string s_GetStatus (const objects::CPubdesc &pubdesc)
 
static bool s_IsUnpublished (const string &citation)
 
static CPubFieldType::EPubFieldStatus s_GetStatusEnum (const objects::CPub &pub)
 
static bool s_IsPubFieldFnc (const string &fn_name)
 

Static Public Attributes

static const char * sm_PubTitle = "PUB_TITLE"
 class CMacroFunction_PubFields PUB_TITLE(), PUB_ISSUE(), PUB_AFFIL(subfield) - returns a list of CObjectInfo (or string) that contain publication title subfield is optional, used for affiliation, author or date More...
 
static const char * sm_PubAffil = "PUB_AFFIL"
 
static const char * sm_PubAuthors = "PUB_AUTHORS"
 
static const char * sm_PubCit = "PUB_CIT"
 
static const char * sm_PubDate = "PUB_DATE"
 
static const char * sm_PubIssue = "PUB_ISSUE"
 
static const char * sm_PubJournal = "PUB_JOURNAL"
 
static const char * sm_PubPages = "PUB_PAGES"
 
static const char * sm_PubPMID = "PUB_PMID"
 
static const char * sm_PubClass = "PUB_CLASS"
 
static const char * sm_PubStatus = "PUB_STATUS"
 
static const char * sm_PubSerialNumber = "PUB_SERIAL_NUMBER"
 
static const char * sm_PubVolume = "PUB_VOLUME"
 

Protected Member Functions

virtual bool x_ValidArguments () const
 Tests the number and the type of function arguments. More...
 
virtual void x_ResetState ()
 Reset the state of member variables that are set directly/indirectly from function arguments. More...
 
- Protected Member Functions inherited from IEditMacroFunction
 IEditMacroFunction (EScopeEnum func_scope)
 
virtual void x_InitCall (CIRef< IMacroBioDataIter > &data) override
 
virtual void x_SetUserObjects (CQueryParseTree::TNode &qnode) override
 Extracts the function arguments and initializes m_Result member. More...
 
virtual bool x_IsNestedFunctionReturnValid () const
 
void x_AssignReturnValue (const CObjectInfo &oi, const string &field_name)
 Assigns value to m_Result. It is mostly useful for functions used in the WHERE clause. More...
 
void x_AssignReturnValueFromContainer (const CObjectInfo &oi, const string &container, const string &field_name)
 
void x_GetObjectsFromRef (CMQueryNodeValue::TObs &objects, const size_t &index)
 
void x_GetOptionalArgs (string &delimiter, bool &remove_field, size_t &index)
 
void x_LogChangedQuals (const CRef< IFunctionLog > &log)
 
- Protected Member Functions inherited from IMacroFunction< CIRef< IMacroBioDataIter > >
void x_LogFunction (CNcbiOstrstream &logstr)
 
void x_LogError (CNcbiOstrstream &logstr)
 

Private Member Functions

void x_GetPubFieldObjectFromPub (const CObjectInfo &pub_oi, CMQueryNodeValue::TObs &objs)
 
void x_GetObjectsForPubField_Cit (const objects::CPub &pub, const CObjectInfo &pub_var, CMQueryNodeValue::TObs &objs)
 
void x_GetObjectsForPubField_Title (const objects::CPub &pub, const CObjectInfo &pub_var, CMQueryNodeValue::TObs &objs)
 
void x_GetObjectsForPubField_SerialNumber (const objects::CPub &pub, const CObjectInfo &pub_var, CMQueryNodeValue::TObs &objs)
 
void x_GetObjectsForPubField_Journal (const objects::CPub &pub, const CObjectInfo &pub_var, CMQueryNodeValue::TObs &objs)
 
void x_GetObjectsForPubField_VolIssuePage (const objects::CPub &pub, const CObjectInfo &pub_var, CMQueryNodeValue::TObs &objs)
 
void x_GetObjectsForPubField_Date (const objects::CPub &pub, const CObjectInfo &pub_var, CMQueryNodeValue::TObs &objs)
 
void x_GetObjectsForPubField_AffilField (const objects::CPub &pub, const CObjectInfo &pub_var, CMQueryNodeValue::TObs &objs)
 
void x_GetObjectsForPubField_PMID (objects::CPub &pub, const CObjectInfo &pub_var, CMQueryNodeValue::TObs &objs)
 
void x_GetObjectsForPubField_Authors (const objects::CPub &pub, const CObjectInfo &pub_var, CMQueryNodeValue::TObs &objs)
 
void x_GetPubFieldObjectFromSubmitBlock (const CObjectInfo &block_oi, CMQueryNodeValue::TObs &objs)
 
string x_GetPubStatus (const CObjectInfo &pubdesc_oi)
 

Static Private Member Functions

static string x_GetStatus (const objects::CPub &pub)
 

Private Attributes

objects::EPublication_field m_FieldType
 
string m_ResField
 used for resolving fields for authors, date, affiliation More...
 

Additional Inherited Members

- Public Types inherited from IEditMacroFunction
using TParent = IMacroFunction< CIRef< IMacroBioDataIter > >
 
using TNodeValuesVec = vector< CRef< CMQueryNodeValue > >
 
- Public Types inherited from IMacroFunction< CIRef< IMacroBioDataIter > >
enum  EScopeEnum
 
enum  ENestedFunc
 
- Protected Attributes inherited from IEditMacroFunction
CIRef< IMacroBioDataIterm_DataIter
 
TNodeValuesVec m_Args
 
CRef< CMQueryNodeValuem_Result
 
Int4 m_QualsChangedCount
 Number of changed qualifiers during the function call. More...
 
string m_FuncName
 Name of the function as it's been used in the script. More...
 
CRef< IFunctionLogm_FuncLog
 
- Protected Attributes inherited from IMacroFunction< CIRef< IMacroBioDataIter > >
CRef< CMacroCmdCompositem_CmdComposite
 
string m_Report
 function activity report More...
 
string m_Error
 error report More...
 
ENestedFunc m_Nested
 flag indicating whether the function is nested within another function More...
 

Detailed Description

Definition at line 76 of file macro_fn_pubfields.hpp.


The documentation for this class was generated from the following files:
Modified on Fri Mar 01 10:07:13 2024 by modify_doxy.py rev. 669887