/* $Id$ */
/** @file
* IPRT - ASN.1, Generic Core Type.
*/
/*
* Copyright (C) 2006-2014 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
/*
* ASN.1 Core - Special methods (for all applications of RTASN1CORE).
*/
{
{
}
return VINF_SUCCESS;
}
{
return VINF_SUCCESS;
}
{
{
}
}
RTDECL(int) RTAsn1Core_InitEx(PRTASN1CORE pAsn1Core, uint32_t uTag, uint8_t fClass, PCRTASN1COREVTABLE pOps, uint32_t fFlags)
{
return VINF_SUCCESS;
}
{
}
static int rtAsn1Core_CloneEx(PRTASN1CORE pThis, PCRTASN1CORE pSrc, PCRTASN1ALLOCATORVTABLE pAllocator, bool fCopyContent)
{
{
if (!fCopyContent)
else
{
if (RT_FAILURE(rc))
{
return rc;
}
}
}
return VINF_SUCCESS;
}
RTDECL(int) RTAsn1Core_CloneContent(PRTASN1CORE pThis, PCRTASN1CORE pSrc, PCRTASN1ALLOCATORVTABLE pAllocator)
{
}
{
}
{
int iDiff;
if (RTASN1CORE_IS_PRESENT(pLeft))
{
if (RTASN1CORE_IS_PRESENT(pRight))
{
if (!iDiff)
{
else if (!fIgnoreTagAndClass)
{
}
}
else
}
else
iDiff = -1;
}
else
return iDiff;
}
/*
* ASN.1 Core - Standard Methods.
*
* Note! Children of the ASN.1 Core doesn't normally call these, they are for
* when RTASN1CORE is used as a member type.
*/
{
"RTAsn1Core",
sizeof(RTASN1CORE),
0,
NULL,
};
{
}
RTDECL(int) RTAsn1Core_Clone(PRTASN1CORE pThis, PCRTASN1CORE pSrc, PCRTASN1ALLOCATORVTABLE pAllocator)
{
int rc;
if (RTASN1CORE_IS_PRESENT(pSrc))
{
}
else
rc = VINF_SUCCESS;
return rc;
}
{
{
}
}
RTDECL(int) RTAsn1Core_Enum(PRTASN1CORE pThis, PFNRTASN1ENUMCALLBACK pfnCallback, uint32_t uDepth, void *pvUser)
{
/* We have no children to enumerate. */
return VINF_SUCCESS;
}
{
}
RTDECL(int) RTAsn1Core_CheckSanity(PCRTASN1CORE pThis, uint32_t fFlags, PRTERRINFO pErrInfo, const char *pszErrorTag)
{
/* We can only check that it's present. */
if (!RTAsn1Core_IsPresent(pThis))
return VINF_SUCCESS;
}
/*
* Generate code for the associated collection types.
*/
#include <iprt/asn1-generator-internal-header.h>
#include <iprt/asn1-generator-core.h>
#include <iprt/asn1-generator-init.h>
#include <iprt/asn1-generator-sanity.h>