svn-gvsig-desktop / trunk / libraries / libjni-mrsid / include / metadata / lti_metadataWriter.h @ 3539
History | View | Annotate | Download (2.48 KB)
1 |
/* $Id: lti_metadataWriter.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 LTI_METADATA_WRITER_H
|
14 |
#define LTI_METADATA_WRITER_H
|
15 |
|
16 |
// lt_lib_base
|
17 |
#include "lt_base.h" |
18 |
|
19 |
LT_BEGIN_NAMESPACE(LizardTech) |
20 |
|
21 |
#if defined(LT_COMPILER_MS)
|
22 |
#pragma warning(push,4) |
23 |
#endif
|
24 |
|
25 |
|
26 |
class LTIMetadataDatabase; |
27 |
|
28 |
|
29 |
/**
|
30 |
* abstract class for exporting a metadata database
|
31 |
*
|
32 |
* This abstract class provides an interface for exporting metadata records
|
33 |
* from an LTIMetadataDatabase to a foreign source.
|
34 |
*
|
35 |
* This is used, for example, to provide a mechanism for writing the
|
36 |
* format-neutral, in-memory database into binary TIFF tag format. it
|
37 |
* is also used to dump the database to plain-text format (for debugging).
|
38 |
*/
|
39 |
class LTIMetadataWriter |
40 |
{ |
41 |
public:
|
42 |
/**
|
43 |
* default constructor
|
44 |
*
|
45 |
* This base constructor creates a writer object which can export
|
46 |
* records from a database to some foreign format.
|
47 |
*
|
48 |
* @param database the database to be read into
|
49 |
*/
|
50 |
LTIMetadataWriter(const LTIMetadataDatabase& database);
|
51 |
|
52 |
/**
|
53 |
* destructor
|
54 |
*/
|
55 |
virtual ~LTIMetadataWriter(); |
56 |
|
57 |
/**
|
58 |
* write records out from database
|
59 |
*
|
60 |
* This function must be implemented in the derived class. It should
|
61 |
* write each of the LTIMetadataRecord objects in the database out to
|
62 |
* the foreign format.
|
63 |
*
|
64 |
* @return status code indicating success or failure
|
65 |
*/
|
66 |
virtual LT_STATUS write() const = 0; |
67 |
|
68 |
protected:
|
69 |
/**
|
70 |
* the database to be written from
|
71 |
*
|
72 |
* This is the database to be written out from. Derived classes may access
|
73 |
* it directly.
|
74 |
*/
|
75 |
const LTIMetadataDatabase& m_database;
|
76 |
|
77 |
private:
|
78 |
// nope
|
79 |
LTIMetadataWriter(const LTIMetadataWriter&);
|
80 |
LTIMetadataWriter& operator=(const LTIMetadataWriter&);
|
81 |
}; |
82 |
|
83 |
|
84 |
LT_END_NAMESPACE(LizardTech) |
85 |
|
86 |
#if defined(LT_COMPILER_MS)
|
87 |
#pragma warning(pop)
|
88 |
#endif
|
89 |
|
90 |
#endif // LTI_METADATA_WRITER_H |