Exemple #1
0
NITFAPI(void) nitf_TextSubheader_destruct(nitf_TextSubheader ** subhdr)
{
    if (!*subhdr)
        return;

    if ((*subhdr)->extendedSection)
    {
        nitf_Extensions_destruct(&(*subhdr)->extendedSection);
    }
    if ((*subhdr)->securityGroup)
    {
        nitf_FileSecurity_destruct(&(*subhdr)->securityGroup);
        NITF_FREE((*subhdr)->securityGroup);
        (*subhdr)->securityGroup = NULL;
    }

    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_TE);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_TEXTID);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_TXTALVL);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_TXTDT);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_TXTITL);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_TSCLAS);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_ENCRYP);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_TXTFMT);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_TXSHDL);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_TXSOFL);

    NITF_FREE(*subhdr);
    *subhdr = NULL;
}
Exemple #2
0
NITFAPI(void) nitf_RESubheader_destruct(nitf_RESubheader ** subhdr)
{
    if (!*subhdr)
        return;

    if ((*subhdr)->securityGroup)
    {
        nitf_FileSecurity_destruct(&(*subhdr)->securityGroup);
        NITF_FREE((*subhdr)->securityGroup);
        (*subhdr)->securityGroup = NULL;
    }
    if ((*subhdr)->subheaderFields)
    {
        NITF_FREE((*subhdr)->subheaderFields);
        (*subhdr)->subheaderFields = NULL;
    }

    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_RE);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_RESTAG);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_RESVER);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_RESCLAS);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_RESSHL);

    NITF_FREE(*subhdr);
    *subhdr = NULL;
}
Exemple #3
0
NITFAPI(void) nitf_BandInfo_destruct(nitf_BandInfo ** info)
{
    if (*info == NULL)
        return;

    _NITF_DESTRUCT_FIELD(&(*info), NITF_IREPBAND);
    _NITF_DESTRUCT_FIELD(&(*info), NITF_ISUBCAT);
    _NITF_DESTRUCT_FIELD(&(*info), NITF_IFC);
    _NITF_DESTRUCT_FIELD(&(*info), NITF_IMFLT);
    _NITF_DESTRUCT_FIELD(&(*info), NITF_NLUTS);
    _NITF_DESTRUCT_FIELD(&(*info), NITF_NELUT);

    if (&(*info)->lut)
    {
        nitf_LookupTable_destruct(&(*info)->lut);
    }

    NITF_FREE(*info);
    *info = NULL;
}
NITFAPI(void) nitf_GraphicSubheader_destruct(nitf_GraphicSubheader **
        subhdr)
{
    if (!*subhdr)
        return;

    if ((*subhdr)->extendedSection)
    {
        nitf_Extensions_destruct(&(*subhdr)->extendedSection);
    }
    if ((*subhdr)->securityGroup)
    {
        nitf_FileSecurity_destruct(&(*subhdr)->securityGroup);
        NITF_FREE((*subhdr)->securityGroup);
        (*subhdr)->securityGroup = NULL;
    }

    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SY);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SID);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SNAME);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SSCLAS);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_ENCRYP);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SFMT);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SSTRUCT);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SDLVL);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SALVL);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SLOC);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SBND1);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SCOLOR);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SBND2);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SRES2);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SXSHDL);
    _NITF_DESTRUCT_FIELD(&(*subhdr), NITF_SXSOFL);

    NITF_FREE(*subhdr);
    *subhdr = NULL;
}