本文整理汇总了C++中SequencePtr::scoped方法的典型用法代码示例。如果您正苦于以下问题:C++ SequencePtr::scoped方法的具体用法?C++ SequencePtr::scoped怎么用?C++ SequencePtr::scoped使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SequencePtr
的用法示例。
在下文中一共展示了SequencePtr::scoped方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: typeChange
void
FreezeScript::AnalyzeInitVisitor::visitSequence(const SequencePtr& v)
{
if(v->isLocal())
{
return;
}
string scoped = v->scoped();
TypeList l = _oldUnit->lookupTypeNoBuiltin(scoped, false);
if(!l.empty())
{
SequencePtr s = SequencePtr::dynamicCast(l.front());
if(!s)
{
typeChange(l.front(), scoped, "sequence");
}
else
{
return;
}
}
_out.newline();
_out.newline();
_out << "<!-- sequence " << scoped << " -->";
_out << se("init") << attr("type", scoped);
_out << ee;
}
示例2: typeToString
void Slice::ChecksumVisitor::visitSequence(const SequencePtr& p)
{
if (p->isLocal()) {
return;
}
ostringstream ostr;
ostr << "sequence<" << typeToString(p->type()) << "> " << p->name() << endl;
updateMap(p->scoped(), ostr.str());
}
示例3: fixIdent
void
Slice::Ruby::CodeVisitor::visitSequence(const SequencePtr& p)
{
//
// Emit the type information.
//
string name = fixIdent(p->name(), IdentToUpper);
string scoped = p->scoped();
_out << sp << nl << "if not defined?(" << getAbsolute(p, IdentToUpper, "T_") << ')';
_out.inc();
_out << nl << "T_" << name << " = ::Ice::__defineSequence('" << scoped << "', ";
writeType(p->type());
_out << ")";
_out.dec();
_out << nl << "end"; // if not defined?()
}
示例4: getTypeVar
void
CodeVisitor::visitSequence(const SequencePtr& p)
{
string type = getTypeVar(p);
TypePtr content = p->type();
startNamespace(p);
//
// Emit the type information.
//
string scoped = p->scoped();
_out << sp << nl << "if(!isset(" << type << "))";
_out << sb;
_out << nl << type << " = IcePHP_defineSequence('" << scoped << "', ";
writeType(content);
_out << ");";
_out << eb;
endNamespace();
}
示例5: assert
//.........这里部分代码省略.........
if(cl || (newb && newb->kind() == Builtin::KindObject))
{
return;
}
break;
}
case Builtin::KindObjectProxy:
{
ProxyPtr p = ProxyPtr::dynamicCast(newType);
if(p || (newb && newb->kind() == Builtin::KindObjectProxy) || (newb && newb->kind() == Builtin::KindString))
{
return;
}
break;
}
case Builtin::KindLocalObject:
{
assert(false);
break;
}
}
typeChange(desc, oldType, newType);
return;
}
ClassDeclPtr cl = ClassDeclPtr::dynamicCast(oldType);
if(cl)
{
if(!cl->definition())
{
_errors.push_back("class " + cl->scoped() + " declared but not defined");
return;
}
//
// Allow target type of Object.
//
BuiltinPtr newb = BuiltinPtr::dynamicCast(newType);
if(newb && newb->kind() == Builtin::KindObject)
{
return;
}
//
// Allow target type of struct.
//
if(StructPtr::dynamicCast(newType))
{
return;
}
ClassDeclPtr newcl = ClassDeclPtr::dynamicCast(newType);
if(newcl)
{
if(!newcl->definition())
{
_errors.push_back("class " + newcl->scoped() + " declared but not defined");
return;
}
if(checkClasses(cl, newcl))
{
return;