#include <PdfArray.h>
This class represents a PdfArray Use it for all arrays that are written to a PDF file.
A PdfArray can hold any PdfVariant.
- See also
- PdfVariant
◆ PdfArray() [1/3]
PoDoFo::PdfArray::PdfArray |
( |
| ) |
|
◆ PdfArray() [2/3]
PoDoFo::PdfArray::PdfArray |
( |
const PdfObject & |
var | ) |
|
|
explicit |
Create an array and add one value to it. The value is copied.
- Parameters
-
var | add this object to the array. |
◆ PdfArray() [3/3]
PoDoFo::PdfArray::PdfArray |
( |
const PdfArray & |
rhs | ) |
|
Deep copy an existing PdfArray
- Parameters
-
◆ back() [1/2]
- Returns
- a read/write reference to the data at the last element of the array.
◆ back() [2/2]
const PdfObject & PoDoFo::PdfArray::back |
( |
| ) |
const |
|
inline |
- Returns
- a read-only (constant) reference to the data at the last element of the array.
◆ begin() [1/2]
PdfArray::iterator PoDoFo::PdfArray::begin |
( |
| ) |
|
|
inline |
Returns a read/write iterator that points to the first element in the array. Iteration is done in ordinary element order.
◆ begin() [2/2]
PdfArray::const_iterator PoDoFo::PdfArray::begin |
( |
| ) |
const |
|
inline |
Returns a read-only (constant) iterator that points to the first element in the array. Iteration is done in ordinary element order.
◆ Clear()
void PoDoFo::PdfArray::Clear |
( |
| ) |
|
|
inline |
Remove all elements from the array
◆ clear()
void PoDoFo::PdfArray::clear |
( |
| ) |
|
Remove all elements from the array
◆ ContainsString()
bool PoDoFo::PdfArray::ContainsString |
( |
const std::string & |
cmpString | ) |
const |
Utility method to determine if the array contains contains any objects of ePdfDataType_String whose value is the passed string.
- Parameters
-
cmpString | the string to compare against |
- Returns
- true if success, false if not
◆ empty()
bool PoDoFo::PdfArray::empty |
( |
| ) |
const |
|
inline |
- Returns
- true if the array is empty.
◆ end() [1/2]
PdfArray::iterator PoDoFo::PdfArray::end |
( |
| ) |
|
|
inline |
Returns a read/write iterator that points one past the last element in the array. Iteration is done in ordinary element order.
◆ end() [2/2]
PdfArray::const_iterator PoDoFo::PdfArray::end |
( |
| ) |
const |
|
inline |
Returns a read-only (constant) iterator that points one past the last element in the array. Iteration is done in ordinary element order.
◆ FindAt()
const PdfObject * PoDoFo::PdfArray::FindAt |
( |
size_type |
idx | ) |
const |
|
inline |
Get the object at the given index out of the array.
Lookup in the indirect objects as well, if the shallow object was a reference. The returned value is a pointer to the internal object in the dictionary so it MUST not be deleted.
- Parameters
-
- Returns
- pointer to the found value. NULL if the index was out of the boundaries
◆ front() [1/2]
- Returns
- a read/write reference to the data at the first element of the array.
◆ front() [2/2]
const PdfObject & PoDoFo::PdfArray::front |
( |
| ) |
const |
|
inline |
- Returns
- a read-only (constant) reference to the data at the first element of the array.
◆ GetSize()
size_t PoDoFo::PdfArray::GetSize |
( |
| ) |
const |
|
inline |
- Returns
- the size of the array
◆ GetStringIndex()
size_t PoDoFo::PdfArray::GetStringIndex |
( |
const std::string & |
cmpString | ) |
const |
Utility method to return the actual index in the array which contains an object of ePdfDataType_String whose value is the passed string.
- Parameters
-
cmpString | the string to compare against |
- Returns
- true if success, false if not
◆ IsDirty()
bool PoDoFo::PdfArray::IsDirty |
( |
| ) |
const |
|
virtual |
The dirty flag is set if this variant has been modified after construction.
Usually the dirty flag is also set if you call any non-const member function as we cannot determine if you actually changed something or not.
- Returns
- true if the value is dirty and has been modified since construction
Reimplemented from PoDoFo::PdfDataType.
◆ operator=()
assignment operator
- Parameters
-
◆ push_back()
void PoDoFo::PdfArray::push_back |
( |
const PdfObject & |
var | ) |
|
|
inline |
Adds a PdfObject to the array
- Parameters
-
This will set the dirty flag of this object.
- See also
- IsDirty
◆ rbegin() [1/2]
PdfArray::reverse_iterator PoDoFo::PdfArray::rbegin |
( |
| ) |
|
|
inline |
Returns a read/write reverse iterator that points to the last element in the array. Iteration is done in reverse element order.
◆ rbegin() [2/2]
PdfArray::const_reverse_iterator PoDoFo::PdfArray::rbegin |
( |
| ) |
const |
|
inline |
Returns a read-only (constant) reverse iterator that points to the last element in the array. Iteration is done in reverse element order.
◆ rend() [1/2]
PdfArray::reverse_iterator PoDoFo::PdfArray::rend |
( |
| ) |
|
|
inline |
Returns a read/write reverse iterator that points to one before the first element in the array. Iteration is done in reverse element order.
◆ rend() [2/2]
PdfArray::const_reverse_iterator PoDoFo::PdfArray::rend |
( |
| ) |
const |
|
inline |
Returns a read-only (constant) reverse iterator that points to one before the first element in the array. Iteration is done in reverse element order.
◆ resize()
Resize the internal vector.
- Parameters
-
count | new size |
value | refernce value |
◆ SetDirty()
void PoDoFo::PdfArray::SetDirty |
( |
bool |
bDirty | ) |
|
|
virtual |
◆ size()
size_t PoDoFo::PdfArray::size |
( |
| ) |
const |
|
inline |
- Returns
- the size of the array
◆ Write()
Write the array to an output device. This is an overloaded member function.
- Parameters
-
pDevice | write the object to this device |
eWriteMode | additional options for writing this object |
pEncrypt | an encryption object which is used to encrypt this object or NULL to not encrypt this object |
Implements PoDoFo::PdfDataType.