Simple PIXMTA example issue #397
Replies: 3 comments 1 reply
-
As an added info. The valid fields printed when using the std::cout when iterating over the TRE NUMAIS |
Beta Was this translation helpful? Give feedback.
-
I don't see the exception.
(which is essentially your code with the compiles and runs. |
Beta Was this translation helpful? Give feedback.
-
That is odd. After running cmake and then building the library with make and installing in /opt there was an empty /opt/include/std directory. Trying to compile this testpixmta.cpp example it complained about the nonexistence of <std/bit> I then created a subdirectory ubder /opt/include called nitrostd and copied the files in externals/coda-oss/modules/c++/std/include/std to this directory and then the code compiled fine. There appears to be files in std created to satisfy C++ 11 compilers for C++ 17 like bit, cstddef, filesystem etc... mutable nitf_Error error{}; where the compiler complained about no initializer. What OS and compiler are you running? |
Beta Was this translation helpful? Give feedback.
-
#include
#include <nitf/TRE.hpp>
int main()
{
nitf::TRE tre( "PIXMTA" , "PIXMTA" );
tre.setField("NUMAIS", 1);
#if 1
nitf::TREFieldIterator it = tre.begin();
while( it != tre.end() )
{
nitf::Pair pr = *it;
// std::cout << pr.first() << "\n";
++it;
}
#endif
tre.setField("AISDLVL[0]", 1);
tre.setField("SCALE_X", "1.2");
}
When I compile and run the above example. It runs without error. However If I change the #if 1 to #if 0 an exception is thrown due to AISDLVL[0]. Why is that? Its a valid field
Beta Was this translation helpful? Give feedback.
All reactions