本文整理汇总了C++中AsnBuf::GrabAny方法的典型用法代码示例。如果您正苦于以下问题:C++ AsnBuf::GrabAny方法的具体用法?C++ AsnBuf::GrabAny怎么用?C++ AsnBuf::GrabAny使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AsnBuf
的用法示例。
在下文中一共展示了AsnBuf::GrabAny方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BDecContent
/* any's and these are the ONLY any's that should call this function. */
void AsnAny::BDecContent (const AsnBuf &b, AsnTag tag, AsnLen len, AsnLen &bytesDecoded)
{
long lBytesToUnget = 0;
lBytesToUnget += BytesInLen(len);
lBytesToUnget += BytesInTag(tag);
b.UnGetBytes(lBytesToUnget);
anyBuf = new AsnBuf;
b.GrabAny(*anyBuf, bytesDecoded);
}
示例2: BDec
// BDec()
//
// Decoded ANY DEFINED BY or UNKNOWN ANY from 'b'. If an ANY DEFINED
// BY is found it's will be decoded into value. If an UNKNOWN ANY is
// found it's binary values will be copied into 'anyBuf'.
//
void AsnAny::BDec (const AsnBuf &b, AsnLen &bytesDecoded)
{
FUNC("AsnAny::BDec");
// ai will be NULL if this is an ANY (not an ANY DEFINED BY)
if (ai == NULL)
{
anyBuf = new AsnBuf;
b.GrabAny(*anyBuf, bytesDecoded);
}
else
{
// the type is already known clone it and use it's BDec to decode the
// ASN.1
//
value = ai->typeToClone->Clone();
if (value == NULL)
{
throw SnaccException(STACK_ENTRY, "typeToClone->Clone() failed", INVALID_ANY);
}
else
value->BDec (b, bytesDecoded);
}
}