本文整理汇总了C++中MCStack::getfilename方法的典型用法代码示例。如果您正苦于以下问题:C++ MCStack::getfilename方法的具体用法?C++ MCStack::getfilename怎么用?C++ MCStack::getfilename使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MCStack
的用法示例。
在下文中一共展示了MCStack::getfilename方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: doreadfile
// MW-2012-02-17: [[ LogFonts ]] Actually load the stack file (wrapped by readfile
// to handle font table cleanup).
IO_stat MCDispatch::doreadfile(const char *openpath, const char *inname, IO_handle &stream, MCStack *&sptr)
{
Boolean loadhome = False;
char version[8];
if (readheader(stream, version) == IO_NORMAL)
{
if (strcmp(version, MCversionstring) > 0)
{
MCresult->sets("stack was produced by a newer version");
return IO_ERROR;
}
// MW-2008-10-20: [[ ParentScripts ]] Set the boolean flag that tells us whether
// parentscript resolution is required to false.
s_loaded_parent_script_reference = false;
uint1 charset, type;
char *newsf;
if (IO_read_uint1(&charset, stream) != IO_NORMAL
|| IO_read_uint1(&type, stream) != IO_NORMAL
|| IO_read_string(newsf, stream) != IO_NORMAL)
{
MCresult->sets("stack is corrupted, check for ~ backup file");
return IO_ERROR;
}
delete newsf; // stackfiles is obsolete
MCtranslatechars = charset != CHARSET;
sptr = nil;
/* UNCHECKED */ MCStackSecurityCreateStack(sptr);
if (stacks == NULL)
sptr->setparent(this);
else
sptr->setparent(stacks);
sptr->setfilename(strclone(openpath));
if (MCModeCanLoadHome() && type == OT_HOME)
{
char *lstring = NULL;
char *cstring = NULL;
IO_read_string(lstring, stream);
IO_read_string(cstring, stream);
delete lstring;
delete cstring;
}
MCresult -> clear();
if (IO_read_uint1(&type, stream) != IO_NORMAL
|| type != OT_STACK && type != OT_ENCRYPT_STACK
|| sptr->load(stream, version, type) != IO_NORMAL)
{
if (MCresult -> isclear())
MCresult->sets("stack is corrupted, check for ~ backup file");
destroystack(sptr, False);
sptr = NULL;
return IO_ERROR;
}
// MW-2011-08-09: [[ Groups ]] Make sure F_GROUP_SHARED is set
// appropriately.
sptr -> checksharedgroups();
if (sptr->load_substacks(stream, version) != IO_NORMAL
|| IO_read_uint1(&type, stream) != IO_NORMAL
|| type != OT_END)
{
if (MCresult -> isclear())
MCresult->sets("stack is corrupted, check for ~ backup file");
destroystack(sptr, False);
sptr = NULL;
return IO_ERROR;
}
if (stacks != NULL)
{
MCStack *tstk = stacks;
do
{
if (sptr->hasname(tstk->getname()))
{
MCAutoNameRef t_stack_name;
/* UNCHECKED */ t_stack_name . Clone(sptr -> getname());
delete sptr;
sptr = NULL;
if (strequal(tstk->getfilename(), openpath))
sptr = tstk;
else
{
MCdefaultstackptr->getcard()->message_with_args(MCM_reload_stack, MCNameGetOldString(tstk->getname()), openpath);
tstk = stacks;
do
{
if (MCNameIsEqualTo(t_stack_name, tstk->getname(), kMCCompareCaseless))
{
sptr = tstk;
//.........这里部分代码省略.........