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

Search Toolkit Book for CTableImportColumn

CTableImportColumn -. More...

#include <gui/widgets/loaders/table_import_column.hpp>

+ Collaboration diagram for CTableImportColumn:

Public Types

enum  eColumnType {
  eSeqIdColumn =0 , eNumberColumn , eRealNumberColumn , eTextColumn ,
  eSkippedColumn , eTypeUndefined
}
 
enum  eDataType {
  eLocationID = 0 , eLocationGI , eLocalID , eChromosome ,
  eRsid , eUnspecifiedID , eGeneName , eGenotype ,
  eStrand , eVariationName , eSnpName , eChromosomeNumber ,
  eDataRegion , eUnspecifiedText , eUnspecifiedReal , eStartPosition ,
  eStopPosition , eLength , eUnspecifiedInt , eUndefined ,
  eLastType
}
 

Public Member Functions

 CTableImportColumn ()
 
void SetWidth (int w)
 
int GetWidth () const
 
void SetType (eColumnType t)
 
eColumnType GetType () const
 
void SetOneBased (bool b)
 
bool GetOneBased () const
 
void SetMatchColumn (bool b)
 For attribute table import we need to specify a column as the column to use in matching the table against to entry. More...
 
bool GetMatchColumn () const
 
void SetDataType (eDataType t)
 Get set bio-type info for the column. More...
 
eDataType GetDataType () const
 
string GetDataTypeString () const
 
string GetShortDataTypeString () const
 
void SetName (const string &n)
 
string GetName () const
 
string GetNameEx () const
 
void SetAssembly (const CMapAssemblyParams &a)
 
CMapAssemblyParams GetAssembly () const
 
bool GetSkipped () const
 
void SetIsCurrent (bool b)
 
bool GetIsCurrent () const
 
void SetQualifier (const string &q)
 
string GetQualifier () const
 
void SetQualifierType (const string &q)
 
string GetQualifierType () const
 
void LogColumnInfo () const
 Log column parameters. More...
 
void SaveAsn (CUser_field &user_field) const
 Export column info in ASN user-object format. More...
 
void LoadAsn (CUser_field &user_field)
 Import column info from ASN user-object format. More...
 
void SetProperty (const string &prop_name, const string &prop_value)
 Add/update a column property. More...
 
bool HasProperty (const string &prop_name)
 
string GetProperty (const string &prop_name)
 
map< string, string > & GetPropertyValues ()
 

Static Public Member Functions

static string GetStringFromDataType (eDataType t)
 Return a string version of a data-type (e.g. "Length" for eLength) More...
 
static string GetShortStringFromDataType (eDataType t)
 Return a short string of a data-type, and blank for 'undefined' types. More...
 
static eDataType GetDataTypeFromString (const string &s)
 Return enum data-type from string. More...
 
static vector< eDataTypeGetMatchingDataTypes (eColumnType c)
 

Static Public Attributes

static const char * m_TypeNameList []
 
static const char * m_ShortTypeNameList []
 

Protected Attributes

int m_ColumnWidth
 width in chracters More...
 
string m_ColumnName
 Column name. More...
 
CMapAssemblyParams m_Assembly
 Matching Assembly for column identifier. More...
 
eColumnType m_ColumnType
 column type More...
 
bool m_OneBased
 If integer, is it one based or 0 based? More...
 
bool m_Match
 (For attribute table loading) Is this the match column More...
 
eDataType m_DataType
 The semantic meaning of the column, e.g. id, start pos, stop pos, strand. More...
 
bool m_IsCurrent
 If true, this is the current column for editing purposes (for views that allow you to edit column type info) More...
 
string m_Qualifier
 For table import in sequence editor - the qualifier field name. More...
 
string m_QualifierType
 Also for sequence editor import - text version of CFieldNamePanel::EFieldType. More...
 
map< string, stringm_Properties
 Any properties (text only) user wants to set for the column. More...
 

Detailed Description

CTableImportColumn -.

This class holds meta-data for the columns in the tabular data. The size and number of columns is automatically updated when the delimiter info is changed.

Definition at line 56 of file table_import_column.hpp.

Member Enumeration Documentation

◆ eColumnType

Enumerator
eSeqIdColumn 
eNumberColumn 
eRealNumberColumn 
eTextColumn 
eSkippedColumn 
eTypeUndefined 

Definition at line 58 of file table_import_column.hpp.

◆ eDataType

Enumerator
eLocationID 
eLocationGI 
eLocalID 
eChromosome 
eRsid 
eUnspecifiedID 
eGeneName 
eGenotype 
eStrand 
eVariationName 
eSnpName 
eChromosomeNumber 
eDataRegion 
eUnspecifiedText 
eUnspecifiedReal 
eStartPosition 
eStopPosition 
eLength 
eUnspecifiedInt 
eUndefined 
eLastType 

Definition at line 61 of file table_import_column.hpp.

Constructor & Destructor Documentation

◆ CTableImportColumn()

CTableImportColumn::CTableImportColumn ( )
inline

Definition at line 89 of file table_import_column.hpp.

Member Function Documentation

