本文整理汇总了C++中IString::Trim方法的典型用法代码示例。如果您正苦于以下问题:C++ IString::Trim方法的具体用法?C++ IString::Trim怎么用?C++ IString::Trim使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IString
的用法示例。
在下文中一共展示了IString::Trim方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsisMain
//.........这里部分代码省略.........
// Add SOFTWARE_NAME to the ROOT
QString sfname;
sfname.clear();
sfname += "Isis " + Application::Version() + " " +
Application::GetUserInterface().ProgramName();
pdsLabel += PvlKeyword("SOFTWARE_NAME", sfname);
// Add the PRODUCT_VERSION_ID from the user parameter VERSION
pdsLabel += PvlKeyword("PRODUCT_VERSION_ID", ui.GetString("VERSION"));
// Add MRO:CCD_FLAG, MRO:BINNING, MRO:TDI
// As pulled from the input Isis cube, the values are in CPMM order, so
// convert them to CCD order
PvlKeyword ccdFlag("MRO:CCD_FLAG");
PvlKeyword &cpmmFlag = origLabel.findObject("OriginalLabelObject").
findGroup("INSTRUMENT_SETTING_PARAMETERS").
findKeyword("MRO:POWERED_CPMM_FLAG");
PvlKeyword ccdBin("MRO:BINNING");
PvlKeyword &cpmmBin = icube2->label()->findObject("IsisCube").
findGroup("Mosaic")["cpmmSummingFlag"];
PvlKeyword ccdTdi("MRO:TDI");
PvlKeyword &cpmmTdi = icube2->label()->findObject("IsisCube").
findGroup("Mosaic")["cpmmTdiFlag"];
PvlKeyword ccdSpecial("MRO:SPECIAL_PROCESSING_FLAG");
PvlKeyword &cpmmSpecial = icube2->label()->findObject("IsisCube").
findGroup("Mosaic")["SpecialProcessingFlag"];
for (int ccd = 0; ccd < 14; ++ccd) {
const unsigned int cpmmByCcd[] = {0, 1, 2, 3, 5, 8, 10,
11, 12, 13, 6, 7, 4, 9};
ccdFlag.addValue(cpmmFlag[cpmmByCcd[ccd]]);
ccdBin.addValue(cpmmBin[cpmmByCcd[ccd]] != "Null" ? cpmmBin[cpmmByCcd[ccd]] : "-9998");
ccdTdi.addValue(cpmmTdi[cpmmByCcd[ccd]] != "Null" ? cpmmTdi[cpmmByCcd[ccd]] : "-9998");
IString tmp = cpmmSpecial[cpmmByCcd[ccd]];
tmp.Trim("\"");
ccdSpecial.addValue(tmp.ToQt());
}
if (!pdsLabel.hasGroup("INSTRUMENT_SETTING_PARAMETERS")) {
pdsLabel.addGroup(PvlGroup("INSTRUMENT_SETTING_PARAMETERS"));
}
pdsLabel.findGroup("INSTRUMENT_SETTING_PARAMETERS") += ccdFlag;
pdsLabel.findGroup("INSTRUMENT_SETTING_PARAMETERS") += ccdBin;
pdsLabel.findGroup("INSTRUMENT_SETTING_PARAMETERS") += ccdTdi;
pdsLabel.findGroup("INSTRUMENT_SETTING_PARAMETERS") += ccdSpecial;
// Add/modify projection info if there is a projection
if (pdsLabel.hasObject("IMAGE_MAP_PROJECTION")) {
PvlObject &mapObject = pdsLabel.findObject("IMAGE_MAP_PROJECTION");
mapObject += PvlKeyword("^DATA_SET_MAP_PROJECTION", "DSMAP.CAT");
// Add the HiRISE comment to the CENTER_LATITUDE keyword
PvlKeyword &clat = mapObject["CENTER_LATITUDE"];
clat.addComment("/* NOTE: CENTER_LATITUDE and CENTER_LONGITUDE describe the location */");
clat.addComment("/* of the center of projection, which is not necessarily equal to the */");
clat.addComment("/* location of the center point of the image. */");
if (mapObject.hasKeyword("CENTER_LATITUDE")) {
PvlKeyword ¢erLat = mapObject["CENTER_LATITUDE"];
// if (centerLat[0] == "N/A") centerLat = -9998;
if (centerLat[0] == "N/A") mapObject.deleteKeyword("CENTER_LATITUDE");
}
if (mapObject.hasKeyword("CENTER_LONGITUDE")) {
PvlKeyword ¢erLon = mapObject["CENTER_LONGITUDE"];
// if (centerLon[0] == "N/A") centerLon = -9998;
if (centerLon[0] == "N/A") mapObject.deleteKeyword("CENTER_LONGITUDE");
}