svn-gvsig-desktop / trunk / libraries / libjni-mrsid / include / metadata / lti_metadataDumper.h @ 3539
History | View | Annotate | Download (2.84 KB)
1 |
/* $Id: lti_metadataDumper.h 3539 2006-01-09 12:23:20Z nacho $ */
|
---|---|
2 |
/* //////////////////////////////////////////////////////////////////////////
|
3 |
// //
|
4 |
// This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, //
|
5 |
// Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
|
6 |
// prohibited. Access to and use of this code is permitted only under //
|
7 |
// license from LizardTech, Inc. Portions of the code are protected by //
|
8 |
// US and foreign patents and other filings. All Rights Reserved. //
|
9 |
// //
|
10 |
////////////////////////////////////////////////////////////////////////// */
|
11 |
/* PUBLIC */
|
12 |
|
13 |
#ifndef LTIMETADATADUMPER_H
|
14 |
#define LTIMETADATADUMPER_H
|
15 |
|
16 |
// lt_lib_mrsid_metadata
|
17 |
#include "lti_metadataWriter.h" |
18 |
|
19 |
LT_BEGIN_NAMESPACE(LizardTech) |
20 |
|
21 |
#if defined(LT_COMPILER_MS)
|
22 |
#pragma warning(push,4) |
23 |
#endif
|
24 |
|
25 |
class LTIOStreamInf; |
26 |
class LTIMetadataRecord; |
27 |
|
28 |
|
29 |
/**
|
30 |
* dumps contents of database in text form
|
31 |
*
|
32 |
* This class writes the given database in ASCII text, readable format
|
33 |
* to a stream or stdout.
|
34 |
*/
|
35 |
class LTIMetadataDumper: public LTIMetadataWriter |
36 |
{ |
37 |
public:
|
38 |
/**
|
39 |
* constructor
|
40 |
*
|
41 |
* This constructor creates an LTIMetadataWriter which will pretty-print
|
42 |
* the records in the database to a stream or to stdout.
|
43 |
*
|
44 |
* @param database the database to write from
|
45 |
* @param stream the stream to write to; if NULL, will write to stdout
|
46 |
*/
|
47 |
LTIMetadataDumper(const LTIMetadataDatabase& database,
|
48 |
LTIOStreamInf* stream); |
49 |
|
50 |
/**
|
51 |
* destructor
|
52 |
*/
|
53 |
~LTIMetadataDumper(); |
54 |
|
55 |
/**
|
56 |
* write records to stream
|
57 |
*/
|
58 |
LT_STATUS write() const;
|
59 |
|
60 |
/**
|
61 |
* write a single record to stream
|
62 |
*
|
63 |
* This function writes (pretty-prints) the given record to the stream.
|
64 |
*
|
65 |
* It is public and static because it is useful on its own for debugging.
|
66 |
*
|
67 |
* @param record the record to write
|
68 |
* @param stream the stream to write to
|
69 |
* @return status code indicating success or failure
|
70 |
*/
|
71 |
static LT_STATUS writeRecord(const LTIMetadataRecord& record, |
72 |
LTIOStreamInf& stream); |
73 |
|
74 |
|
75 |
/**
|
76 |
* INPUT_NAME metadata control
|
77 |
*
|
78 |
* Control if the IMAGE::INPUT_NAME tag is written out.
|
79 |
* This can useful for certain debugging and validation situations.
|
80 |
*
|
81 |
* The default is to always write the INPUT_NAME tag.
|
82 |
*
|
83 |
* @param enable set to true to not skip the INPUT_NAME tag
|
84 |
*/
|
85 |
void setWriteInputFilename(bool enable); |
86 |
|
87 |
private:
|
88 |
LTIOStreamInf* m_stream; |
89 |
bool m_ownsStream;
|
90 |
bool m_writeInputFilename;
|
91 |
|
92 |
// nope
|
93 |
LTIMetadataDumper(const LTIMetadataDumper&);
|
94 |
LTIMetadataDumper& operator=(const LTIMetadataDumper&);
|
95 |
}; |
96 |
|
97 |
|
98 |
LT_END_NAMESPACE(LizardTech) |
99 |
|
100 |
#if defined(LT_COMPILER_MS)
|
101 |
#pragma warning(pop)
|
102 |
#endif
|
103 |
|
104 |
#endif // LTIMETADATADUMPER_H |