- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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 #include "RVNGString.h"
23
24 namespace librevenge
25 {
26
27 enum RVNGUnit { RVNG_INCH, RVNG_PERCENT, RVNG_POINT, RVNG_TWIP, RVNG_GENERIC, RVNG_UNIT_ERROR };
28
29 class RVNGProperty
30 {
31 public:
32 virtual ~RVNGProperty();
33 virtual int getInt() const = 0;
34 virtual double getDouble() const = 0;
36 virtual RVNGUnit getUnit() const = 0;
37 virtual RVNGString getStr() const = 0;
38 virtual RVNGProperty *clone() const = 0;
39 };
40
41 class RVNGPropertyFactory
42 {
43 public:
44 static RVNGProperty *newStringProp(const RVNGString &str);
45 static RVNGProperty *newStringProp(const char *str);
46 static RVNGProperty *newBinaryDataProp(const RVNGBinaryData &data);
47 static RVNGProperty *newBinaryDataProp(const unsigned char *buffer,
48 const unsigned long bufferSize);
49 static RVNGProperty *newIntProp(const int val);
50 static RVNGProperty *newBoolProp(const bool val);
51 static RVNGProperty *newDoubleProp(const double val);
52 static RVNGProperty *newInchProp(const double val);
53 static RVNGProperty *newPercentProp(const double val);
54 static RVNGProperty *newPointProp(const double val);
55 static RVNGProperty *newTwipProp(const double val);
56 };
57
58 }
59
60 #endif /* RVNGPROPERTY_H */
61 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
librevenge::RVNGPropertyFactory::newPointProp
static RVNGProperty * newPointProp(const double val)
Definition: RVNGProperty.cpp:447
librevenge::RVNGPropertyFactory::newIntProp
static RVNGProperty * newIntProp(const int val)
Definition: RVNGProperty.cpp:422
librevenge::RVNGProperty::clone
virtual RVNGProperty * clone() const =0
librevenge::RVNGUnit
RVNGUnit
Definition: RVNGProperty.h:27
RVNGString.h
librevenge::RVNGPropertyFactory::newBinaryDataProp
static RVNGProperty * newBinaryDataProp(const RVNGBinaryData &data)
Definition: RVNGProperty.cpp:412
librevenge::RVNGPropertyFactory::newTwipProp
static RVNGProperty * newTwipProp(const double val)
Definition: RVNGProperty.cpp:452
librevenge::RVNGPropertyFactory::newInchProp
static RVNGProperty * newInchProp(const double val)
Definition: RVNGProperty.cpp:437
librevenge::RVNGPropertyFactory::newPercentProp
static RVNGProperty * newPercentProp(const double val)
Definition: RVNGProperty.cpp:442
librevenge::RVNGPropertyFactory::newStringProp
static RVNGProperty * newStringProp(const RVNGString &str)
Definition: RVNGProperty.cpp:402
librevenge::RVNGPropertyFactory
Definition: RVNGProperty.h:41
librevenge::RVNGProperty
Definition: RVNGProperty.h:29
librevenge::RVNGProperty::getStr
virtual RVNGString getStr() const =0
librevenge::RVNG_POINT
Definition: RVNGProperty.h:27
librevenge::RVNG_UNIT_ERROR
Definition: RVNGProperty.h:27
librevenge::RVNGPropertyFactory::newDoubleProp
static RVNGProperty * newDoubleProp(const double val)
Definition: RVNGProperty.cpp:432
librevenge::RVNG_GENERIC
Definition: RVNGProperty.h:27
librevenge::RVNGBinaryData
Definition: RVNGBinaryData.h:31
librevenge::RVNGProperty::getUnit
virtual RVNGUnit getUnit() const =0
returns the property unit when possible.
librevenge::RVNG_PERCENT
Definition: RVNGProperty.h:27
librevenge::RVNGProperty::getDouble
virtual double getDouble() const =0
librevenge::RVNGPropertyFactory::newBoolProp
static RVNGProperty * newBoolProp(const bool val)
Definition: RVNGProperty.cpp:427
librevenge::RVNG_INCH
Definition: RVNGProperty.h:27
librevenge::RVNG_TWIP
Definition: RVNGProperty.h:27
librevenge::RVNGProperty::getInt
virtual int getInt() const =0
librevenge::RVNGProperty::~RVNGProperty
virtual ~RVNGProperty()
Definition: RVNGProperty.cpp:221
librevenge::RVNGString
Definition: RVNGString.h:29