예제 #1
0
int database::dbPrivate::baseRecord::insert()
{
    saveAllRelated();
    int ret=doInsert();
    saveValue();
    return ret;
}
예제 #2
0
 void MapperCont::save(ofstream & out) const
 {
     assert(out.good());
     uint wr = MAPPER_CONT_HDR;
     saveValue(out,wr);
     m->save(out);
 }
예제 #3
0
int database::dbPrivate::baseRecord::save()
{
    int ret=doSave();
    saveDataLocaly();
    saveValue();
    return ret;
}
예제 #4
0
	void NPR_FMN::save(ofstream & fp) const
	{
		saveValue(fp, npr_type);
		nsv->save(fp);
		psv->save(fp);
		rmq->save(fp);
	}
예제 #5
0
	void TextIndexCSA::save(ofstream & fp) const
	{
		uint wr = CSA_HDR;
		saveValue(fp,wr);
		if(csa!=NULL)
			csa_save(csa,fp);
	}
예제 #6
0
void WSI_AppLocale::apply()
{
    if (mAppLocale == mAppLocaleTmp)
        return;

    mAppLocale = mAppLocaleTmp;
    saveValue("app_locale_name", mAppLocale);
}
예제 #7
0
파일: perm.cpp 프로젝트: Sparklexs/libcds
	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;
	}
예제 #8
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);
}
예제 #9
0
	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);
	}
예제 #10
0
 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);
     }
 }
예제 #11
0
파일: DAC_VLS.cpp 프로젝트: migumar2/libCSD
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);
}
예제 #12
0
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);
}
예제 #13
0
/*
 * 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;
	}
}
예제 #14
0
int database::dbPrivate::baseRecord::select()
{
    int ret;
    if(_id.isValid() )
    {
        ret=selectFromId();
    }
    else
    {
        saveAllRelated();
        ret = selectFromUnique();
    }
    saveValue();
    return ret;
}
예제 #15
0
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);
}
예제 #16
0
	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);
	}
예제 #17
0
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();
}
예제 #18
0
void WSI_Appearance::apply()
{
    saveValue("appearance_use_opengl", mUseOpenGlCheckBox->isChecked());
}
예제 #19
0
 void wt_coder_huff::save(ostream & fp) const
 {
     uint wr = WT_CODER_HUFF_HDR;
     saveValue(fp,wr);
     hc->save(fp);
 }
예제 #20
0
void XmlSetter::visit<bool, BoolField>(bool &field, const BoolField *fieldDescriptor)
{
	saveValue(fieldDescriptor->name.name, field ? "true" : "false");
}
예제 #21
0
void XmlSetter::visit<std::string, StringField>(std::string &field, const StringField *fieldDescriptor)
{
	saveValue(fieldDescriptor->name.name, field.c_str());
}
예제 #22
0
파일: xml.hpp 프로젝트: JoyIfBam5/cereal
 //! Overload for int8_t prevents them from being serialized as characters
 void saveValue( int8_t const & value )
 {
   saveValue( static_cast<int32_t>( value ) );
 }
예제 #23
0
void XmlSetter::visit<int, EnumField>(int &field, const EnumField *fieldDescriptor)
{
	saveValue(fieldDescriptor->name.name, QString::number(field));
}
예제 #24
0
	void LCP_DAC_VAR::save(ofstream & fp) const{
		saveValue(fp, lcp_type);
		saveValue(fp, n); 
		rep->save(fp);  
	}
예제 #25
0
 void wt_coder_binary::save(ofstream & fp) const
 {
     uint wr = WT_CODER_BINARY_HDR;
     saveValue(fp,wr);
     saveValue(fp,h);
 }
예제 #26
0
	void Permutation::save(ostream & fp) const
	{
		saveValue(fp,length);
	}
예제 #27
0
void XmlSetter::visit<int>(int &intField, int /*defaultValue*/, const char *fieldName)
{
    saveValue(fieldName, QString::number(intField));
}
예제 #28
0
void XmlSetter::visit<bool>(bool &boolField, bool /*defaultValue*/, const char *fieldName)
{
    saveValue(fieldName, boolField ? "true" : "false");
}
예제 #29
0
파일: actor.cpp 프로젝트: arbonagw/Soyouz
void Actor::save()
{
	setSaveGroup("actor");
	saveValue(location(), "location");
	saveValue(rotation(), "rotation");
}
예제 #30
0
void XmlSetter::visit<double>(double &doubleField, double /*defaultValue*/, const char *fieldName)
{
    saveValue(fieldName, QString::number(doubleField));
}