core
vil
file_formats
vil_nitf2.h
Go to the documentation of this file.
1
// vil_nitf2: Written by Rob Radtke (rob@) and Harry Voorhees (hlv@) of
2
// Stellar Science Ltd. Co. (stellarscience.com) for
3
// Air Force Research Laboratory, 2005.
4
5
#ifndef VIL_NITF2_H
6
#define VIL_NITF2_H
7
8
#include <
vil/vil_stream.h
>
9
10
// These typedefs serve to maintain the method signatures' distinction between
11
// input and output streams, at least until we decide that such distinction is
12
// no longer useful.
13
typedef
vil_stream
vil_nitf2_istream
;
14
typedef
vil_stream
vil_nitf2_ostream
;
15
16
// Some of the integer values stored in nitf 2.x headers can be
17
// larger than 2^32. That's why we have vil_nitf2_long_long_formatter.
18
// We use this typedef so systems that don't have 64 bit integers
19
// can still use the class. Of course they will break if they try to
20
// read a header that contains a value greater than 2^32. Fortunately,
21
// that is somewhat rare.
22
#include <vxl_config.h>
23
#if VXL_HAS_INT_64
24
typedef
vxl_int_64
vil_nitf2_long
;
25
#else
26
typedef
vxl_int_32
vil_nitf2_long
;
27
#endif
28
29
// Wrapper class for shared enums and static variables, to avoid circular
30
// dependencies among classes
31
//
32
class
vil_nitf2
33
{
34
public
:
35
// NITF field data types supported
36
enum
enum_field_type
{
type_undefined
=0,
37
type_int
,
type_long_long
,
type_double
,
38
type_char
,
type_string
,
type_binary
,
39
type_location
,
type_date_time
,
40
type_tagged_record_sequence
};
41
42
// Controls the level of detail of logging to std::cout.
43
// All errors are logged to std::cerr, irrespective of log level.
44
enum
enum_log_level
{
log_none
=0,
log_info
,
log_debug
};
45
46
// Logging level for all vil_nitf classes. This could be generalized to an
47
// array, if different subsets of classes want their own logging levels.
48
static
enum_log_level
s_log_level
;
49
/**
50
* Call this function to flush all of the nitf2 classes statically
51
* allocated memory. Usually, you'd want to do this just before
52
* your application terminates or after you're done using vil_nitf2
53
* related classes. It's not a big deal if you call it too early (or often),
54
* the vil_nitf2 classes are smart enough to re-generate these members if
55
* they are needed later
56
*/
57
static
void
cleanup_static_members
();
58
};
59
60
61
62
63
#define VIL_NITF2_LOG(LEVEL) \
64
if (vil_nitf2::s_log_level < vil_nitf2::LEVEL) ; else std::cout
65
66
#endif // VIL_NITF2_H
vil_nitf2::type_location
Definition:
vil_nitf2.h:39
vil_nitf2::type_tagged_record_sequence
Definition:
vil_nitf2.h:40
vil_nitf2::log_none
Definition:
vil_nitf2.h:44
vil_stream.h
Stream interface for VIL image loaders.
vil_nitf2_long
vxl_int_32 vil_nitf2_long
Definition:
vil_nitf2.h:26
vil_nitf2::type_int
Definition:
vil_nitf2.h:37
vil_nitf2::log_debug
Definition:
vil_nitf2.h:44
vil_nitf2::type_long_long
Definition:
vil_nitf2.h:37
vil_nitf2::type_string
Definition:
vil_nitf2.h:38
vil_nitf2::type_binary
Definition:
vil_nitf2.h:38
vil_nitf2_istream
vil_stream vil_nitf2_istream
Definition:
vil_nitf2.h:13
vil_stream
Stream interface for VIL image loaders.
Definition:
vil_stream.h:21
vil_nitf2::enum_field_type
enum_field_type
Definition:
vil_nitf2.h:36
vil_nitf2::type_date_time
Definition:
vil_nitf2.h:39
vil_nitf2_ostream
vil_stream vil_nitf2_ostream
Definition:
vil_nitf2.h:14
vil_nitf2::s_log_level
static enum_log_level s_log_level
Definition:
vil_nitf2.h:48
vil_nitf2::type_double
Definition:
vil_nitf2.h:37
vil_nitf2
Definition:
vil_nitf2.h:32
vil_nitf2::log_info
Definition:
vil_nitf2.h:44
vil_nitf2::type_char
Definition:
vil_nitf2.h:38
vil_nitf2::cleanup_static_members
static void cleanup_static_members()
Call this function to flush all of the nitf2 classes statically allocated memory.
Definition:
vil_nitf2.cxx:14
vil_nitf2::enum_log_level
enum_log_level
Definition:
vil_nitf2.h:44
vil_nitf2::type_undefined
Definition:
vil_nitf2.h:36
Generated by
1.8.15