ASN1C C/C++ Common Runtime  ASN1C v7.3.x
Macros | Functions
rtCopy.h File Reference
#include "rtsrc/asn1type.h"

Go to the source code of this file.

Macros

#define RTCOPYCHARSTR(pctxt, src, dst)   do { char* ptr; rtCopyCharStr (pctxt, src, &ptr); *dst = ptr; } while(0)
 
#define RTCHKCOPYCHARSTR(pctxt, src, dst, log)
 

Functions

OSBOOL rtCopyBitStr64 (OSSIZE srcNumbits, const OSOCTET *pSrcData, OSSIZE *pDstNumbits, OSOCTET *pDstData, OSSIZE dstDataSize)
 
OSBOOL rtCopyBitStr (OSUINT32 srcNumbits, const OSOCTET *pSrcData, OSUINT32 *pDstNumbits, OSOCTET *pDstData)
 
OSBOOL rtCopyDynBitStr64 (OSCTXT *pctxt, const ASN1DynBitStr64 *pSrcData, ASN1DynBitStr64 *pDstData)
 
OSBOOL rtCopyDynBitStr (OSCTXT *pctxt, const ASN1DynBitStr *pSrcData, ASN1DynBitStr *pDstData)
 
OSBOOL rtCopyOctStr64 (OSSIZE srcNumocts, const OSOCTET *pSrcData, OSSIZE *pDstNumocts, OSOCTET *pDstData, OSSIZE dstDataSize)
 
OSBOOL rtCopyOctStr (OSUINT32 srcNumocts, const OSOCTET *pSrcData, OSUINT32 *pDstNumocts, OSOCTET *pDstData)
 
OSBOOL rtCopyDynOctStr64 (OSCTXT *pctxt, const OSDynOctStr64 *pSrcData, OSDynOctStr64 *pDstData)
 
OSBOOL rtCopyDynOctStr (OSCTXT *pctxt, const ASN1DynOctStr *pSrcData, ASN1DynOctStr *pDstData)
 
OSBOOL rtCopyCharStr (OSCTXT *pctxt, const char *srcStr, char **dstStr)
 
OSBOOL rtCopy16BitCharStr (OSCTXT *pctxt, const Asn116BitCharString *srcStr, Asn116BitCharString *dstStr)
 
OSBOOL rtCopy32BitCharStr (OSCTXT *pctxt, const Asn132BitCharString *srcStr, Asn132BitCharString *dstStr)
 
OSBOOL rtCopyOID (const ASN1OBJID *srcOID, ASN1OBJID *dstOID)
 
OSBOOL rtCopyOID64 (const ASN1OID64 *srcOID, ASN1OID64 *dstOID)
 
OSBOOL rtCopyOpenType (OSCTXT *pctxt, const ASN1OpenType *srcOT, ASN1OpenType *dstOT)
 
OSBOOL rtCopyOpenTypeExt (OSCTXT *pctxt, const OSRTDList *srcList, OSRTDList *dstList)
 

Detailed Description

Functions for copying values of primitive ASN.1 types.

Macro Definition Documentation

◆ RTCHKCOPYCHARSTR

#define RTCHKCOPYCHARSTR (   pctxt,
  src,
  dst,
  log 
)
Value:
do { \
char* ptr; \
if (! rtCopyCharStr (pctxt, src, &ptr)) { \
if (log) return LOG_RTERR (pctxt, RTERR_COPYFAIL); \
else return RTERR_COPYFAIL; \
} \
*dst = ptr; \
} while(0)
OSBOOL rtCopyCharStr(OSCTXT *pctxt, const char *srcStr, char **dstStr)
#define LOG_RTERR(pctxt, stat)
Definition: rtxError.h:79
#define RTERR_COPYFAIL
Definition: rtxErrCodes.h:612

This macro copies the source string to the destination string by calling the common runtime function rtCopyCharStr. This function allocates memory on the managed heap to store the string that will be released when rtxMemFree or ::rtFreeContext are called. This macro contains an error status check and will return a failure if needed.

Parameters
pctxtA pointer to an OSCTXT data structure.
srcThe source string.
dstThe destination string.
logWhether to log the error or just return the code.

◆ RTCOPYCHARSTR

#define RTCOPYCHARSTR (   pctxt,
  src,
  dst 
)    do { char* ptr; rtCopyCharStr (pctxt, src, &ptr); *dst = ptr; } while(0)

This macro copies the source string to the destination string by calling the common runtime function rtCopyCharStr. This function allocates memory on the managed heap to store the string that will be released when rtxMemFree or ::rtFreeContext are called.

Parameters
pctxtA pointer to an OSCTXT data structure.
srcThe source string.
dstThe destination string.