本文整理汇总了C++中Locator::insert方法的典型用法代码示例。如果您正苦于以下问题:C++ Locator::insert方法的具体用法?C++ Locator::insert怎么用?C++ Locator::insert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Locator
的用法示例。
在下文中一共展示了Locator::insert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write_to_blob
void write_to_blob(int number)
{
// ESTABLISH CONNECTION TO THE DATABASE
prepareBLOB_In_DB(string("phoenix.cise.ufl.edu:1521/orcl"), string(username), string(password));
//iBlobStore * store = new iBlobOracleStore(mylob, errhp, svchp);
iBlobStore * store = new iBlobOracleStore(mylob, errhp, svchp);
iBlob p (store, false);
// Start the timer
clock_t begin=clock();
/* IBLOB FUNCTIONS USED TO CREATE THE SEGMENT OBJECT */
for(int i = 0; i < number; i++)
{
cout<<i<<endl;
Locator lGlobal = p.locateGlobal();
cout<<"Done 1 "<<endl;
Locator l;
if(lGlobal.getElements() == 0)
{cout<<"Here"<<endl;
l = p.insert(lGlobal, 0);
}
cout<<"Done 2 "<<endl;
Locator lLeftPt = l.insert(0);
cout<<"Done 3 "<<endl;
Locator lRightPt = l.insert(1);
cout<<"Done 4 "<<endl;
Locator lLPTx = lLeftPt.insert(0);
cout<<"Done 5 "<<endl;
Locator lLPTy = lLeftPt.insert(1);
cout<<"Done 6 "<<endl;
Locator lRPTx = lRightPt.insert(0);
cout<<"Done 7 "<<endl;
Locator lRPTy = lRightPt.insert(1);
cout<<"Done 8 "<<endl;
double x1 = fRand(0,MAX);
double y1 = fRand(0,MAX);
double x2 = fRand(0,MAX);
double y2 = fRand(0,MAX);
cout<<"Done 8.5 "<<endl;
p.insertVal(x1, lLeftPt, 0);
cout<<"Done 9 "<<endl;
p.insertVal(y1, lLPTy, 0);
cout<<"Done 10 "<<endl;
p.insertVal(x2, lRPTx, 0);
cout<<"Done 11 "<<endl;
p.insertVal(y2, lRPTy, 0);
cout<<"Done 12 "<<endl;
}
/****************************************************/
clock_t end=clock();
cout << "Time elapsed: " << double(diffclock(end,begin)) << " ms"<< endl;
closeConnection();
}