本文整理汇总了C++中Help::cl_name方法的典型用法代码示例。如果您正苦于以下问题:C++ Help::cl_name方法的具体用法?C++ Help::cl_name怎么用?C++ Help::cl_name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Help
的用法示例。
在下文中一共展示了Help::cl_name方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Help
Help(Help& rval){p_=rval.p(); cl_name_=rval.cl_name();}
示例2: main
//.........这里部分代码省略.........
//=======
if (!(**it)["p"]) p=(float)0.987;
else p=(**it)["p"]->toFloat();
Help* h = new Help(p,it.currentKey());
hl.append(h);
//>>>>>>> 1.6
++it;
}
hl.sort();
newX = int((gE-gW) / xRes);//calculate new image size
newY = int((gN-gS) / yRes);//calculate new image size
qDebug("$$$newX: %d, newY: %d, xRes: %f, yRes: %f, gN: %f, gS: %f, gE: %f, gW: %f",
newX, newY, xRes, yRes, gN, gS, gE, gW);
QFile fp(argv[2]); // 'XML' - description
if (!fp.open(IO_WriteOnly)) qDebug("write: file not accesable to %s\n",argv[2]);
QTextStream str(&fp);
QDict<int> dict( 17, FALSE ); //dictionary for the class nr.
QArray<NodeInfo*> infolist(nl_i->size()+1); // array of pointers to NodeInfo
Help *pl;
int i = 1;
int helplabel = 0;//, label = 0;
Image out_img(typeid(signed int),newX,newY,1); //generate out image
#ifdef WIN32
QArray <int> vec(nl_i->size()+1);
#else
int vec[nl_i->size()+1];
#endif
for (int ix=0; ix<nl_i->size()+1; ix++) vec[ix]=0; //info for labeling
out_img.setGeoCoordinates(gW,gN,gE,gS);
for ( pl=hl.first(); pl != 0; pl=hl.next() ) {
Node *node=nl_i->find(pl->cl_name());
//label = node->id();
NodeInfo* ni = new NodeInfo(newX, newY);
ni->id(i);
ni->cl_name(node->classname());
ni->name(node->name());
//cout << "##### " << i <<": "<< node->name() << " - " << node->classname()<<endl;//<<"; p:"<< (node->getValue("p"))->toFloat()<<endl;
ni->p((node->getValue("p"))->toFloat());
// qDebug("$$§§§§ node->p: %f",node->getValue("p"))->toFloat());
ni->addr(node->addr());
if(dict.find(node->classname())) //class with nr.
ni->classNr(*(dict.find(node->classname())));
else {
int *l = new int(helplabel);
dict.insert(node->classname(),l);
ni->classNr(helplabel);
helplabel++;
}
infolist[i] = ni;
vec[i]=helplabel;
//cout <<"$$$ label:"<<i<<") oldlabel:"<<node->id()<<", helplabel: "<<ni->classNr()<<" - "<<node->filename()<<endl;
Image img(typeid(int));
img.read(node->filename().latin1());
img.setGeoCoordinates(node->geoWest(), node->geoNorth(), node->geoEast(), node->geoSouth());
float np=((*n)["p"])->toFloat();
if (np>0.00001) out_img.geoMerge(img, node->id(), i);//XX
i++;
}
out_img.write(argv[3]);