本文整理汇总了C++中Tuple::Put方法的典型用法代码示例。如果您正苦于以下问题:C++ Tuple::Put方法的具体用法?C++ Tuple::Put怎么用?C++ Tuple::Put使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tuple
的用法示例。
在下文中一共展示了Tuple::Put方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Tuple
/*
Test 03: read tuple, change core attributes and resave to file." << endl;
*/
void SecondoTestFrame::Test03(const TupleAttributes *attributes,
SmiRecordFile *recFile, SmiRecordFile *lobFile) {
Tuple* myTuple;
float realv;
int intv;
char boolv;
bool bboolv;
CcReal *real1;
CcInt *int1;
CcBool *bool1;
SmiRecordId recId;
cout << "\tID:";
cin >> recId;
cout << "\trecId = " << recId << endl;
cout << "\treading tuple." << endl;
myTuple = new Tuple(recFile, recId, lobFile, attributes, SmiFile::ReadOnly);
cout << "\ttest tuple values" << endl;
cout << "\t" << *myTuple << endl;
cout << "\tSize: " << myTuple->GetSize() << endl;
cout << "\tAttributes: " << myTuple->GetAttrNum() << endl;
cout << "\ta new float value, please: "; cin >> realv;
cout << "\ta new int value, please: "; cin >> intv;
cout << "\tt = true, f = false" << endl;
cout << "\ta new boolean value, please: "; cin >> boolv;
bboolv = ((boolv == 't') ? true : false);
real1 = new CcReal(true, realv);
int1 = new CcInt(true, intv);
bool1 = new CcBool(true, bboolv);
myTuple->Put(0, int1);
myTuple->Put(1, bool1);
myTuple->Put(2, real1);
cout << "\ttest tuple values" << endl;
cout << "\t" << *myTuple << endl;
cout << "\tSize: " << myTuple->GetSize() << endl;
cout << "\tAttributes: " << myTuple->GetAttrNum() << endl;
myTuple->Save();
delete bool1;
delete int1;
delete real1;
delete(myTuple);
}