本文整理汇总了C++中StringPairArray::addArray方法的典型用法代码示例。如果您正苦于以下问题:C++ StringPairArray::addArray方法的具体用法?C++ StringPairArray::addArray怎么用?C++ StringPairArray::addArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringPairArray
的用法示例。
在下文中一共展示了StringPairArray::addArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: read
//==============================================================================
static bool read (InputStream& input, StringPairArray& metadataValues)
{
const int64 originalPos = input.getPosition();
const FileHeader cafFileHeader (input);
const bool isCafFile = cafFileHeader.fileType == chunkName ("caff");
if (isCafFile)
{
while (! input.isExhausted())
{
const ChunkHeader chunkHeader (input);
if (chunkHeader.chunkType == chunkName ("desc"))
{
AudioDescriptionChunk audioDescriptionChunk (input);
}
else if (chunkHeader.chunkType == chunkName ("uuid"))
{
UserDefinedChunk userDefinedChunk (input, chunkHeader.chunkSize);
}
else if (chunkHeader.chunkType == chunkName ("data"))
{
// -1 signifies an unknown data size so the data has to be at the
// end of the file so we must have finished the header
if (chunkHeader.chunkSize == -1)
break;
input.skipNextBytes (chunkHeader.chunkSize);
}
else if (chunkHeader.chunkType == chunkName ("midi"))
{
metadataValues.addArray (parseMidiChunk (input, chunkHeader.chunkSize));
}
else if (chunkHeader.chunkType == chunkName ("info"))
{
metadataValues.addArray (parseInformationChunk (input));
}
else
{
// we aren't decoding this chunk yet so just skip over it
input.skipNextBytes (chunkHeader.chunkSize);
}
}
}
input.setPosition (originalPos);
return isCafFile;
}
示例2: setData
//==============================================================================
static void setData (const AnalyticsDestination::AnalyticsEvent& event, StringPairArray& data)
{
data.set ("ea", event.name);
if (event.parameters.getAllKeys().contains ("label"))
data.set ("el", event.parameters.getValue ("label", {}));
data.addArray (event.userProperties);
}