Skip to content

Commit

Permalink
setup remaining TREs for pre-loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Smith committed Dec 19, 2023
1 parent a62d494 commit c7c30bd
Show file tree
Hide file tree
Showing 85 changed files with 348 additions and 185 deletions.
5 changes: 0 additions & 5 deletions modules/c++/nitf/unittests/test_load_plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ static const auto& all_TREs()
{
static const std::vector<std::string> retval
{
#if _MSC_VER && NITRO_PCH
// only build a handful in Visual Studio
"ACCHZB", "ACCPOB", "ACFTA", "AIMIDB", "CSCRNA", "CSEXRB", "ENGRDA", "HISTOA", "JITCID", "PTPRAA", "RPFHDR",
#else
"ACCHZB", "BANDSB", "CSDIDA", "GEOLOB", "JITCID", "NBLOCA", "PIAPEB", "REGPTB", "RSMIDA", "STEROB",
"ACCPOB", "BCKGDA", "CSEPHA", "GEOPSB", "MAPLOB", "OBJCTA", "PIAPRC", "RPC00B", "RSMPCA", "STREOB",
"ACCVTB", "BLOCKA", "CSEXRA", "GRDPSB", "MATESA", "OFFSET", "PIAPRD", "RPFDES", "RSMPIA", "TEST_DES",
Expand All @@ -63,7 +59,6 @@ static const auto& all_TREs()
"AIPBCA", "CMETAA", "EXOPTA", "IMRFCA", "MSTGTA", "PIAIMB", "PRADAA", "RSMECA", "SNSRA",
"ASTORA", "CSCCGA", "EXPLTA", "IOMAPA", "MTIRPA", "PIAIMC", "PRJPSB", "RSMGGA", "SOURCB",
"BANDSA", "CSCRNA", "EXPLTB", "J2KLRA", "MTIRPB", "PIAPEA", "PTPRAA", "RSMGIA", "STDIDC",
#endif
};
return retval;
}
Expand Down
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/ACCVTB.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription ACCVTB_description[] = {
{NITF_BCS_N, 2, "Number of vertical accuracy regions",
"NUMACVT" },
{NITF_LOOP, 0, NULL, "NUMACVT"},
Expand All @@ -46,6 +46,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(ACCVTB, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(ACCVTB)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/ACFTB.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription ACFTB_description[] = {
{NITF_BCS_A, 20, "Aircraft Mission ID", "AC_MSN_ID" },
{NITF_BCS_A, 10, "Aircraft Tail Number", "AC_TAIL_NO" },
{NITF_BCS_A, 12, "Acrft Takeoff Date/Time", "AC_TO" },
Expand Down Expand Up @@ -56,6 +56,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(ACFTB, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(ACFTB)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/AIPBCA.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription AIPBCA_description[] = {
{NITF_BCS_N, 5, "Patch Width", "Patch_Width", },
{NITF_BCS_A, 16, "Semi-major axis (x component)", "u_hat_x" },
{NITF_BCS_A, 16, "Semi-major axis (y component)", "u_hat_y" },
Expand Down Expand Up @@ -78,6 +78,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(AIPBCA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(AIPBCA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/ASTORA.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription ASTORA_description[] = {

{NITF_BCS_N, 6, "Number of rows in full image prod.", "IMG_TOTAL_ROWS" },
{NITF_BCS_N, 6, "Number of columns in full image prod.",
Expand Down Expand Up @@ -174,6 +174,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(ASTORA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(ASTORA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/BANDSA.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription BANDSA_description[] = {
{NITF_BCS_A, 7, "ROW_SPACING", "ROW_SPACING" },
{NITF_BCS_A, 1, "ROW_SPACING_UNITS", "ROW_SPACING_UNITS" },
{NITF_BCS_A, 7, "COL_SPACING", "COL_SPACING" },
Expand All @@ -45,6 +45,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(BANDSA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(BANDSA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/BANDSB.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription BANDSB_description[] = {
{NITF_BCS_N, 5, "Number of Bands", "COUNT" },
{NITF_BCS_A, 24, "Data Representation", "RADIOMETRIC_QUANTITY" },
{NITF_BCS_A, 1, "Data Representation Unit", "RADIOMETRIC_QUANTITY_UNIT" },
Expand Down Expand Up @@ -191,7 +191,7 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(BANDSB, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(BANDSB)

NITF_CXX_ENDGUARD

Expand Down
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/BCKGDA.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription BCKGDA_description[] = {
{NITF_BCS_N, 8, "Background Width", "BGWIDTH" },
{NITF_BCS_N, 8, "Background Height", "BGHEIGHT" },
{NITF_BCS_N, 8, "Background Red", "BGRED" },
Expand All @@ -35,6 +35,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(BCKGDA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(BCKGDA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/BLOCKA.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription BLOCKA_description[] = {
{NITF_BCS_N, 2, "Block Number", "BLOCK_INSTANCE" },
{NITF_BCS_A, 5, "No. of Gray Pixels", "N_GRAY" },
{NITF_BCS_N, 5, "Lines", "L_LINES" },
Expand All @@ -40,6 +40,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(BLOCKA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(BLOCKA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/BNDPLB.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription BNDPLB_description[] = {
{NITF_BCS_N, 4, "Number of Points in Bounding Polygon", "NUMPTS" },
{NITF_LOOP, 0, NULL, "NUMPTS"},
{NITF_BCS_N, 15, "Longitude/Easting", "LON" },
Expand All @@ -33,6 +33,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(BNDPLB, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(BNDPLB)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/CCINFA.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription CCINFA_description[] = {
{NITF_BCS_N, 3, "Number of defined codes", "NUMCODE" },
{NITF_LOOP, 0, NULL, "NUMCODE"},
{NITF_BCS_N, 1, "Length of the CODE field", "CODE_LEN" },
Expand All @@ -43,6 +43,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(CCINFA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(CCINFA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/CLCTNA.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription CLCTNA_description[] = {
{NITF_BCS_N, 4, "VERNUM", "VERNUM" },
{NITF_BCS_A, 25, "CLCTN_NAME", "CLCTN_NAME" },
{NITF_BCS_A, 255, "CLCTN_DESCRIPT", "CLCTN_DESCRIPT" },
Expand Down Expand Up @@ -57,6 +57,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(CLCTNA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(CLCTNA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/CLCTNB.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription CLCTNB_description[] = {
{NITF_BCS_N, 4, "VERNUM", "VERNUM" },
{NITF_BCS_A, 25, "CLCTN_NAME", "CLCTN_NAME" },
{NITF_BCS_A, 255, "CLCTN_DESCRIPT", "CLCTN_DESCRIPT" },
Expand Down Expand Up @@ -61,6 +61,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(CLCTNB, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(CLCTNB)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/CMETAA.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription CMETAA_description[] = {
{NITF_BCS_N, 2, "Number of Related TREs", "RELATED_TRES" },
{NITF_BCS_A, 120, "Related TREs", "ADDITIONAL_TRES" },
{NITF_BCS_A, 12, "Processor Version No.", "RD_PRC_NO" },
Expand Down Expand Up @@ -238,6 +238,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(CMETAA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(CMETAA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/CSCCGA.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription CSCCGA_description[] = {
{NITF_BCS_A, 18, "Source of Grid", "CCG_SOURCE" },
{NITF_BCS_A, 6, "Image Segment Sensor to which CCG is registered", "REG_SENSOR" },
{NITF_BCS_N, 7, "CCG Origin - Line", "ORIGIN_LINE" },
Expand All @@ -37,6 +37,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(CSCCGA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(CSCCGA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/CSDIDA.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription CSDIDA_description[] = {
{NITF_BCS_N, 2, "Day of Dataset Collection", "DAY" },
{NITF_BCS_A, 3, "Month of Dataset Collection", "MONTH" },
{NITF_BCS_N, 4, "Year of Dataset Collection", "YEAR" },
Expand All @@ -47,7 +47,7 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(CSDIDA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(CSDIDA)

NITF_CXX_ENDGUARD

4 changes: 2 additions & 2 deletions modules/c/nitf/shared/CSEPHA.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription CSEPHA_description[] = {
{NITF_BCS_A, 12, "ephemeris flag", "EPHEM_FLAG" },
{NITF_BCS_N, 5, "time b/w eph vectors", "DT_EPHEM" },
{NITF_BCS_N, 8, "day of first eph vector", "DATE_EPHEM" },
Expand All @@ -39,6 +39,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(CSEPHA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(CSEPHA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/CSEXRA.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription CSEXRA_description[] = {
{NITF_BCS_A, 6, "Sensor", "SENSOR" },
{NITF_BCS_N, 12, "Time of the First Line of Image", "TIME_FIRST_LINE_IMAGE" },
{NITF_BCS_N, 12, "Image Duration Time", "TIME_IMAGE_DURATION" },
Expand Down Expand Up @@ -52,6 +52,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(CSEXRA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(CSEXRA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/CSPROA.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription CSPROA_description[] = {
{NITF_BCS_A, 12, "fill0", "RESERVED_0" },
{NITF_BCS_A, 12, "fill1", "RESERVED_1" },
{NITF_BCS_A, 12, "fill2", "RESERVED_2" },
Expand All @@ -39,6 +39,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(CSPROA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(CSPROA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/CSSFAA.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription CSSFAA_description[] = {
{NITF_BCS_N, 1, "number of bands", "NUM_BANDS" },
{NITF_LOOP, 0, NULL, "NUM_BANDS"},
{NITF_BCS_A, 1, "band category", "BAND_TYPE" },
Expand All @@ -45,6 +45,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(CSSFAA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(CSSFAA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/CSSHPA.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription CSSHPA_description[] = {
{NITF_BCS_A, 25, "Shapefile Use", "SHAPE_USE" },
{NITF_BCS_A, 10, "Type of shapes", "SHAPE_CLASS" },
{NITF_IF, 0, "eq CLOUD_SHAPES ", "SHAPE_USE"},
Expand All @@ -40,6 +40,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(CSSHPA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(CSSHPA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/EXOPTA.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

NITF_CXX_GUARD

static nitf_TREDescription description[] = {
static nitf_TREDescription EXOPTA_description[] = {
{NITF_BCS_A, 3, "ANGLE TO NORTH", "ANGLETONORTH" },
{NITF_BCS_A, 5, "MEAN GSD", "MEANGSD" },
{NITF_BCS_A, 1, "Reserved 1", "RESERV01" },
Expand All @@ -46,6 +46,6 @@ static nitf_TREDescription description[] = {
{NITF_END, 0, NULL, NULL}
};

NITF_DECLARE_SINGLE_PLUGIN(EXOPTA, description)
NITF_DECLARE_SINGLE_PLUGIN_SIMPLE(EXOPTA)

NITF_CXX_ENDGUARD
4 changes: 2 additions & 2 deletions modules/c/nitf/shared/EXPLTA.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ static nitf_TREDescription descrip_00101[] = {
};

/* Define the available descriptions and the default one */
static nitf_TREDescriptionInfo descriptions[] = {
static nitf_TREDescriptionInfo EXPLTA_descriptions[] = {
{ "EXPLTA_87", descrip_00087, 87 },
{ "EXPLTA_101", descrip_00101, 101 },
{ NULL, NULL, NITF_TRE_DESC_NO_LENGTH }
};
static nitf_TREDescriptionSet EXPLTADescriptionSet = { 0, descriptions };
static nitf_TREDescriptionSet EXPLTADescriptionSet = { 0, EXPLTA_descriptions };

NITF_DECLARE_PLUGIN(EXPLTA)

Expand Down
Loading

0 comments on commit c7c30bd

Please sign in to comment.