本文整理汇总了C++中SpatialDataView::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ SpatialDataView::getName方法的具体用法?C++ SpatialDataView::getName怎么用?C++ SpatialDataView::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpatialDataView
的用法示例。
在下文中一共展示了SpatialDataView::getName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
bool DiHdfImporter::execute(PlugInArgList* pInArgList, PlugInArgList* pOutArgList)
{
if (!RasterElementImporterShell::execute(pInArgList, pOutArgList))
{
return false;
}
SpatialDataView* pView = (pOutArgList == NULL) ? NULL : pOutArgList->getPlugInArgValue<SpatialDataView>("View");
if (pView != NULL)
{
if (pView->createDefaultAnimation() == NULL)
{
return false;
}
AnimationController* pController = Service<AnimationServices>()->getAnimationController(pView->getName());
if (pController == NULL)
{
return false;
}
pController->setAnimationCycle(REPEAT);
pController->setCanDropFrames(false);
pController->setIntervalMultiplier(2);
AnimationToolBar* pToolbar = static_cast<AnimationToolBar*>(Service<DesktopServices>()->getWindow("Animation", TOOLBAR));
VERIFY(pToolbar);
pToolbar->setAnimationController(pController);
}
return true;
}
示例2: execute
bool LayerImporter::execute(PlugInArgList* pInArgList, PlugInArgList* pOutArgList)
{
Layer* pLayer = NULL;
Progress* pProgress = NULL;
DataElement* pElement = NULL;
SpatialDataView* pView = NULL;
StepResource pStep("Import layer", "app", "DF24688A-6B34-4244-98FF-5FFE2063AC05");
// get input arguments and log some useful info about them
{ // scope the MessageResource
MessageResource pMsg("Input arguments", "app", "C0A532DE-0E19-44D3-837C-16ABD267B2C1");
pProgress = pInArgList->getPlugInArgValue<Progress>(Executable::ProgressArg());
pMsg->addBooleanProperty("Progress Present", (pProgress != NULL));
pElement = pInArgList->getPlugInArgValue<DataElement>(Importer::ImportElementArg());
if (pElement == NULL)
{
if (pProgress != NULL)
{
pProgress->updateProgress("No data element", 100, ERRORS);
}
pStep->finalize(Message::Failure, "No data element");
return false;
}
pMsg->addProperty("Element name", pElement->getName());
pView = pInArgList->getPlugInArgValue<SpatialDataView>(Executable::ViewArg());
if (pView != NULL)
{
pMsg->addProperty("View name", pView->getName());
}
}
if (pProgress != NULL)
{
pProgress->updateProgress((string("Read and parse file ") + pElement->getFilename()),
20, NORMAL);
}
// parse the xml
XmlReader xml(Service<MessageLogMgr>()->getLog());
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* pDomDocument = xml.parse(pElement->getFilename());
if (pDomDocument == NULL)
{
if (pProgress != NULL)
{
pProgress->updateProgress("Unable to parse the file", 100, ERRORS);
}
pStep->finalize(Message::Failure, "Unable to parse the file");
return false;
}
DOMElement* pRootElement = pDomDocument->getDocumentElement();
VERIFY(pRootElement != NULL);
if (pProgress != NULL)
{
pProgress->updateProgress("Create the layer", 40, NORMAL);
}
string name(A(pRootElement->getAttribute(X("name"))));
string type(A(pRootElement->getAttribute(X("type"))));
unsigned int formatVersion = atoi(A(pRootElement->getAttribute(X("version"))));
{ // scope the MessageResource
MessageResource pMsg("Layer information", "app", "AA358F7A-107E-456E-8D11-36DDBE5B1645");
pMsg->addProperty("name", name);
pMsg->addProperty("type", type);
pMsg->addProperty("format version", formatVersion);
}
// If user requested pixel coordinates be used.
bool usePixelCoords = false;
DataDescriptor* pDesc = pElement->getDataDescriptor();
VERIFY( pDesc );
pDesc->getMetadata()->getAttributeByPath( "Layer/Import Options/Use Pixel Coordinates" ).getValue( usePixelCoords );
if (usePixelCoords)
{
// Remove geoVertices and geoBox elements.
removeGeoNodes(pRootElement);
}
if (pView == NULL)
{
//no view provided, so find current view
SpatialDataWindow* pWindow = dynamic_cast<SpatialDataWindow*>(mpDesktop->getCurrentWorkspaceWindow());
if (pWindow != NULL)
{
pView = pWindow->getSpatialDataView();
}
}
if (pView == NULL)
{
if (pProgress != NULL)
{
pProgress->updateProgress("Could not access the view to create the layer.", 100, ERRORS);
}
//.........这里部分代码省略.........