72 if (
id.IsSetChain_id() ) {
73 return id.GetChain_id();
75 if (
id.IsSetChain() ) {
76 return string(1,
char(
id.GetChain()));
104 }
else if ( chain ==
'\0' ) {
107 return s <<
GetMol().
Get() <<
'|' << chain;
131 string chain(1, chainChar);
145 string chainUpperDoubled = chain + chain;
168 if (chain_id.
empty() && chainIdentifier.length() == 1 ) {
173 if (chainIdentifier.empty() || chain_id.
empty()) {
176 else if (chain_id.
length() == 1) {
177 SetChain(
static_cast<unsigned char>(chain_id[0]) );
188 string s(1, (
char) chain);
User-defined methods of the data storage class.
static string s_GetEffectiveChain_id(const CPDB_seq_id &id)
bool IsChainConflict(EConflictMode encodingMode=eConflictMode_default) const
int Compare(const CPDB_seq_id &psip2) const
void SetChainIdentifiers(TChain chainIdentifier)
void ResetChainIdentifiers(void)
bool Match(const CPDB_seq_id &psip2) const
ostream & AsFastaString(ostream &s) const
string GetEffectiveChain_id(EBothUnsetPriority bothUnsetPriority=eBothUnset_ChainId) const
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
const TPrim & Get(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
PCase_Generic< string > PCase
static CTempString TruncateSpaces_Unsafe(const CTempString str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string.
PNocase_Generic< string > PNocase
bool empty(void) const
Return true if the represented string is empty (i.e., the length is zero)
size_type length(void) const
Return the length of the represented array.
static string & ToUpper(string &str)
Convert string to upper case – string& version.
@ eTrunc_Both
Truncate whitespace at both begin and end of string.
TChain GetChain(void) const
Get the Chain member data.
bool IsSetChain_id(void) const
chain identifier; length-independent generalization of 'chain' Check if a value has been assigned to ...
bool IsSetChain(void) const
Deprecated: 'chain' can't support multiple character PDB chain identifiers (introduced in 2015).
TChain_id & SetChain_id(void)
Assign a value to Chain_id data member.
TChain & SetChain(void)
Assign a value to Chain data member.
void ResetChain_id(void)
Reset Chain_id data member.
const TMol & GetMol(void) const
Get the Mol member data.
const TChain_id & GetChain_id(void) const
Get the Chain_id member data.
void ResetChain(void)
Reset Chain data member.