kspread

valueconverter.h
1/* This file is part of the KDE project
2 Copyright 2004 Tomas Mecir <mecirt@gmail.com>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KSPREAD_VALUECONVERTER
21#define KSPREAD_VALUECONVERTER
22
23class TDELocale;
24
25#include "kspread_value.h"
26
27namespace KSpread {
28
29class ValueParser;
30
37 public:
40
41 Value asBoolean (const Value &value) const;
42 Value asInteger (const Value &value) const;
43 Value asFloat (const Value &value) const;
45 Value asNumeric (const Value &value) const;
46 Value asString (const Value &value) const;
47 Value asDateTime (const Value &value) const;
48 Value asDate (const Value &value) const;
49 Value asTime (const Value &value) const;
50
51 TDELocale* locale();
52
53 private:
54 ValueParser *parser;
55};
56
57
58} //KSpread namespace
59
60#endif //KSPREAD_VALUECONVERTER
61
The ValueConverter class can convert Value between various different formats.
Value asNumeric(const Value &value) const
convert to a numeric value - not necessarily float
The ValueParser parses a text input from the user, generating Value in the desired format.
Definition valueparser.h:40
Provides a wrapper for cell value.
The KSpread namespace.
Definition commands.h:39