NCBI C++ ToolKit
Classes | Macros | Functions | Variables
Pub.cpp File Reference
#include <ncbi_pch.hpp>
#include <objects/pub/Pub.hpp>
#include <objects/pub/Pub_equiv.hpp>
#include <objects/biblio/Author.hpp>
#include <objects/biblio/Auth_list.hpp>
#include <objects/biblio/PubMedId.hpp>
#include <objects/biblio/Cit_art.hpp>
#include <objects/biblio/Cit_jour.hpp>
#include <objects/biblio/Cit_book.hpp>
#include <objects/biblio/Cit_proc.hpp>
#include <objects/biblio/Cit_let.hpp>
#include <objects/biblio/Cit_sub.hpp>
#include <objects/biblio/Cit_pat.hpp>
#include <objects/biblio/Id_pat.hpp>
#include <objects/biblio/Cit_gen.hpp>
#include <objects/biblio/Imprint.hpp>
#include <objects/general/Date_std.hpp>
#include <objects/general/Name_std.hpp>
#include <objects/general/Person_id.hpp>
#include <objects/medline/Medline_entry.hpp>
#include <objects/pub/pub_macros.hpp>
+ Include dependency graph for Pub.cpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  SPubMatchInfo
 

Macros

#define FIELD(Obj, Field)   (Obj.IsSet##Field() ? Obj.Get##Field() : "")
 
#define FIELD_MATCH(Obj1, Obj2, Field)   (NStr::EqualNocase(FIELD(Obj1,Field), FIELD(Obj2,Field)))
 
#define INT_FIELD_MATCH(Obj1, Obj2, Field)   ((Obj1.IsSet##Field() && Obj2.IsSet##Field() && Obj1.Get##Field() == Obj2.Get##Field()) || (!Obj1.IsSet##Field() && !Obj2.IsSet##Field()))
 
#define S_MATCH(Obj1, Obj2, Field)   ((!Obj1.IsSet##Field() && !Obj2.IsSet##Field()) || (Obj1.IsSet##Field() && Obj2.IsSet##Field() && s_Match##Field(Obj1.Get##Field(),Obj2.Get##Field())))
 
#define S_MATCH_A(Obj1, Obj2, Field)   ((!Obj1.IsSet##Field() && !Obj2.IsSet##Field()) || (Obj1.IsSet##Field() && Obj2.IsSet##Field() && Obj1.Get##Field().SameCitation(Obj2.Get##Field())))
 

Functions

string s_GetTitleString (const CTitle::C_E &title)
 
bool s_TitleMatch (const CTitle &title1, const CTitle &title2, CTitle::C_E::E_Choice title_type)
 
bool s_MatchDate (const CDate &date1, const CDate &date2)
 
bool s_MatchImp (const CImprint &imp1, const CImprint &imp2)
 
bool s_MatchTitle (const CTitle &title1, const CTitle &title2)
 
bool s_JournalMatch (const CCit_jour &jour1, const CCit_jour &jour2)
 
bool s_MatchBook (const CCit_book &book1, const CCit_book &book2)
 
bool s_ProcMatch (const CCit_proc &book1, const CCit_proc &book2)
 
bool s_ManMatch (const CCit_let &book1, const CCit_let &book2)
 
bool s_CitArtMatch (const CCit_art &art1, const CCit_art &art2)
 
bool s_CitGenMatch (const CCit_gen &gen1, const CCit_gen &gen2)
 
bool s_CitSubMatch (const CCit_sub &sub1, const CCit_sub &sub2)
 
bool s_MatchInfoMatches (const SPubMatchInfo &match1, const SPubMatchInfo &match2)
 
void s_GetPubMatchInfo (const CCit_pat &patent, SPubMatchInfo &match)
 
void s_GetPubMatchInfo (const CId_pat &patent, SPubMatchInfo &match)
 
void s_GetPubMatchInfo (const CPub &pub, SPubMatchInfo &match)
 

Variables

static const CTitle::C_E::E_Choice s_MatchJournalTypes []
 

Macro Definition Documentation

◆ FIELD

#define FIELD (   Obj,
  Field 
)    (Obj.IsSet##Field() ? Obj.Get##Field() : "")

Definition at line 431 of file Pub.cpp.

◆ FIELD_MATCH

#define FIELD_MATCH (   Obj1,
  Obj2,
  Field 
)    (NStr::EqualNocase(FIELD(Obj1,Field), FIELD(Obj2,Field)))

Definition at line 432 of file Pub.cpp.

◆ INT_FIELD_MATCH