◆ GetAssembly()

CMapAssemblyParams CTableImportColumn::GetAssembly ( ) const
inline

Definition at line 131 of file table_import_column.hpp.

References m_Assembly.

◆ GetDataType()

eDataType CTableImportColumn::GetDataType ( ) const
inline

Definition at line 113 of file table_import_column.hpp.

References m_DataType.

◆ GetDataTypeFromString()

CTableImportColumn::eDataType CTableImportColumn::GetDataTypeFromString ( const string s)
static

◆ GetDataTypeString()

string CTableImportColumn::GetDataTypeString ( ) const
inline

Definition at line 114 of file table_import_column.hpp.

References GetStringFromDataType(), and m_DataType.

◆ GetIsCurrent()

bool CTableImportColumn::GetIsCurrent ( ) const
inline

Definition at line 136 of file table_import_column.hpp.

References m_IsCurrent.

◆ GetMatchColumn()

bool CTableImportColumn::GetMatchColumn ( ) const
inline

◆ GetMatchingDataTypes()

vector< CTableImportColumn::eDataType > CTableImportColumn::GetMatchingDataTypes ( eColumnType  c)
static

◆ GetName()

string CTableImportColumn::GetName ( void  ) const
inline

◆ GetNameEx()

string CTableImportColumn::GetNameEx ( ) const
inline

Definition at line 128 of file table_import_column.hpp.

References GetSkipped(), and m_ColumnName.

◆ GetOneBased()

bool CTableImportColumn::GetOneBased ( ) const
inline

Definition at line 104 of file table_import_column.hpp.

References m_OneBased.

◆ GetProperty()

string CTableImportColumn::GetProperty ( const string prop_name)
inline

◆ GetPropertyValues()

map<string,string>& CTableImportColumn::GetPropertyValues ( )
inline

Definition at line 156 of file table_import_column.hpp.

References m_Properties.

◆ GetQualifier()

string CTableImportColumn::GetQualifier ( ) const
inline

◆ GetQualifierType()

string CTableImportColumn::GetQualifierType ( ) const
inline

◆ GetShortDataTypeString()

string CTableImportColumn::GetShortDataTypeString ( ) const
inline

Definition at line 115 of file table_import_column.hpp.

References GetShortStringFromDataType(), and m_DataType.

◆ GetShortStringFromDataType()

string CTableImportColumn::GetShortStringFromDataType ( eDataType  t)
static

Return a short string of a data-type, and blank for 'undefined' types.

Definition at line 97 of file table_import_column.cpp.

References int, m_ShortTypeNameList, and t.

Referenced by GetShortDataTypeString().

◆ GetSkipped()

bool CTableImportColumn::GetSkipped ( ) const
inline

Definition at line 133 of file table_import_column.hpp.

References eSkippedColumn, and m_ColumnType.

Referenced by GetNameEx(), and CAttribTableColumnIdPanel::IsInputValid().

◆ GetStringFromDataType()

string CTableImportColumn::GetStringFromDataType ( eDataType  t)
static

◆ GetType()

eColumnType CTableImportColumn::GetType ( void  ) const
inline

◆ GetWidth()

int CTableImportColumn::GetWidth ( void  ) const
inline

Definition at line 98 of file table_import_column.hpp.

References m_ColumnWidth.

◆ HasProperty()

bool CTableImportColumn::HasProperty ( const string prop_name)
inline

◆ LoadAsn()

void CTableImportColumn::LoadAsn ( CUser_field user_field)

◆ LogColumnInfo()

void CTableImportColumn::LogColumnInfo ( ) const

◆ SaveAsn()

void CTableImportColumn::SaveAsn ( CUser_field user_field) const

◆ SetAssembly()

void CTableImportColumn::SetAssembly ( const CMapAssemblyParams a)
inline

Definition at line 130 of file table_import_column.hpp.

References a, and m_Assembly.

◆ SetDataType()

void CTableImportColumn::SetDataType ( eDataType  t)
inline

Get set bio-type info for the column.

Definition at line 112 of file table_import_column.hpp.

References m_DataType, and t.

◆ SetIsCurrent()

void CTableImportColumn::SetIsCurrent ( bool  b)
inline

◆ SetMatchColumn()

void CTableImportColumn::SetMatchColumn ( bool  b)
inline

For attribute table import we need to specify a column as the column to use in matching the table against to entry.

Definition at line 108 of file table_import_column.hpp.

References b, and m_Match.

Referenced by CAttribTableColumnIdPanel::OnMatchColumnClick(), CAttribTableColumnIdPanel::OnMergeIDColsClick(), and CAttribTableColumnIdPanel::OnSplitFirstColClick().

◆ SetName()

void CTableImportColumn::SetName ( const string n)

◆ SetOneBased()

void CTableImportColumn::SetOneBased ( bool  b)
inline

Definition at line 103 of file table_import_column.hpp.

References b, and m_OneBased.

◆ SetProperty()

void CTableImportColumn::SetProperty ( const string prop_name,
const string prop_value 
)
inline

◆ SetQualifier()

