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

Search Toolkit Book for CConvertFeatureBase

#include <gui/objutils/convert_feat.hpp>

+ Inheritance diagram for CConvertFeatureBase:
+ Collaboration diagram for CConvertFeatureBase:

Public Types

typedef vector< CRef< CConversionOption > > TOptions
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
typedef Uint8 TCount
 Alias for value type of counter. More...

Public Member Functions

 CConvertFeatureBase (objects::CSeqFeatData::ESubtype feat_to=objects::CSeqFeatData::eSubtype_bad, objects::CSeqFeatData::ESubtype feat_from=objects::CSeqFeatData::eSubtype_bad)
 ~CConvertFeatureBase ()
virtual string GetDescription ()
virtual bool CanConvertFrom (objects::CSeqFeatData::ESubtype subtype)
virtual bool CanConvertTo (objects::CSeqFeatData::ESubtype subtype)
virtual CRef< CCmdCompositeConvert (const objects::CSeq_feat &orig, bool keep_orig, objects::CScope &scope)
TOptionsSetOptions ()
const TOptionsGetOptions () const
CRef< CConversionOptionFindRemoveTranscriptId ()
string x_GetCDSProduct (const objects::CSeq_feat &orig, objects::CScope &scope)
void SetCreateGeneralOnly (bool flag)
void SetOffset (int *offset)
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 CObject (const CObject &src)
 Copy constructor. More...
virtual ~CObject (void)
 Destructor. More...
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
void AddReference (void) const
 Add reference to object. More...
void RemoveReference (void) const
 Remove reference to object. More...
void ReleaseReference (void) const
 Remove reference without deleting object. More...
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
void * operator new (size_t size)
 Define new operator for memory allocation. More...
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
void * operator new (size_t size, void *place)
 Define new operator. More...
void operator delete (void *ptr, void *place)
 Define delete operator. More...
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
virtual ~CDebugDumpable (void)
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
void DumpToConsole (void) const

Static Public Attributes

static const string s_RemovemRNA
static const string s_RemoveGene
static const string s_RemoveTranscriptID
static const string s_NcrnaClass
static const string s_SiteType
static const string s_BondType
static const string s_PlaceOnProt
static const string s_IsPseudo
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
static const TCount eCounterStateMask
 Valid object, and object in heap. More...

Protected Member Functions

CRef< CCmdCompositex_SimpleConversion (const objects::CSeq_feat &orig, CRef< objects::CSeq_feat > new_feat, bool keep_orig, objects::CScope &scope)
CRef< CCmdCompositex_ConvertToCDS (const objects::CSeq_feat &orig, CRef< objects::CSeq_feat > new_feat, bool keep_orig, objects::CScope &scope, vector< string > product)
bool x_MoveFeatureToProtein (const objects::CSeq_feat &orig, CRef< objects::CSeq_feat > new_feat, bool keep_orig, objects::CScope &scope)
vector< stringx_ExtractQuals (CRef< objects::CSeq_feat > new_feat, string qual_name)
vector< stringx_ExtractProductQuals (CRef< objects::CSeq_feat > new_feat)
void x_AddToComment (string comment, CRef< objects::CSeq_feat > new_feat, objects::edit::EExistingText existing_text=objects::edit::eExistingText_prefix_semi)
void x_ClearGenericFields (CRef< objects::CSeq_feat > new_feat)
void x_AddCDSSourceConversionOptions ()
void x_AddCDSDestinationConversionOptions ()
void x_AddRnaDestinationConversionOptions ()
void x_AddSiteDestinationConversionOptions ()
void x_AddBondDestinationConversionOptions ()
void x_AddRegionDestionationConversionOptions ()
CRef< CConversionOptionx_FindOption (const string &label)
CRef< CConversionOptionx_FindRemoveGene ()
CRef< CConversionOptionx_FindRemovemRNA ()
CRef< CConversionOptionx_FindNcrnaClass ()
CRef< CConversionOptionx_FindSiteType ()
CRef< CConversionOptionx_FindBondType ()
CRef< CConversionOptionx_FindPlaceOnProt ()
CRef< CConversionOptionx_FindPseudo ()
bool x_IsImportSubtype (objects::CSeqFeatData::ESubtype subtype)
bool x_IsProtSubtype (objects::CSeqFeatData::ESubtype subtype)
bool x_IsRnaSubtype (objects::CSeqFeatData::ESubtype subtype)
string GetSiteName (objects::CSeqFeatData::TSite site_type)
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...

