本文整理汇总了C++中MCStack::getsubstackobjname方法的典型用法代码示例。如果您正苦于以下问题:C++ MCStack::getsubstackobjname方法的具体用法?C++ MCStack::getsubstackobjname怎么用?C++ MCStack::getsubstackobjname使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MCStack
的用法示例。
在下文中一共展示了MCStack::getsubstackobjname方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ep
MCObject *MCDispatch::getobjname(Chunk_term type, const MCString &s)
{
if (stacks != NULL)
{
MCStack *tstk = stacks;
do
{
MCObject *optr;
if ((optr = tstk->getsubstackobjname(type, s)) != NULL)
return optr;
tstk = (MCStack *)tstk->next();
}
while (tstk != stacks);
}
if (type == CT_IMAGE)
{
const char *sptr = s.getstring();
uint4 l = s.getlength();
MCAutoNameRef t_image_name;
if (MCU_strchr(sptr, l, ':'))
/* UNCHECKED */ t_image_name . CreateWithOldString(s);
MCImage *iptr = imagecache;
if (iptr != NULL)
{
do
{
check:
if (t_image_name != nil && iptr -> hasname(t_image_name))
return iptr;
if (!iptr->getopened())
{
iptr->remove(imagecache);
delete iptr;
iptr = imagecache;
if (iptr == NULL)
break;
goto check;
}
iptr = (MCImage *)iptr->next();
}
while (iptr != imagecache);
}
if (MCU_strchr(sptr, l, ':'))
{
MCresult->clear(False);
MCExecPoint ep(MCdefaultstackptr, NULL, NULL);
MCExecPoint *epptr = MCEPptr == NULL ? &ep : MCEPptr;
epptr->setsvalue(s);
MCU_geturl(*epptr);
if (MCresult->isempty())
{
iptr = new MCImage;
iptr->appendto(imagecache);
iptr->setprop(0, P_TEXT, *epptr, False);
iptr->setname(t_image_name);
return iptr;
}
}
}
return NULL;
}