Derived from | None |
Framework | ApplicationServices/ApplicationServices.h |
Companion guide | |
Declared in | CGPDFArray.h |
The CGPDFArray header file defines an opaque type that encapsulates a PDF array. A PDF array represents an array structure in a PDF document. PDF arrays may be heterogeneousâÂÂthat is, they may contain any other PDF objects, including PDF strings, PDF dictionaries, and other PDF arrays.
Many CGPDFArray functions to retrieve values from a PDF array take the form:
bool CGPDFArrayGet<DataType> ( |
CGPDFArrayRef array, |
size_t index, |
<DataType>Ref *value |
); |
These functions test the data type of the object at the specified index. If the object is not of the expected type, the function returns false
. If the object is of the expected type, the function returns true
, and the object is passed back in the value
parameter.
This opaque type is not derived from CFType and therefore there are no functions for retaining and releasing it. CGPDFArray objects exist only as constituent parts of a CGPDFDocument object, and they are managed by their container.
Returns whether an object at a given index in a PDF array is another PDF array and, if so, retrieves that array.
bool CGPDFArrayGetArray ( CGPDFArrayRef array, size_t index, CGPDFArrayRef *value );
A PDF array. If this parameter is not a valid PDF array, the behavior is undefined.
The index of the value to retrieve. If the index is outside the index space of the array (0
to N-1
, where N
is the count of the array), the behavior is undefined.
On input, a pointer to a PDF array. If the value at the specified index is a PDF array, then on return that array, otherwise the value is unspecified.
Returns true
if there is a PDF array at the specified index, otherwise false
.
CGPDFArray.h
Returns whether an object at a given index in a PDF array is a PDF Boolean and, if so, retrieves that Boolean.
bool CGPDFArrayGetBoolean ( CGPDFArrayRef array, size_t index, CGPDFBoolean *value );
A PDF array. If this parameter is not a valid PDF array, the behavior is undefined.
The index of the value to retrieve. If the index is outside the index space of array
(0
to N-1
, where N
is the count of array
), the behavior is undefined.
On input, a pointer to a PDF Boolean. If the value at the specified index is a PDF Boolean, then on return that Boolean, otherwise the value is undefined.
Returns true
if there is a PDF Boolean at the specified index, otherwise false
.
CGPDFArray.h
Returns the number of items in a PDF array.
size_t CGPDFArrayGetCount ( CGPDFArrayRef array );
A PDF array. If this parameter is not a valid PDF array, the behavior is undefined.
Returns the number of items in the array.
CGPDFArray.h
Returns whether an object at a given index in a PDF array is a PDF dictionary and, if so, retrieves that dictionary.
bool CGPDFArrayGetDictionary ( CGPDFArrayRef array, size_t index, CGPDFDictionaryRef *value );
A PDF array. If this parameter is not a valid PDF array, the behavior is undefined.
The index of the value to retrieve. If the index is outside the index space of the array (0
to N-1
, where N
is the count of the array), the behavior is undefined.
On input, a pointer to a PDF dictionary. If the value at the specified index is a PDF dictionary, then on return that dictionary, otherwise the value is undefined.
Returns true
if there is a PDF dictionary at the specified index, otherwise false
.
CGPDFArray.h
Returns whether an object at a given index in a PDF array is a PDF integer and, if so, retrieves that object.
bool CGPDFArrayGetInteger ( CGPDFArrayRef array, size_t index, CGPDFInteger *value );
A PDF array. If this parameter is not a valid PDF array, the behavior is undefined.
The index of the value to retrieve. If the index is outside the index space of the array (0
to N-1
, where N
is the count of the array), the behavior is undefined.
On input, a pointer to a PDF integer. If the value at the specified index is a PDF integer value, then on return contains that value, otherwise the value is undefined.
Returns true
if there is a PDF integer at the specified index, otherwise false
.
CGPDFArray.h
Returns whether an object at a given index in a PDF array is a PDF name reference (represented as a constant C string) and, if so, retrieves that name.
bool CGPDFArrayGetName ( CGPDFArrayRef array, size_t index, const char **value );
A PDF array. If this parameter is not a valid PDF array, the behavior is undefined.
The index of the value to retrieve. If the index is outside the index space of the array (0
to N-1
, where N
is the count of the array), the behavior is undefined.
An uninitialized pointer to a constant C string. If the value at the specified index is a reference to a PDF name (represented by a constant C string) then upon return, contains that value; otherwise the value is undefined.
Returns true
if there is an array of characters at the specified index, otherwise false
.
CGPDFArray.h
Returns whether an object at a given index in a Quartz PDF array is a PDF null.
bool CGPDFArrayGetNull ( CGPDFArrayRef array, size_t index );
A PDF array. If this parameter is not a valid PDF array, the behavior is undefined.
The index of the value to retrieve. If the index is outside the index space of the array (0
to N-1
, where N
is the count of the array), the behavior is undefined.
Returns true
if there is a PDF null at the specified index, otherwise false
.
CGPDFArray.h
Returns whether an object at a given index in a PDF array is a PDF number and, if so, retrieves that object.
bool CGPDFArrayGetNumber ( CGPDFArrayRef array, size_t index, CGPDFReal *value );
A PDF array. If this parameter is not a valid PDF array, the behavior is undefined.
The index of the value to retrieve. If the index is outside the index space of the array (0
to N-1
, where N
is the count of the array), the behavior is undefined.
On input, a pointer to a PDF number. If the value at the specified index is a PDF number, then on return contains that value, otherwise the value is undefined.
Returns true
if there is a PDF number at the specified index, otherwise false
.
CGPDFArray.h
Returns whether an object at a given index in a PDF array is a PDF object and, if so, retrieves that object.
bool CGPDFArrayGetObject ( CGPDFArrayRef array, size_t index, CGPDFObjectRef *value );
A PDF array. If this parameter is not a valid PDF array, the behavior is undefined.
The index of the value to retrieve. If the index is outside the index space of the array (0
to N-1
, where N
is the count of the array), the behavior is undefined.
On input, a pointer to a PDF object. If the value at the specified index is a PDF object, then on return contains that object, otherwise the value is undefined.
Returns true
if there is a PDF object at the specified index, otherwise false
.
CGPDFArray.h
Returns whether an object at a given index in a PDF array is a PDF stream and, if so, retrieves that stream.
bool CGPDFArrayGetStream ( CGPDFArrayRef array, size_t index, CGPDFStreamRef *value );
A PDF array. If this parameter is not a valid PDF array, the behavior is undefined.
The index of the value to retrieve. If the index is outside the index space of the array (0
to N-1
, where N
is the count of the array), the behavior is undefined.
On input, a pointer to a PDF stream. If the value at the specified index is a PDF stream, then on return that stream, otherwise the value is undefined.
Returns true
if there is a PDF stream at the specified index, otherwise false
.
CGPDFArray.h
Returns whether an object at a given index in a PDF array is a PDF string and, if so, retrieves that string.
bool CGPDFArrayGetString ( CGPDFArrayRef array, size_t index, CGPDFStringRef *value );
A PDF array. If this parameter is not a valid PDF array, the behavior is undefined.
The index of the value to retrieve. If the index is outside the index space of the array (0
to N-1
, where N
is the count of the array), the behavior is undefined.
On input, a pointer to a PDF string. If the value at the specified index is a PDF string, then on return that string, otherwise the value is undefined.
Returns true
if there is a PDF stream at the specified index, otherwise false
.
CGPDFArray.h
An opaque type that encapsulates a PDF array.
typedef struct CGPDFArray *CGPDFArrayRef;
CGPDFArray.h
© 2003, 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-10-15)