chalk

kis_exif_info.h
1/*
2 * This file is part of Chalk
3 *
4 * Copyright (c) 2006 Cyrille Berger <cberger@cberger.net>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20#ifndef KIS_DOCUMENT_INFO_EXIF_H
21#define KIS_DOCUMENT_INFO_EXIF_H
22
23#include "kis_exif_value.h"
24
25#include <tqdom.h>
26#include <tqmap.h>
27
28class KisExifInfo
29{
30 public:
31 KisExifInfo();
32 virtual ~KisExifInfo();
33
34 virtual bool load(const TQDomElement& elmt);
35 virtual TQDomElement save(TQDomDocument& doc);
36
37 bool getValue(TQString name, ExifValue& value)
38 {
39 if ( m_values.find( name ) == m_values.end() ) {
40 return false;
41 }
42 else {
43 value = m_values[name];
44 return true;
45 }
46 }
47 void setValue(TQString name, ExifValue value)
48 {
49 m_values[name] = value;
50 }
51 typedef TQMap<TQString, ExifValue> evMap;
52 evMap::const_iterator begin() const { return m_values.begin(); }
53 evMap::const_iterator end() const { return m_values.end(); }
54 private:
55 evMap m_values;
56};
57
58#endif