NCBI C++ ToolKit
Classes | Macros | Functions
cleanup_pub.cpp File Reference
#include <ncbi_pch.hpp>
#include <corelib/ncbistd.hpp>
#include <serial/serialbase.hpp>
#include <objects/biblio/Affil.hpp>
#include <objects/biblio/ArticleId.hpp>
#include <objects/biblio/ArticleIdSet.hpp>
#include <objects/biblio/Author.hpp>
#include <objects/biblio/Auth_list.hpp>
#include <objects/biblio/Cit_art.hpp>
#include <objects/biblio/Imprint.hpp>
#include <objects/general/Name_std.hpp>
#include <objects/general/Person_id.hpp>
#include <objects/seq/Pubdesc.hpp>
#include <objects/pub/Pub_equiv.hpp>
#include <objtools/cleanup/cleanup.hpp>
#include <objtools/cleanup/cleanup_pub.hpp>
#include "cleanup_utils.hpp"
#include <objmgr/util/objutil.hpp>
+ Include dependency graph for cleanup_pub.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  SPMIDMatch
 

Macros

#define FIX_IMPRINT_FIELD(x)
 

Functions

static size_t s_PubPriority (CPub::E_Choice val)
 
static bool s_PubWhichCompare (CRef< CPub > pub1, CRef< CPub > pub2)
 
void RemoveDuplicatePubMedArticleIds (CArticleIdSet::Tdata &id_set)
 
CRef< CPubCleanerPubCleanerFactory (CPub &pub)
 

Macro Definition Documentation

◆ FIX_IMPRINT_FIELD

#define FIX_IMPRINT_FIELD (   x)
Value:
if (imprint.IsSet##x()) { \
string& str = imprint.Set##x(); \
const size_t old_len = str.length(); \
Asn2gnbkCompressSpaces(str); \
CleanVisString(str); \
if( old_len != str.length() ) { \
any_change = true; \
} \
if (NStr::IsBlank(str)) { \
imprint.Reset##x(); \
any_change = true; \
} \
}
static const char * str(char *buf, int n)
Definition: stats.c:84
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
Definition: ncbistr.cpp:106

Function Documentation

◆ PubCleanerFactory()

CRef<CPubCleaner> PubCleanerFactory ( CPub pub)

◆ RemoveDuplicatePubMedArticleIds()

void RemoveDuplicatePubMedArticleIds ( CArticleIdSet::Tdata id_set)

Definition at line 161 of file cleanup_pub.cpp.

References remove_if().

Referenced by CPubEquivCleaner::Clean().

◆ s_PubPriority()

static size_t s_PubPriority ( CPub::E_Choice  val)
static

◆ s_PubWhichCompare()

static bool s_PubWhichCompare ( CRef< CPub pub1,
CRef< CPub pub2 
)
inlinestatic

Definition at line 145 of file cleanup_pub.cpp.

References s_PubPriority(), and CPub_Base::Which().

Referenced by CPubEquivCleaner::Clean().

Modified on Wed Apr 17 13:09:11 2024 by modify_doxy.py rev. 669887