2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-23 19:39:04 +00:00
qpdf/libqpdf/qpdf/QPDF_Array.hh
Jay Berkenbilt 913eb5ac35 Add getTypeCode() and getTypeName()
Add virtual methods to QPDFObject, wrappers to QPDFObjectHandle, and
implementations to all the QPDF_Object types.
2013-01-22 10:01:45 -05:00

36 lines
936 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();
virtual QPDFObject::object_type_e getTypeCode() const;
virtual char const* getTypeName() const;
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__