56 CSeq_table::GetTypeInfo(),
63 table_data->
m_Object =
object.object;
64 table_data->
m_Scope =
object.scope;
77 if ((*it)->IsSetSparse()) {
90 catch (
const exception& e) {
100 if (
column.IsSetDefault()) {
102 switch(defVal.
Which()) {
121 switch(data.
Which()) {
151 catch (
const std::exception& e) {
174 catch (
const std::exception& e) {
218 else if (data.
IsInt()) {
228 catch (
const std::exception& e) {
241 catch (
const std::exception& e) {
263 return *
const_cast<CSeq_table&
>(seq_table).SetColumns()[colIndex];
274 switch(data.
Which()) {
293 const vector<double>& reals = data.
GetReal();
294 if (row < reals.size())
300 vector<SLocLabel>::iterator iter = std::find(
310 if ((*iter).m_Labels[row].empty()) {
313 if (row < locs.size()) {
317 (*iter).m_Labels[row] =
label;
319 value = (*iter).m_Labels[row];
325 if (row < ids.size()) {
326 const CSeq_id& seq_id = *ids[row];
345 if (index >= 0 && index < (
int)
strings.size())
354 else if (
column.IsSetDefault()) {
356 switch(defVal.
Which()) {
380 catch (
const std::exception& e) {
390 bool valueSet =
false;
395 const vector<int>& ints = data.
GetInt();
396 if (row < ints.size()) {
404 value = ints[row] + 1;
418 if (!valueSet &&
column.IsSetDefault()) {
420 if (defVal.
IsInt()) {
425 catch (
const std::exception& e) {
436 bool valueSet =
false;
441 const vector<double>& reals = data.
GetReal();
442 if (row < reals.size()) {
448 if (!valueSet &&
column.IsSetDefault()) {
455 catch (
const std::exception& e) {
472 if (row < locs.size()) {
473 value.object.Reset(locs[row].GetPointer());
479 if (row < ids.size()) {
480 value.object.Reset(ids[row].GetPointer());
486 if (row < intervals.size()) {
487 value.object.Reset(intervals[row].GetPointer());
492 else if (
column.IsSetDefault()) {
494 if (defVal.
IsLoc()) {
498 else if (defVal.
IsId()) {
508 catch (
const std::exception& e) {
523 switch(data.
Which()) {
536 catch (
const std::exception& e) {
550 switch(data.
Which()) {
564 CSeqTable_multi_data::TString::const_iterator it =
578 vector<int>& ints = data.
SetInt();
579 if (row < ints.size()) {
591 catch (
const std::exception& e) {
604 switch(data.
Which()) {
607 vector<int>& ints = data.
SetInt();
608 if (row < ints.size()) {
609 ints[row] =
static_cast<int>(
value);
617 catch (
const std::exception& e) {
630 switch(data.
Which()) {
633 vector<double>& doubles = data.
SetReal();
634 if (row < doubles.size()) {
635 doubles[row] =
value;
643 catch (
const std::exception& e) {
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
static const signed char indexes[2][4][20]
static void RegisterFactory(const string &interface_name, IInterfaceFactory *factory)
iterator_bool insert(const value_type &val)
const_iterator find(const key_type &key) const
const_iterator end() const
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
virtual void SetStringValue(size_t row, size_t col, const string &value)
static void GetLabel(const CObject &obj, string *label, ELabelType type=eDefault)
virtual vector< string > GetColumnCommonStrings(size_t col) const
void GetStringValue(size_t row, size_t col, string &value) const
const objects::CSeqTable_column & x_GetColumn(size_t col) const
virtual string GetColumnLabel(size_t col) const
set< size_t > m_InvalidRows
virtual long GetIntValue(size_t row, size_t col) const
CConstRef< CObject > m_Object
virtual void SetIntValue(size_t row, size_t col, long value)
virtual void SetRealValue(size_t row, size_t col, double value)
virtual string GetRowLabel(size_t row) const
static CTableDataSeq_table * CreateObject(SConstScopedObject &object, ICreateParams *params)
virtual SConstScopedObject GetObjectValue(size_t row, size_t col) const
vector< SLocLabel > m_LocLabels
virtual size_t GetRowsCount() const
virtual ColumnType GetColumnType(size_t col) const
virtual bool AllowEdit(size_t col)
virtual size_t GetColsCount() const
CRef< objects::CScope > m_Scope
virtual double GetRealValue(size_t row, size_t col) const
vector< size_t > m_ColMap
#define ENUM_METHOD_NAME(EnumName)
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)
Convert double to string.
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
static const char label[]
TField_id GetField_id(void) const
Get the Field_id member data.
bool IsId(void) const
Check if variant Id is selected.
const TColumns & GetColumns(void) const
Get the Columns member data.
E_Choice Which(void) const
Which variant is currently selected.
bool IsSetTitle(void) const
user friendly column name, can be skipped Check if a value has been assigned to Title data member.
TReal & SetReal(void)
Select the variant.
const TId & GetId(void) const
Get the variant data.
const TString & GetString(void) const
Get the variant data.
const TTitle & GetTitle(void) const
Get the Title member data.
TString & SetString(void)
Select the variant.
vector< unsigned > TIndexes
const TIndexes & GetIndexes(void) const
Get the Indexes member data.
const TIndexes & GetIndexes(void) const
Get the variant data.
const TInterval & GetInterval(void) const
Get the variant data.
const TInterval & GetInterval(void) const
Get the variant data.
TIndexes & SetIndexes(void)
Assign a value to Indexes data member.
bool IsSetField_name(void) const
any column can be identified by ASN.1 text locator string with omitted object type.
const TLoc & GetLoc(void) const
Get the variant data.
const TCommon_string & GetCommon_string(void) const
Get the variant data.
vector< CRef< CSeqTable_column > > TColumns
vector< CRef< CSeq_loc > > TLoc
const TReal & GetReal(void) const
Get the variant data.
bool IsSetField_id(void) const
Check if a value has been assigned to Field_id data member.
bool IsInt(void) const
Check if variant Int is selected.
const TField_name & GetField_name(void) const
Get the Field_name member data.
const TLoc & GetLoc(void) const
Get the variant data.
bool IsInt(void) const
Check if variant Int is selected.
vector< CStringUTF8 > TString
TInt & SetInt(void)
Select the variant.
bool IsReal(void) const
Check if variant Real is selected.
vector< CRef< CSeq_id > > TId
const TInt & GetInt(void) const
Get the variant data.
bool IsLoc(void) const
Check if variant Loc is selected.
TNum_rows GetNum_rows(void) const
Get the Num_rows member data.
TCommon_string & SetCommon_string(void)
Select the variant.
const TString & GetString(void) const
Get the variant data.
TReal GetReal(void) const
Get the variant data.
vector< CRef< CSeq_interval > > TInterval
E_Choice Which(void) const
Which variant is currently selected.
bool IsCommon_string(void) const
Check if variant Common_string is selected.
bool IsInterval(void) const
Check if variant Interval is selected.
const TId & GetId(void) const
Get the variant data.
const TStrings & GetStrings(void) const
Get the Strings member data.
bool IsIndexes(void) const
Check if variant Indexes is selected.
TInt GetInt(void) const
Get the variant data.
@ eField_id_location_strand
location strand
@ eField_id_product_to
product interval to
@ eField_id_location_to
interval to
@ eField_id_product_from
product interval from
@ eField_id_location_from
interval from
@ e_Real
a set of reals, one per row
@ e_Loc
a set of locations, one per row
@ e_not_set
No variant selected.
@ e_Common_bytes
a set of byte arrays with small set of possible values
@ e_Bytes
a set of byte arrays, one per row
@ e_String
a set of strings, one per row
@ e_Int
a set of 4-byte integers, one per row
@ e_Common_string
a set of string with small set of possible values
unsigned int
A callback function used to compare two keys in a database.
static const char *const strings[]
static const char * column
void initCTableDataSeq_table()
static const char * s_StrandValues[]