RVNGProperty.h Source File documentation

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
30 enum RVNGUnit { RVNG_INCH, RVNG_PERCENT, RVNG_POINT, RVNG_TWIP, RVNG_GENERIC, RVNG_UNIT_ERROR };
31
32 class REVENGE_API RVNGProperty
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
44 class REVENGE_API RVNGPropertyFactory
45{
46public:
47 static RVNGProperty *newStringProp(const RVNGString &str);
48 static RVNGProperty *newStringProp(const char *str);
49 static RVNGProperty *newBinaryDataProp(const RVNGBinaryData &data);
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: */
RVNGString.h
librevenge::RVNGBinaryData
A representation of arbitrary binary data.
Definition RVNGBinaryData.h:37
librevenge::RVNGPropertyFactory
Definition RVNGProperty.h:45
librevenge::RVNGPropertyFactory::newPercentProp
static RVNGProperty * newPercentProp(const double val)
Definition RVNGProperty.cpp:442
librevenge::RVNGPropertyFactory::newDoubleProp
static RVNGProperty * newDoubleProp(const double val)
Definition RVNGProperty.cpp:432
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::RVNGPropertyFactory::newBoolProp
static RVNGProperty * newBoolProp(const bool val)
Definition RVNGProperty.cpp:427
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::newBinaryDataProp
static RVNGProperty * newBinaryDataProp(const RVNGBinaryData &data)
Definition RVNGProperty.cpp:412
librevenge::RVNGPropertyFactory::newStringProp
static RVNGProperty * newStringProp(const RVNGString &str)
Definition RVNGProperty.cpp:402
librevenge::RVNGProperty
Definition RVNGProperty.h:33
librevenge::RVNGProperty::getStr
virtual RVNGString getStr() const =0
librevenge::RVNGProperty::clone
virtual RVNGProperty * clone() const =0
librevenge::RVNGProperty::getDouble
virtual double getDouble() const =0
librevenge::RVNGProperty::getInt
virtual int getInt() const =0
librevenge::RVNGProperty::getUnit
virtual RVNGUnit getUnit() const =0
returns the property unit when possible.
librevenge::RVNGString
UTF-8 string.
Definition RVNGString.h:34
librevenge-api.h
REVENGE_API
#define REVENGE_API
Definition librevenge-api.h:34
librevenge
Definition RVNGBinaryData.cpp:40
librevenge::RVNGUnit
RVNGUnit
Definition RVNGProperty.h:30
librevenge::RVNG_GENERIC
@ RVNG_GENERIC
Definition RVNGProperty.h:30
librevenge::RVNG_INCH
@ RVNG_INCH
Definition RVNGProperty.h:30
librevenge::RVNG_POINT
@ RVNG_POINT
Definition RVNGProperty.h:30
librevenge::RVNG_PERCENT
@ RVNG_PERCENT
Definition RVNGProperty.h:30
librevenge::RVNG_TWIP
@ RVNG_TWIP
Definition RVNGProperty.h:30
librevenge::RVNG_UNIT_ERROR
@ RVNG_UNIT_ERROR
Definition RVNGProperty.h:30