void CTableImportColumn::SetQualifier ( const string q)
inline

Definition at line 138 of file table_import_column.hpp.

References m_Qualifier.

Referenced by CAttribTableColumnIdPanel::OnSplitFirstColClick().

◆ SetQualifierType()

void CTableImportColumn::SetQualifierType ( const string q)
inline

Definition at line 141 of file table_import_column.hpp.

References m_QualifierType.

Referenced by CAttribTableColumnIdPanel::OnSplitFirstColClick().

◆ SetType()

void CTableImportColumn::SetType ( eColumnType  t)
inline

◆ SetWidth()

void CTableImportColumn::SetWidth ( int  w)
inline

Member Data Documentation

◆ m_Assembly

CMapAssemblyParams CTableImportColumn::m_Assembly
protected

Matching Assembly for column identifier.

Definition at line 166 of file table_import_column.hpp.

Referenced by GetAssembly(), LoadAsn(), LogColumnInfo(), SaveAsn(), and SetAssembly().

◆ m_ColumnName

string CTableImportColumn::m_ColumnName
protected

Column name.

Definition at line 163 of file table_import_column.hpp.

Referenced by GetName(), GetNameEx(), LoadAsn(), LogColumnInfo(), SaveAsn(), and SetName().

◆ m_ColumnType

eColumnType CTableImportColumn::m_ColumnType
protected

column type

Definition at line 169 of file table_import_column.hpp.

Referenced by GetSkipped(), GetType(), LoadAsn(), LogColumnInfo(), SaveAsn(), and SetType().

◆ m_ColumnWidth

int CTableImportColumn::m_ColumnWidth
protected

width in chracters

Definition at line 160 of file table_import_column.hpp.

Referenced by GetWidth(), LoadAsn(), LogColumnInfo(), SaveAsn(), and SetWidth().

◆ m_DataType

eDataType CTableImportColumn::m_DataType
protected

The semantic meaning of the column, e.g. id, start pos, stop pos, strand.

Definition at line 178 of file table_import_column.hpp.

Referenced by GetDataType(), GetDataTypeString(), GetShortDataTypeString(), LoadAsn(), LogColumnInfo(), SaveAsn(), and SetDataType().

◆ m_IsCurrent

bool CTableImportColumn::m_IsCurrent
protected

If true, this is the current column for editing purposes (for views that allow you to edit column type info)

Definition at line 182 of file table_import_column.hpp.

Referenced by GetIsCurrent(), and SetIsCurrent().

◆ m_Match

bool CTableImportColumn::m_Match
protected

(For attribute table loading) Is this the match column

Definition at line 175 of file table_import_column.hpp.

Referenced by GetMatchColumn(), and SetMatchColumn().

◆ m_OneBased

bool CTableImportColumn::m_OneBased
protected

If integer, is it one based or 0 based?

Definition at line 172 of file table_import_column.hpp.

Referenced by GetOneBased(), LoadAsn(), LogColumnInfo(), SaveAsn(), and SetOneBased().

◆ m_Properties

map<string,string> CTableImportColumn::m_Properties
protected

Any properties (text only) user wants to set for the column.

When converted to seq-annot, we add these to user data as &propname=prop_value

Definition at line 193 of file table_import_column.hpp.

Referenced by GetProperty(), GetPropertyValues(), HasProperty(), and SetProperty().

◆ m_Qualifier

string CTableImportColumn::m_Qualifier
protected

For table import in sequence editor - the qualifier field name.

Definition at line 185 of file table_import_column.hpp.

Referenced by GetQualifier(), and SetQualifier().

◆ m_QualifierType

string CTableImportColumn::m_QualifierType
protected

Also for sequence editor import - text version of CFieldNamePanel::EFieldType.

Definition at line 189 of file table_import_column.hpp.

Referenced by GetQualifierType(), and SetQualifierType().

◆ m_ShortTypeNameList

const char * CTableImportColumn::m_ShortTypeNameList
static
Initial value:
= {
"Accession",
"GI",
"Local ID",
"Chromosome",
"Rsid",
"ID",
"Gene Name",
"Genotype",
"Strand",
"Variation",
"SNP",
"Chromosome",
"Data Region",
"",
"",
"Start",
"Stop",
"Length",
"",
" "
}

Definition at line 86 of file table_import_column.hpp.

Referenced by GetShortStringFromDataType().

◆ m_TypeNameList

const char * CTableImportColumn::m_TypeNameList
static
Initial value:
= {
"Accession",
"GI",
"Local ID",
"Chromosome",
"Rsid",
"Unspecified ID",
"Gene Name",
"Genotype",
"Strand",
"Variation Name",
"SNP Name",
"Chromosome Number",
"Data Region",
"Unspecified Text",
"Unspecified Numeric",
"Start Position",
"Stop Position",
"Length",
"Unspecified Int",
" "
}

Definition at line 85 of file table_import_column.hpp.

Referenced by GetDataTypeFromString(), and GetStringFromDataType().


The documentation for this class was generated from the following files:
Modified on Mon Apr 22 04:01:47 2024 by modify_doxy.py rev. 669887