2
1
mirror of https://github.com/qpdf/qpdf.git synced 2025-01-24 07:38:28 +00:00
qpdf/libqpdf/qpdf/QPDF_Array.hh
Tobias Hoffmann db7474e0fa Added additional array mutators
Added methods to append to arrays, insert items into arrays, and
replace array contents with a vector of items.
2012-06-20 15:29:44 -04:00

34 lines
832 B
C++

#ifndef __QPDF_ARRAY_HH__
#define __QPDF_ARRAY_HH__
#include <qpdf/QPDFObject.hh>
#include <vector>
#include <qpdf/QPDFObjectHandle.hh>
class QPDF_Array: public QPDFObject
{
public:
QPDF_Array(std::vector<QPDFObjectHandle> const& items);
virtual ~QPDF_Array();
virtual std::string unparse();
int getNItems() const;
QPDFObjectHandle getItem(int n) const;
std::vector<QPDFObjectHandle> const& getAsVector() const;
void setItem(int, QPDFObjectHandle const&);
void setFromVector(std::vector<QPDFObjectHandle> const& items);
void insertItem(int at, QPDFObjectHandle const& item);
void appendItem(QPDFObjectHandle const& item);
void eraseItem(int at);
protected:
virtual void releaseResolved();
private:
std::vector<QPDFObjectHandle> items;
};
#endif // __QPDF_ARRAY_HH__