diff options
Diffstat (limited to 'libqpdf/qpdf/QPDF_Array.hh')
-rw-r--r-- | libqpdf/qpdf/QPDF_Array.hh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libqpdf/qpdf/QPDF_Array.hh b/libqpdf/qpdf/QPDF_Array.hh index ac5d98be..e718c6e0 100644 --- a/libqpdf/qpdf/QPDF_Array.hh +++ b/libqpdf/qpdf/QPDF_Array.hh @@ -10,9 +10,10 @@ class QPDF_Array: public QPDFObject { public: - QPDF_Array(std::vector<QPDFObjectHandle> const& items); - QPDF_Array(SparseOHArray const& items); virtual ~QPDF_Array() = default; + static std::shared_ptr<QPDFObject> create(std::vector<QPDFObjectHandle> const& items); + static std::shared_ptr<QPDFObject> create(SparseOHArray const& items); + virtual std::shared_ptr<QPDFObject> shallowCopy(); virtual std::string unparse(); virtual JSON getJSON(int json_version); virtual QPDFObject::object_type_e getTypeCode() const; @@ -31,13 +32,14 @@ class QPDF_Array: public QPDFObject // Helper methods for QPDF and QPDFObjectHandle -- these are // public methods since the whole class is not part of the public // API. Otherwise, these would be wrapped in accessor classes. - SparseOHArray const& getElementsForShallowCopy() const; void addExplicitElementsToList(std::list<QPDFObjectHandle>&) const; protected: virtual void releaseResolved(); private: + QPDF_Array(std::vector<QPDFObjectHandle> const& items); + QPDF_Array(SparseOHArray const& items); SparseOHArray elements; }; |