本文整理汇总了C++中MethodInfo::resolveSignature方法的典型用法代码示例。如果您正苦于以下问题:C++ MethodInfo::resolveSignature方法的具体用法?C++ MethodInfo::resolveSignature怎么用?C++ MethodInfo::resolveSignature使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MethodInfo
的用法示例。
在下文中一共展示了MethodInfo::resolveSignature方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: describeTraits
ScriptObject* TypeDescriber::describeTraits(Traitsp traits, uint32_t flags, Toplevel* toplevel)
{
if (!(flags & INCLUDE_TRAITS))
return NULL;
AvmCore* core = m_toplevel->core();
GC* gc = core->GetGC();
TraitsBindingsp tb = traits->getTraitsBindings();
TraitsMetadatap tm = traits->getTraitsMetadata();
ScriptObject* o = new_object();
ArrayObject* bases = NULL;
ArrayObject* metadata = NULL;
ArrayObject* interfaces = NULL;
ArrayObject* methods = NULL;
ArrayObject* accessors = NULL;
ArrayObject* variables = NULL;
ScriptObject* constructor = NULL;
if (flags & INCLUDE_METADATA)
{
metadata = new_array();
PoolObject* class_mdpool;
const uint8_t* class_md = tm->getMetadataPos(class_mdpool);
if (class_md)
addDescribeMetadata(metadata, class_mdpool, class_md);
}
if (flags & INCLUDE_BASES)
{
bases = new_array();
for (Traitsp b = traits->base; b; b = b->base)
pushstr(bases, describeClassName(b));
}
if (flags & INCLUDE_INTERFACES)
{
interfaces = new_array();
for (InterfaceIterator iter(traits); iter.hasNext();)
{
Traits* ti = iter.next();
pushstr(interfaces, describeClassName(ti));
}
}
// constructor
if (flags & INCLUDE_CONSTRUCTOR)
{
MethodInfo* initMethod = traits->init;
if (initMethod)
{
initMethod->resolveSignature(toplevel);
MethodSignaturep ms = initMethod->getMethodSignature();
if (ms->param_count() > 0)
{
constructor = describeParams(initMethod, ms);
}
}
}
if (flags & (INCLUDE_ACCESSORS | INCLUDE_METHODS | INCLUDE_VARIABLES))
{
// recover slot/method metadata and method-declarer information.
// make a flattened set of bindings so we don't have to check for overrides as we go.
// This is not terribly efficient, but doesn't need to be.
MultinameBindingHashtable* mybind = MultinameBindingHashtable::create(gc);
addBindings(m_toplevel->core(), mybind, tb, flags);
// Don't want interface methods, so post-process and wipe out any
// bindings that were added.
for (InterfaceIterator ifc_iter(traits); ifc_iter.hasNext();)
{
Traitsp ti = ifc_iter.next();
TraitsBindingsp tbi = ti->getTraitsBindings();
StTraitsBindingsIterator iter(tbi);
while (iter.next())
{
if (!iter.key()) continue;
mybind->add(iter.key(), iter.ns(), BIND_NONE);
}
}
// yuck, replicate buggy behavior in FP9/10
RCList<Namespace> nsremoval(gc, kListInitialCapacity);
if (flags & HIDE_NSURI_METHODS)
{
for (TraitsBindingsp tbi = tb->base; tbi; tbi = tbi->base)
{
StTraitsBindingsIterator iter(tbi);
while (iter.next())
{
if (!iter.key()) continue;
Namespacep ns = iter.ns();
if (ns->getURI()->length() > 0 && nsremoval.indexOf(ns) < 0)
{
nsremoval.add(ns);
}
}
//.........这里部分代码省略.........