#define INT_FIELD_MATCH (   Obj1,
  Obj2,
  Field 
)    ((Obj1.IsSet##Field() && Obj2.IsSet##Field() && Obj1.Get##Field() == Obj2.Get##Field()) || (!Obj1.IsSet##Field() && !Obj2.IsSet##Field()))

Definition at line 433 of file Pub.cpp.

◆ S_MATCH

#define S_MATCH (   Obj1,
  Obj2,
  Field 
)    ((!Obj1.IsSet##Field() && !Obj2.IsSet##Field()) || (Obj1.IsSet##Field() && Obj2.IsSet##Field() && s_Match##Field(Obj1.Get##Field(),Obj2.Get##Field())))

Definition at line 435 of file Pub.cpp.

◆ S_MATCH_A

#define S_MATCH_A (   Obj1,
  Obj2,
  Field 
)    ((!Obj1.IsSet##Field() && !Obj2.IsSet##Field()) || (Obj1.IsSet##Field() && Obj2.IsSet##Field() && Obj1.Get##Field().SameCitation(Obj2.Get##Field())))

Definition at line 436 of file Pub.cpp.

Function Documentation

◆ s_CitArtMatch()

bool s_CitArtMatch ( const CCit_art art1,
const CCit_art art2 
)

◆ s_CitGenMatch()

bool s_CitGenMatch ( const CCit_gen gen1,
const CCit_gen gen2 
)

◆ s_CitSubMatch()

bool s_CitSubMatch ( const CCit_sub sub1,
const CCit_sub sub2 
)

◆ s_GetPubMatchInfo() [1/3]

void s_GetPubMatchInfo ( const CCit_pat patent,
SPubMatchInfo match 
)

◆ s_GetPubMatchInfo() [2/3]

void s_GetPubMatchInfo ( const CId_pat patent,
SPubMatchInfo match 
)

◆ s_GetPubMatchInfo() [3/3]

void s_GetPubMatchInfo ( const CPub pub,
SPubMatchInfo match 
)

◆ s_GetTitleString()

string s_GetTitleString ( const CTitle::C_E title)

◆ s_JournalMatch()

bool s_JournalMatch ( const CCit_jour jour1,
const CCit_jour jour2 
)

Definition at line 490 of file Pub.cpp.

References S_MATCH.

Referenced by s_CitArtMatch(), and CPub::SameCitation().

◆ s_ManMatch()

bool s_ManMatch ( const CCit_let book1,
const CCit_let book2 
)

Definition at line 527 of file Pub.cpp.

References CCit_let_Base::GetCit(), CCit_let_Base::IsSetCit(), and s_MatchBook().

Referenced by CPub::SameCitation().

◆ s_MatchBook()

bool s_MatchBook ( const CCit_book book1,
const CCit_book book2 
)

◆ s_MatchDate()

bool s_MatchDate ( const CDate date1,
const CDate date2 
)

Definition at line 438 of file Pub.cpp.

References CSerialObject::Equals().

◆ s_MatchImp()

bool s_MatchImp ( const CImprint imp1,
const CImprint imp2 
)

◆ s_MatchInfoMatches()

bool s_MatchInfoMatches ( const SPubMatchInfo match1,
const SPubMatchInfo match2 
)

◆ s_MatchTitle()

bool s_MatchTitle ( const CTitle title1,
const CTitle title2 
)

Definition at line 478 of file Pub.cpp.

References CTitle_Base::C_E::e_not_set, i, s_MatchJournalTypes, and s_TitleMatch().

Referenced by s_CitGenMatch().

◆ s_ProcMatch()

bool s_ProcMatch ( const CCit_proc book1,
const CCit_proc book2 
)

Definition at line 521 of file Pub.cpp.

References S_MATCH.

Referenced by s_CitArtMatch(), and CPub::SameCitation().

◆ s_TitleMatch()

bool s_TitleMatch ( const CTitle title1,
const CTitle title2,
CTitle::C_E::E_Choice  title_type 
)

Variable Documentation

◆ s_MatchJournalTypes

const CTitle::C_E::E_Choice s_MatchJournalTypes[]
static
Initial value:
= {
}
@ e_Ml_jta
specifically MEDLINE jta J
Definition: Title_.hpp:116
@ e_Issn
ISSN J.
Definition: Title_.hpp:118
@ e_Jta
Title, Abbreviated J.
Definition: Title_.hpp:114
@ e_not_set
No variant selected.
Definition: Title_.hpp:110
@ e_Coden
a coden J
Definition: Title_.hpp:117
@ e_Iso_jta
specifically ISO jta J
Definition: Title_.hpp:115
@ e_Name
Title, Anal,Coll,Mono AJB.
Definition: Title_.hpp:111

Definition at line 467 of file Pub.cpp.

Referenced by s_MatchTitle().

Modified on Sat Apr 20 12:20:57 2024 by modify_doxy.py rev. 669887