本文整理汇总了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);
}
示例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);
}
示例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);
);