Exemplo n.º 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;
}
Exemplo n.º 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;
}
Exemplo n.º 3
0
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;
}