Protected Attributes

objects::CSeqFeatData::ESubtype m_To
objects::CSeqFeatData::ESubtype m_From
TOptions m_Options
objects::CSiteList m_SiteList
objects::CBondList m_BondList
bool m_create_general_only = false
intm_offset = nullptr

Additional Inherited Members

- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
static EAllocFillMode GetAllocFillMode (void)
static void SetAllocFillMode (EAllocFillMode mode)
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)

Detailed Description

Definition at line 121 of file convert_feat.hpp.

Member Typedef Documentation

◆ TOptions

Definition at line 128 of file convert_feat.hpp.

Constructor & Destructor Documentation

◆ CConvertFeatureBase()

CConvertFeatureBase::CConvertFeatureBase ( objects::CSeqFeatData::ESubtype  feat_to = objects::CSeqFeatData::eSubtype_bad,
objects::CSeqFeatData::ESubtype  feat_from = objects::CSeqFeatData::eSubtype_bad 

◆ ~CConvertFeatureBase()

CConvertFeatureBase::~CConvertFeatureBase ( )

Definition at line 126 of file convert_feat.hpp.

Member Function Documentation

◆ CanConvertFrom()

bool CConvertFeatureBase::CanConvertFrom ( objects::CSeqFeatData::ESubtype  subtype)

◆ CanConvertTo()

bool CConvertFeatureBase::CanConvertTo ( objects::CSeqFeatData::ESubtype  subtype)

◆ Convert()

CRef< CCmdComposite > CConvertFeatureBase::Convert ( const objects::CSeq_feat &  orig,
bool  keep_orig,
objects::CScope &  scope 

◆ FindRemoveTranscriptId()

CRef< CConversionOption > CConvertFeatureBase::FindRemoveTranscriptId ( )

◆ GetDescription()

virtual string CConvertFeatureBase::GetDescription ( void  )

◆ GetOptions()

const TOptions& CConvertFeatureBase::GetOptions ( void  ) const

◆ GetSiteName()

string CConvertFeatureBase::GetSiteName ( objects::CSeqFeatData::TSite  site_type)

Definition at line 628 of file convert_feat.cpp.

References m_SiteList.

Referenced by CConvertSiteToImp::Convert().

◆ SetCreateGeneralOnly()

void CConvertFeatureBase::SetCreateGeneralOnly ( bool  flag)

Definition at line 147 of file convert_feat.hpp.

References m_create_general_only.

Referenced by CConvertFeatDlg::GetCommand().

◆ SetOffset()

void CConvertFeatureBase::SetOffset ( int offset)

Definition at line 148 of file convert_feat.hpp.

References m_offset, and offset.

Referenced by CConvertFeatDlg::GetCommand().

◆ SetOptions()

TOptions& CConvertFeatureBase::SetOptions ( void  )

◆ x_AddBondDestinationConversionOptions()

void CConvertFeatureBase::x_AddBondDestinationConversionOptions ( )

Definition at line 516 of file convert_feat.cpp.

References m_BondList, m_Options, s_BondType, and val.

Referenced by CConvertFeatureBase().

◆ x_AddCDSDestinationConversionOptions()

void CConvertFeatureBase::x_AddCDSDestinationConversionOptions ( )

Definition at line 477 of file convert_feat.cpp.

References m_Options, and s_IsPseudo.

Referenced by CConvertFeatureBase().

◆ x_AddCDSSourceConversionOptions()

void CConvertFeatureBase::x_AddCDSSourceConversionOptions ( )

Definition at line 463 of file convert_feat.cpp.

References m_Options, s_RemoveGene, s_RemovemRNA, and s_RemoveTranscriptID.

Referenced by CConvertFeatureBase().

◆ x_AddRegionDestionationConversionOptions()

void CConvertFeatureBase::x_AddRegionDestionationConversionOptions ( )

Definition at line 531 of file convert_feat.cpp.

References m_Options, s_PlaceOnProt, and val.

Referenced by CConvertFeatureBase().

◆ x_AddRnaDestinationConversionOptions()

void CConvertFeatureBase::x_AddRnaDestinationConversionOptions ( )

◆ x_AddSiteDestinationConversionOptions()

void CConvertFeatureBase::x_AddSiteDestinationConversionOptions ( )

Definition at line 501 of file convert_feat.cpp.

References m_Options, m_SiteList, s_SiteType, and val.

Referenced by CConvertFeatureBase().

◆ x_AddToComment()

void CConvertFeatureBase::x_AddToComment ( string  comment,
CRef< objects::CSeq_feat >  new_feat,
objects::edit::EExistingText  existing_text = objects::edit::eExistingText_prefix_semi 

◆ x_ClearGenericFields()

void CConvertFeatureBase::x_ClearGenericFields ( CRef< objects::CSeq_feat >  new_feat)

◆ x_ConvertToCDS()

CRef< CCmdComposite > CConvertFeatureBase::x_ConvertToCDS ( const objects::CSeq_feat &  orig,
CRef< objects::CSeq_feat >  new_feat,
bool  keep_orig,
objects::CScope &  scope,
vector< string product 

◆ x_ExtractProductQuals()

vector< string > CConvertFeatureBase::x_ExtractProductQuals ( CRef< objects::CSeq_feat >  new_feat)

Definition at line 417 of file convert_feat.cpp.

References x_ExtractQuals().

Referenced by CConvertImpToRNA::Convert(), and CConvertImpToCDS::Convert().

◆ x_ExtractQuals()

vector< string > CConvertFeatureBase::x_ExtractQuals ( CRef< objects::CSeq_feat >  new_feat,
string  qual_name 

◆ x_FindBondType()

CRef< CConversionOption > CConvertFeatureBase::x_FindBondType ( )

Definition at line 580 of file convert_feat.cpp.

References s_BondType, and x_FindOption().

Referenced by x_SimpleConversion().

◆ x_FindNcrnaClass()

CRef< CConversionOption > CConvertFeatureBase::x_FindNcrnaClass ( )

Definition at line 568 of file convert_feat.cpp.

References s_NcrnaClass, and x_FindOption().

Referenced by x_SimpleConversion().

◆ x_FindOption()

CRef< CConversionOption > CConvertFeatureBase::x_FindOption ( const string label)

◆ x_FindPlaceOnProt()

CRef< CConversionOption > CConvertFeatureBase::x_FindPlaceOnProt ( )

Definition at line 586 of file convert_feat.cpp.

References s_PlaceOnProt, and x_FindOption().

Referenced by x_SimpleConversion().

◆ x_FindPseudo()

CRef< CConversionOption > CConvertFeatureBase::x_FindPseudo ( )

Definition at line 592 of file convert_feat.cpp.

References s_IsPseudo, and x_FindOption().

Referenced by x_ConvertToCDS().

◆ x_FindRemoveGene()

CRef< CConversionOption > CConvertFeatureBase::x_FindRemoveGene ( )

Definition at line 550 of file convert_feat.cpp.

References s_RemoveGene, and x_FindOption().

Referenced by x_SimpleConversion().

◆ x_FindRemovemRNA()

CRef< CConversionOption > CConvertFeatureBase::x_FindRemovemRNA ( )

Definition at line 556 of file convert_feat.cpp.

References s_RemovemRNA, and x_FindOption().

Referenced by x_SimpleConversion().

◆ x_FindSiteType()

CRef< CConversionOption > CConvertFeatureBase::x_FindSiteType ( )

Definition at line 574 of file convert_feat.cpp.

References s_SiteType, and x_FindOption().

Referenced by x_SimpleConversion().

◆ x_GetCDSProduct()

string CConvertFeatureBase::x_GetCDSProduct ( const objects::CSeq_feat &  orig,
objects::CScope &  scope 

◆ x_IsImportSubtype()

bool CConvertFeatureBase::x_IsImportSubtype ( objects::CSeqFeatData::ESubtype  subtype)

◆ x_IsProtSubtype()

bool CConvertFeatureBase::x_IsProtSubtype ( objects::CSeqFeatData::ESubtype  subtype)

◆ x_IsRnaSubtype()

bool CConvertFeatureBase::x_IsRnaSubtype ( objects::CSeqFeatData::ESubtype  subtype)

◆ x_MoveFeatureToProtein()

bool CConvertFeatureBase::x_MoveFeatureToProtein ( const objects::CSeq_feat &  orig,
CRef< objects::CSeq_feat >  new_feat,
bool  keep_orig,
objects::CScope &  scope 

◆ x_SimpleConversion()

CRef< CCmdComposite > CConvertFeatureBase::x_SimpleConversion ( const objects::CSeq_feat &  orig,
CRef< objects::CSeq_feat >  new_feat,
bool  keep_orig,
objects::CScope &  scope 

Definition at line 193 of file convert_feat.cpp.

References cmd, CSeqFeatData::eSubtype_bond, CSeqFeatData::eSubtype_mRNA, CSeqFeatData::eSubtype_ncRNA, CSeqFeatData::eSubtype_region, CSeqFeatData::eSubtype_site, FindRemoveTranscriptId(), CScope::GetBioseqHandle(), GetDeleteFeatureCommand(), CSeq_feat_Base::GetLocation(), GetOverlappingGene(), GetOverlappingmRNA(), GetProtProcessedFromFeatureSubtype(), GetRnaTypeFromFeatureSubtype(), CBioseq_Handle::GetSeq_entry_Handle(), CScope::GetSeq_featHandle(), NStr::IsBlank(), CSeq_feat_Base::IsSetProduct(), m_BondList, m_SiteList, m_To, NULL, orig, CSeq_feat_Base::ResetProduct(), CSeq_feat_Base::SetData(), CSeqFeatData::SubtypeValueToName(), x_FindBondType(), x_FindNcrnaClass(), x_FindPlaceOnProt(), x_FindRemoveGene(), x_FindRemovemRNA(), x_FindSiteType(), x_IsImportSubtype(), x_IsProtSubtype(), x_IsRnaSubtype(), and x_MoveFeatureToProtein().

Referenced by Convert(), CConvertMiscFeatToGene::Convert(), CConvertImpToImp::Convert(), CConvertCDSToRNA::Convert(), CConvertGeneToRNA::Convert(), CConvertBioSrcToRptRegion::Convert(), CConvertCDSToMiscFeat::Convert(), CConvertImpToProt::Convert(), CConvertImpToRNA::Convert(), CConvertImpToGene::Convert(), CConvertRegionToImp::Convert(), CConvertRegionToRna::Convert(), CConvertCommentToImp::Convert(), CConvertGeneToImp::Convert(), CConvertRnaToImp::Convert(), CConverttRNAToGene::Convert(), CConvertSiteToImp::Convert(), CConvertRegionToProt::Convert(), CConvertRNAToRNA::Convert(), CConvertToBond::Convert(), CConvertToSite::Convert(), CConvertToRegion::Convert(), CConvertCDSToProt::Convert(), CConvertCDSToGene::Convert(), and x_ConvertToCDS().

Member Data Documentation

◆ m_BondList

objects::CBondList CConvertFeatureBase::m_BondList

Definition at line 182 of file convert_feat.hpp.

Referenced by x_AddBondDestinationConversionOptions(), and x_SimpleConversion().

◆ m_create_general_only

bool CConvertFeatureBase::m_create_general_only = false

Definition at line 183 of file convert_feat.hpp.

Referenced by SetCreateGeneralOnly(), and x_ConvertToCDS().

◆ m_From

objects::CSeqFeatData::ESubtype CConvertFeatureBase::m_From

◆ m_offset

int* CConvertFeatureBase::m_offset = nullptr

Definition at line 184 of file convert_feat.hpp.

Referenced by SetOffset(), and x_ConvertToCDS().

◆ m_Options

TOptions CConvertFeatureBase::m_Options

◆ m_SiteList

objects::CSiteList CConvertFeatureBase::m_SiteList

◆ m_To

objects::CSeqFeatData::ESubtype CConvertFeatureBase::m_To

◆ s_BondType

const string CConvertFeatureBase::s_BondType

◆ s_IsPseudo

const string CConvertFeatureBase::s_IsPseudo

Definition at line 145 of file convert_feat.hpp.

Referenced by x_AddCDSDestinationConversionOptions(), and x_FindPseudo().

◆ s_NcrnaClass

const string CConvertFeatureBase::s_NcrnaClass

◆ s_PlaceOnProt

const string CConvertFeatureBase::s_PlaceOnProt

◆ s_RemoveGene

const string CConvertFeatureBase::s_RemoveGene

◆ s_RemovemRNA

const string CConvertFeatureBase::s_RemovemRNA

◆ s_RemoveTranscriptID

const string CConvertFeatureBase::s_RemoveTranscriptID

◆ s_SiteType

const string CConvertFeatureBase::s_SiteType

The documentation for this class was generated from the following files:
Modified on Sun Apr 21 03:41:23 2024 by rev. 669887