本文整理汇总了C++中PvlGroup::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ PvlGroup::clear方法的具体用法?C++ PvlGroup::clear怎么用?C++ PvlGroup::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PvlGroup
的用法示例。
在下文中一共展示了PvlGroup::clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsisMain
//.........这里部分代码省略.........
incam->SetImage(sample, line);
double et = incam->time().Et();
// Get the output file name and set its attributes
CubeAttributeOutput cao;
// Can we do a regular label? Didn't work on 12-15-2006
cao.setLabelAttachment(Isis::DetachedLabel);
// Determine the output image size from
// 1) the idealInstrument pvl if there or
// 2) the input size expanded by user specified percentage
Cube *ocube = p.SetOutputCube("match.cub", cao, 1, 1, 1);
// Extract the times and the target from the instrument group
QString startTime = inst["StartTime"];
QString stopTime;
if(inst.hasKeyword("StopTime")) stopTime = (QString) inst["StopTime"];
QString target = inst["TargetName"];
// rename the instrument groups
inst.setName("OriginalInstrument");
fromInst.setName("OriginalInstrument");
// add it back to the IsisCube object under a new group name
ocube->putGroup(inst);
// and remove the version from the IsisCube Object
ocube->deleteGroup("Instrument");
// Now rename the group back to the Instrument group and clear out old keywords
inst.setName("Instrument");
inst.clear();
// Add keywords for the "Ideal" instrument
Isis::PvlKeyword key("SpacecraftName", "IdealSpacecraft");
inst.addKeyword(key);
key.setName("InstrumentId");
key.setValue("IdealCamera");
inst.addKeyword(key);
key.setName("TargetName");
key.setValue(target);
inst.addKeyword(key);
key.setName("SampleDetectors");
key.setValue(Isis::toString(detectorSamples));
inst.addKeyword(key);
key.setName("LineDetectors");
key.setValue(Isis::toString(detectorLines));
inst.addKeyword(key);
key.setName("InstrumentType");
key.setValue(instType);
inst.addKeyword(key);
Pvl &ocubeLabel = *ocube->label();
PvlObject *naifKeywordsObject = NULL;
if (ocubeLabel.hasObject("NaifKeywords")) {
naifKeywordsObject = &ocubeLabel.findObject("NaifKeywords");
// Clean up the naif keywords object... delete everything that isn't a radii