int database::dbPrivate::baseRecord::insert() { saveAllRelated(); int ret=doInsert(); saveValue(); return ret; }
void MapperCont::save(ofstream & out) const { assert(out.good()); uint wr = MAPPER_CONT_HDR; saveValue(out,wr); m->save(out); }
int database::dbPrivate::baseRecord::save() { int ret=doSave(); saveDataLocaly(); saveValue(); return ret; }
void NPR_FMN::save(ofstream & fp) const { saveValue(fp, npr_type); nsv->save(fp); psv->save(fp); rmq->save(fp); }
void TextIndexCSA::save(ofstream & fp) const { uint wr = CSA_HDR; saveValue(fp,wr); if(csa!=NULL) csa_save(csa,fp); }
void WSI_AppLocale::apply() { if (mAppLocale == mAppLocaleTmp) return; mAppLocale = mAppLocaleTmp; saveValue("app_locale_name", mAppLocale); }
uint savePerm(const perm P, ofstream & f) { uint aux; uint v; saveValue(f,P->nelems); saveValue(f,P->elems,uint_len(P->nelems,P->nbits)); aux = ((P->nelems+W-1)/W); if (P->bmap) { v=1; saveValue(f,v); P->bmap->save(f); } else { v=0; saveValue(f,v); } saveValue(f,P->nbwdptrs); aux = uint_len(P->nbwdptrs,P->nbits); saveValue(f,P->bwdptrs,aux); saveValue(f,P->t); return 0; }
void Settings::addRecentCodec(QString host) { QStringList recents = recentCodecs(); if (recents.contains(host)) recents.removeOne(host); int topOfList = 0; recents.insert(topOfList, host); saveValue(KeyRecentCodecs, recents); }
void BinaryRelation::save(ofstream & fp) { // Binary Relation Type (BBR or LBR) saveValue(fp,type); // Stats values: npoints, nrows, ncolumns saveValue(fp,npoints); saveValue(fp,nrows); saveValue(fp,ncolumns); // Saving Structures (Xa, Xb, Sb) // Xa and Xb does not exist for LBRNB binary relation if (type != LBRNB) { Xa->save(fp); Xb->save(fp); } Sb->save(fp); }
void wt_node_internal::save(ofstream & fp) const { uint wr = WT_NODE_INTERNAL_HDR; saveValue(fp,wr); bitmap->save(fp); if(left_child!=NULL) { left_child->save(fp); } else { wr = WT_NODE_NULL_HDR; saveValue(fp,wr); } if(right_child!=NULL) { right_child->save(fp); } else { wr = WT_NODE_NULL_HDR; saveValue(fp,wr); } }
void DAC_VLS::save(ofstream & fp) const{ saveValue(fp, tamCode); saveValue(fp, listLength); saveValue(fp, nLevels); saveValue(fp, base_bits); saveValue(fp, levelsIndex, nLevels+1); saveValue(fp, levels, tamCode/W+1); saveValue(fp, rankLevels, nLevels); bS->save(fp); }
void SequenceAlphPart::save(ofstream &fp) const { uint type = ALPHPART_HDR; saveValue(fp, type); saveValue(fp, length); saveValue(fp, sigma); saveValue(fp, origsigma); saveValue(fp, maxLen); saveValue(fp, cut); saveValue(fp, revPermFreq, sigma + 1); saveValue(fp, alphSortedByFreq, sigma + 1); groupsIndex->save(fp); for (uint i = 0; maxLen > cut && i < maxLen - cut; i++) indexesByLength[i]->save(fp); }
/* * dequeue data, match key value */ void popHandle(json_t *object) { DataType e = pop_cir_queue(&q); if(e == 0) { log4c_category_log(mycat, LOG4C_PRIORITY_ERROR, "queue is empty at line %d in file %s", __LINE__, __FILE__); exit(1); return; } int saveRes = saveValue(object, e); if(saveRes == -1){ log4c_category_log(mycat, LOG4C_PRIORITY_ERROR, "saveValue %s error at line %d in file %s",e , __LINE__, __FILE__); return; } }
int database::dbPrivate::baseRecord::select() { int ret; if(_id.isValid() ) { ret=selectFromId(); } else { saveAllRelated(); ret = selectFromUnique(); } saveValue(); return ret; }
void BitSequenceRRR::save(ofstream & f) const { /*cout << "===================" << endl; cout << "length = " << length << endl; cout << "ones = " << ones << endl; cout << "C_len = " << C_len << endl; cout << "C_field_bits = " << C_field_bits << endl; cout << "O_len = " << O_len << endl; cout << "O_bits_len = " << O_bits_len << endl; cout << "sample_rate = " << sample_rate << endl; cout << "C_alen = " << uint_len(C_len,C_field_bits) << endl; cout << "O_alen = " << O_len << endl;*/ uint wr = RRR02_HDR; saveValue(f,wr); saveValue(f,length); saveValue(f,ones); saveValue(f,C_len); saveValue(f,C_field_bits); saveValue(f,O_len); saveValue(f,O_bits_len); saveValue(f,sample_rate); saveValue(f,C,uint_len(C_len,C_field_bits)); saveValue(f,O,O_len); }
void RMQ_succinct::save(ostream & fp) { saveValue(fp,n); saveValue(fp, a, n); saveValue(fp, type, nmb); for(uint i=0; i < M_depth; i++) saveValue(fp, M[i], nb); for(uint i=0; i < Mprime_depth; i++) saveValue(fp, Mprime[i], nsb); for(uint i=0; i < Catalan[s][s]; i++) saveValue(fp, Prec[i], s); }
ValueView::ValueView(const QVariant& value, QWidget *parent) : QDialog(parent), m_value(value), m_decoded(value), m_ui(new Ui::ValueViewWidget), m_dirtytext(true), m_dirtyhex(true) { // Initialize dialog setAttribute(Qt::WA_DeleteOnClose, true); // Create UI m_ui->setupUi(this); m_ui->modeText->setChecked(true); connect(m_ui->buttonBox, &QDialogButtonBox::clicked, [this](QAbstractButton *b) { if(m_ui->buttonBox->standardButton(b) == QDialogButtonBox::Save) saveValue(); }); connect(m_ui->decodeb64, &QAbstractButton::toggled, this, &ValueView::decodeBase64); connect(m_ui->modeText, &QAbstractButton::clicked, this, &ValueView::showTextView); connect(m_ui->modeHex, &QAbstractButton::clicked, this, &ValueView::showHexView); // Text view m_textview = new QPlainTextEdit(this); m_textview->setReadOnly(true); m_ui->stackedWidget->addWidget(m_textview); // Hex view m_hexview = new Okteta::ByteArrayColumnView(this); m_hexview->setReadOnly(true); Okteta::ByteArrayModel *hexmodel = new Okteta::ByteArrayModel(); hexmodel->setAutoDelete(true); m_hexview->setByteArrayModel(hexmodel); m_ui->stackedWidget->addWidget(m_hexview); updateView(); }
void WSI_Appearance::apply() { saveValue("appearance_use_opengl", mUseOpenGlCheckBox->isChecked()); }
void wt_coder_huff::save(ostream & fp) const { uint wr = WT_CODER_HUFF_HDR; saveValue(fp,wr); hc->save(fp); }
void XmlSetter::visit<bool, BoolField>(bool &field, const BoolField *fieldDescriptor) { saveValue(fieldDescriptor->name.name, field ? "true" : "false"); }
void XmlSetter::visit<std::string, StringField>(std::string &field, const StringField *fieldDescriptor) { saveValue(fieldDescriptor->name.name, field.c_str()); }
//! Overload for int8_t prevents them from being serialized as characters void saveValue( int8_t const & value ) { saveValue( static_cast<int32_t>( value ) ); }
void XmlSetter::visit<int, EnumField>(int &field, const EnumField *fieldDescriptor) { saveValue(fieldDescriptor->name.name, QString::number(field)); }
void LCP_DAC_VAR::save(ofstream & fp) const{ saveValue(fp, lcp_type); saveValue(fp, n); rep->save(fp); }
void wt_coder_binary::save(ofstream & fp) const { uint wr = WT_CODER_BINARY_HDR; saveValue(fp,wr); saveValue(fp,h); }
void Permutation::save(ostream & fp) const { saveValue(fp,length); }
void XmlSetter::visit<int>(int &intField, int /*defaultValue*/, const char *fieldName) { saveValue(fieldName, QString::number(intField)); }
void XmlSetter::visit<bool>(bool &boolField, bool /*defaultValue*/, const char *fieldName) { saveValue(fieldName, boolField ? "true" : "false"); }
void Actor::save() { setSaveGroup("actor"); saveValue(location(), "location"); saveValue(rotation(), "rotation"); }
void XmlSetter::visit<double>(double &doubleField, double /*defaultValue*/, const char *fieldName) { saveValue(fieldName, QString::number(doubleField)); }