本文整理汇总了C++中ArrayOf::Clone方法的典型用法代码示例。如果您正苦于以下问题:C++ ArrayOf::Clone方法的具体用法?C++ ArrayOf::Clone怎么用?C++ ArrayOf::Clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArrayOf
的用法示例。
在下文中一共展示了ArrayOf::Clone方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ObtainAttributes
ECode CResources::ObtainAttributes(
/* [in] */ IAttributeSet* set,
/* [in] */ const ArrayOf<Int32>& attrs,
/* [out] */ ITypedArray** array)
{
VALIDATE_NOT_NULL(set);
VALIDATE_NOT_NULL(array);
*array = NULL;
Int32 len = attrs.GetLength();
FAIL_RETURN(GetCachedStyledAttributes(len, array));
// XXX note that for now we only work with compiled XML files.
// To support generic XML files we will need to manually parse
// out the attributes from the XML file (applying type information
// contained in the resources and such).
AutoPtr<CTypedArray> a = (CTypedArray*)*array;
AutoPtr<XmlBlock::Parser> parser = (XmlBlock::Parser*)set;
mAssets->RetrieveAttributes(
parser->mParseState, attrs, *a->mData, *a->mIndices);
a->mRsrcs = attrs.Clone();
a->mXml = parser;
return NOERROR;
}
示例2: constructor
ECode CTestFeaturesSession::constructor(
/* [in] */ Handle32 accounts,
/* [in] */ IAccountManagerResponse* response,
/* [in] */ IAccount* account,
/* [in] */ const ArrayOf<String>& features,
/* [in] */ IIAccountManager* host)
{
String type;
account->GetType(&type);
FAIL_RETURN(Init((UserAccounts*)accounts, response,
type, FALSE /* expectActivityLaunch */,
TRUE /* stripAuthTokenFromResult */, (CAccountManagerService*)host));
mFeatures = features.Clone();
mAccount = account;
return NOERROR;
}