当前位置: 首页>>代码示例>>C++>>正文


C++ avtDataObject_p::GetType方法代码示例

本文整理汇总了C++中avtDataObject_p::GetType方法的典型用法代码示例。如果您正苦于以下问题:C++ avtDataObject_p::GetType方法的具体用法?C++ avtDataObject_p::GetType怎么用?C++ avtDataObject_p::GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在avtDataObject_p的用法示例。


在下文中一共展示了avtDataObject_p::GetType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CopyTo

void
avtNullDataSink::SetTypedInput(avtDataObject_p in)
{
    if (*in != NULL && 
        (strcmp(in->GetType(), "avtNullData") != 0) && 
        (strcmp(in->GetType(), AVT_NULL_IMAGE_MSG) != 0) && 
        (strcmp(in->GetType(), AVT_NULL_DATASET_MSG) != 0))
    {
        EXCEPTION0(ImproperUseException);
    }

    CopyTo(input, in);

}
开发者ID:EricAlex,项目名称:ThirdParty-dev,代码行数:14,代码来源:avtNullDataSink.C

示例2: CopyTo

void
avtImageSink::SetTypedInput(avtDataObject_p in)
{
    if (*in != NULL && strcmp(in->GetType(), "avtImage") != 0)
    {
        //
        // Should create a new exception here, but I'm under time constraints.
        //
        debug1 << "Looking for avtImage, but found type \""
               << in->GetType() << "\"." << endl;
        EXCEPTION0(ImproperUseException);
    }

    CopyTo(input, in);
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:15,代码来源:avtImageSink.C

示例3: AddSelectionProperties

void
avtNamedSelectionManager::CreateNamedSelection(avtDataObject_p dob, 
    const SelectionProperties &selProps, avtNamedSelectionExtension *ext)
{
    const char *mName = "avtNamedSelectionManager::CreateNamedSelection: ";
    StackTimer t0("CreateNamedSelection");

    if (strcmp(dob->GetType(), "avtDataset") != 0)
    {
        EXCEPTION1(VisItException, "Named selections only work on data sets");
    }

    // Save the selection properties.
    AddSelectionProperties(selProps);

    // Augment the contract based on the selection properties.
    avtContract_p c0 = dob->GetContractFromPreviousExecution();
    bool needsUpdate = false;
    avtContract_p contract = ext->ModifyContract(c0, selProps, needsUpdate);

    // 
    // Let the input try to create the named selection ... some have special
    // logic, for example the parallel coordinates filter.
    //
    const std::string &selName = selProps.GetName();
    avtNamedSelection *ns = NULL;
    if(selProps.GetSelectionType() == SelectionProperties::BasicSelection)
    {
        ns = dob->GetSource()->CreateNamedSelection(contract, selName);
        if (ns != NULL)
        {
            int curSize = selList.size();
            selList.resize(curSize+1);
            selList[curSize] = ns;

            //
            // Save out the named selection in case of engine crash / 
            // save/restore session, etc.
            //  
            SaveNamedSelection(selName, true);
            return;
        }
    }

    //
    // Call into the extension to get the per-processor named selection.
    //
    TimedCodeBlock("Creating selection in extension",
        ns = ext->GetSelection(dob, selProps, cache);
    );
开发者ID:EricAlex,项目名称:ThirdParty-dev,代码行数:50,代码来源:avtNamedSelectionManager.C


注:本文中的avtDataObject_p::GetType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。