mirror of
https://github.com/qpdf/qpdf.git
synced 2024-09-22 10:09:06 +00:00
34 lines
870 B
C++
34 lines
870 B
C++
#ifndef QPDF_STRING_HH
|
|
#define QPDF_STRING_HH
|
|
|
|
#include <qpdf/QPDFValue.hh>
|
|
|
|
// QPDF_Strings may included embedded null characters.
|
|
|
|
class QPDF_String: public QPDFValue
|
|
{
|
|
friend class QPDFWriter;
|
|
|
|
public:
|
|
~QPDF_String() override = default;
|
|
static std::shared_ptr<QPDFObject> create(std::string const& val);
|
|
static std::shared_ptr<QPDFObject> create_utf16(std::string const& utf8_val);
|
|
std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
|
|
std::string unparse() override;
|
|
std::string unparse(bool force_binary);
|
|
void writeJSON(int json_version, JSON::Writer& p) override;
|
|
std::string getUTF8Val() const;
|
|
std::string
|
|
getStringValue() const override
|
|
{
|
|
return val;
|
|
}
|
|
|
|
private:
|
|
QPDF_String(std::string const& val);
|
|
bool useHexString() const;
|
|
std::string val;
|
|
};
|
|
|
|
#endif // QPDF_STRING_HH
|