2
2
* libopenraw - metavalue.h
4
4
* Copyright (C) 2007 Hubert Figuiere
5
* Copyright (C) 2008 Novell, Inc.
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
7
* This library is free software: you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public License
9
* as published by the Free Software Foundation, either version 3 of
10
* the License, or (at your option) any later version.
11
12
* This library is distributed in the hope that it will be useful,
12
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
15
* Lesser General Public License for more details.
16
17
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
18
* License along with this library. If not, see
19
* <http://www.gnu.org/licenses/>.
22
23
#ifndef _OPENRAW_METAVALUE_H
23
24
#define _OPENRAW_METAVALUE_H
25
#include <boost/any.hpp>
26
#include <boost/variant.hpp>
26
27
#include <libopenraw/types.h>
28
31
namespace OpenRaw {
33
MetaValue(const MetaValue &);
34
MetaValue(const boost::any &v);
35
int32_t getInteger() const
36
throw(Internals::BadTypeException);
36
typedef boost::variant<std::string, uint32_t> value_t;
38
MetaValue(const MetaValue &);
39
template <class T> MetaValue(const T &v)
43
explicit MetaValue(const value_t &v);
44
explicit MetaValue(const Internals::IFDEntry::Ref & e);
46
uint32_t getInteger() const
47
throw(Internals::BadTypeException);
48
std::string getString() const
49
throw(Internals::BadTypeException);
52
template<typename T> T get() const
53
throw(Internals::BadTypeException);
64
c-file-style:"stroustrup"
65
c-file-offsets:((innamespace . 0))