RVNGProperty.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2/* librevenge
3 * Version: MPL 2.0 / LGPLv2.1+
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * Major Contributor(s):
10 * Copyright (C) 2004 William Lachance (wrlach@gmail.com)
11 *
12 * For minor contributions see the git repository.
13 *
14 * Alternatively, the contents of this file may be used under the terms
15 * of the GNU Lesser General Public License Version 2.1 or later
16 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
17 * applicable instead of those above.
18 */
19
20#ifndef RVNGPROPERTY_H
21#define RVNGPROPERTY_H
22
23#include "librevenge-api.h"
24
25#include "RVNGString.h"
26
27namespace librevenge
28{
29
31
33{
34public:
35 virtual ~RVNGProperty();
36 virtual int getInt() const = 0;
37 virtual double getDouble() const = 0;
39 virtual RVNGUnit getUnit() const = 0;
40 virtual RVNGString getStr() const = 0;
41 virtual RVNGProperty *clone() const = 0;
42};
43
45{
46public:
47 static RVNGProperty *newStringProp(const RVNGString &str);
48 static RVNGProperty *newStringProp(const char *str);
50 static RVNGProperty *newBinaryDataProp(const unsigned char *buffer,
51 const unsigned long bufferSize);
52 static RVNGProperty *newIntProp(const int val);
53 static RVNGProperty *newBoolProp(const bool val);
54 static RVNGProperty *newDoubleProp(const double val);
55 static RVNGProperty *newInchProp(const double val);
56 static RVNGProperty *newPercentProp(const double val);
57 static RVNGProperty *newPointProp(const double val);
58 static RVNGProperty *newTwipProp(const double val);
59};
60
61}
62
63#endif /* RVNGPROPERTY_H */
64/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
A representation of arbitrary binary data.
Definition RVNGBinaryData.h:37
Definition RVNGProperty.h:45
static RVNGProperty * newPercentProp(const double val)
Definition RVNGProperty.cpp:442
static RVNGProperty * newDoubleProp(const double val)
Definition RVNGProperty.cpp:432
static RVNGProperty * newPointProp(const double val)
Definition RVNGProperty.cpp:447
static RVNGProperty * newIntProp(const int val)
Definition RVNGProperty.cpp:422
static RVNGProperty * newBoolProp(const bool val)
Definition RVNGProperty.cpp:427
static RVNGProperty * newTwipProp(const double val)
Definition RVNGProperty.cpp:452
static RVNGProperty * newInchProp(const double val)
Definition RVNGProperty.cpp:437
static RVNGProperty * newBinaryDataProp(const RVNGBinaryData &data)
Definition RVNGProperty.cpp:412
static RVNGProperty * newStringProp(const RVNGString &str)
Definition RVNGProperty.cpp:402
Definition RVNGProperty.h:33
virtual RVNGString getStr() const =0
virtual RVNGProperty * clone() const =0
virtual double getDouble() const =0
virtual int getInt() const =0
virtual RVNGUnit getUnit() const =0
returns the property unit when possible.
UTF-8 string.
Definition RVNGString.h:34
#define REVENGE_API
Definition librevenge-api.h:34
Definition RVNGBinaryData.cpp:40
RVNGUnit
Definition RVNGProperty.h:30
@ RVNG_GENERIC
Definition RVNGProperty.h:30
@ RVNG_INCH
Definition RVNGProperty.h:30
@ RVNG_POINT
Definition RVNGProperty.h:30
@ RVNG_PERCENT
Definition RVNGProperty.h:30
@ RVNG_TWIP
Definition RVNGProperty.h:30
@ RVNG_UNIT_ERROR
Definition RVNGProperty.h:30

Generated for librevenge by doxygen 1.14.0