summaryrefslogtreecommitdiffstats
path: root/libqpdf/qpdf/QPDF_Real.hh
blob: 793990c0abe4f091ed835ff34ea9ef016f8a4874 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef QPDF_REAL_HH
#define QPDF_REAL_HH

#include <qpdf/QPDFObject.hh>

class QPDF_Real: public QPDFObject
{
  public:
    QPDF_Real(std::string const& val);
    QPDF_Real(double value, int decimal_places, bool trim_trailing_zeroes);
    virtual ~QPDF_Real();
    virtual std::string unparse();
    virtual JSON getJSON();
    virtual QPDFObject::object_type_e getTypeCode() const;
    virtual char const* getTypeName() const;
    std::string getVal();

  private:
    // Store reals as strings to avoid roundoff errors.
    std::string val;
};

#endif // QPDF_REAL_HH