Represents a PDF object.
More...
#include <pdfsdk/cxx/object.h>
Represents a PDF object.
ISO 32000-2:2020 - 7.3 Objects
◆ Object() [1/4]
Default constructor for the Object class.
The Object will be initialized with a null PDObject.
◆ Object() [2/4]
PDF::Object::Object |
( |
PDObject | obj, |
|
|
bool | adopt = false ) |
|
noexcept |
Constructor for the Object class.
- Parameters
-
obj | The PDObject to initialize the Object with. |
adopt | Flag indicating whether the Object should adopt ownership of the PDObject. |
◆ Object() [3/4]
PDF::Object::Object |
( |
const Object & | that | ) |
|
|
noexcept |
Copy constructor for the Object class.
- Parameters
-
that | The Object to copy from. |
◆ Object() [4/4]
PDF::Object::Object |
( |
Object && | that | ) |
|
|
noexcept |
Move constructor for the Object class.
- Parameters
-
that | The Object to move from. |
◆ ArrayAdd()
void PDF::Object::ArrayAdd |
( |
const Object & | object | ) |
|
Add an Object to the array Object.
- Parameters
-
◆ ArrayGet()
Object PDF::Object::ArrayGet |
( |
size_t | index | ) |
const |
Get the Object at the specified index in the array Object.
- Parameters
-
index | The index of the Object to get. |
- Returns
- The Object at the specified index.
◆ ArrayRemove()
void PDF::Object::ArrayRemove |
( |
size_t | index | ) |
|
Remove the Object at the specified index from the array Object.
- Parameters
-
index | The index of the Object to remove. |
◆ DeepEquals()
bool PDF::Object::DeepEquals |
( |
const Object & | that | ) |
|
Check if the Object is deep equal to another Object.
- Parameters
-
that | The Object to compare with. |
- Returns
- True if the Objects are deep equal, false otherwise.
◆ detach()
Detach the underlying PDObject from the Object.
- Returns
- The detached PDObject.
◆ DictEnum()
template<class Func >
void PDF::Object::DictEnum |
( |
Func && | func | ) |
const |
Enumerate through the key-value pairs in the dictionary Object.
- Template Parameters
-
Func | The type of the function object to invoke for each key-value pair. It should have the signature bool(PDAtom key, const Object& value) . Enumerating will stop if the function returns false. |
- Parameters
-
func | The function object to invoke for each key-value pair. |
◆ DictFind()
Object PDF::Object::DictFind |
( |
PDAtom | name | ) |
const |
Find the Object with the specified name in the dictionary Object.
- Parameters
-
name | The name of the Object to find. |
- Returns
- The Object with the specified name.
◆ DictFindName()
PDAtom PDF::Object::DictFindName |
( |
PDAtom | name | ) |
const |
Find the name value with the specified name in the dictionary Object.
- Parameters
-
name | The name of the name value to find. |
- Returns
- The name value with the specified name.
◆ DictPut()
void PDF::Object::DictPut |
( |
PDAtom | name, |
|
|
const Object & | object ) |
Put an Object with the specified name into the dictionary Object.
- Parameters
-
name | The name of the Object. |
object | The Object to put. |
◆ DictPutName()
void PDF::Object::DictPutName |
( |
PDAtom | name, |
|
|
PDAtom | value ) |
Put a name value pair into the dictionary Object.
- Parameters
-
name | The name of the pair. |
value | The value of the pair. |
◆ DictRemove()
void PDF::Object::DictRemove |
( |
PDAtom | name | ) |
|
Remove the Object with the specified name from the dictionary Object.
- Parameters
-
name | The name of the Object to remove. |
◆ get()
Get the underlying PDObject.
- Returns
- The PDObject.
◆ GetArrayLength()
size_t PDF::Object::GetArrayLength |
( |
| ) |
|
Get the length of the array Object.
- Returns
- The length of the array Object.
◆ GetBoolValue()
bool PDF::Object::GetBoolValue |
( |
| ) |
const |
Get the boolean value of the Object.
- Returns
- The boolean value.
◆ GetGenNumber()
uint16_t PDF::Object::GetGenNumber |
( |
| ) |
const |
Get the generation number of the Object.
- Returns
- The generation number.
◆ GetIntValue()
int64_t PDF::Object::GetIntValue |
( |
| ) |
const |
Get the integer value of the Object.
- Returns
- The integer value.
◆ GetNameValue()
PDAtom PDF::Object::GetNameValue |
( |
| ) |
const |
Get the name value of the Object.
- Returns
- The name value.
◆ GetObjectType()
Get the type of the Object.
- Returns
- The type of the Object.
◆ GetObjNumber()
uint32_t PDF::Object::GetObjNumber |
( |
| ) |
const |
Get the object number of the Object.
- Returns
- The object number.
◆ GetRealValue()
float PDF::Object::GetRealValue |
( |
| ) |
const |
Get the real value of the Object.
- Returns
- The real value.
◆ GetStreamDict()
Object PDF::Object::GetStreamDict |
( |
| ) |
const |
Get the stream dictionary Object.
- Returns
- The stream dictionary Object.
◆ GetStringValue()
std::string PDF::Object::GetStringValue |
( |
| ) |
const |
Get the string value of the Object.
- Returns
- The string value.
◆ GetUnicodeString()
std::wstring PDF::Object::GetUnicodeString |
( |
| ) |
const |
Get the Unicode string value of the Object.
- Returns
- The Unicode string value.
◆ IsIndirect()
bool PDF::Object::IsIndirect |
( |
| ) |
const |
Check if the Object is an indirect object.
- Returns
true
if the Object is an indirect object, false
otherwise.
◆ operator bool()
PDF::Object::operator bool |
( |
| ) |
const |
|
explicitnoexcept |
Conversion operator to check if the Object is valid.
- Returns
- True if the Object is valid, false otherwise.
◆ operator!=()
bool PDF::Object::operator!= |
( |
const Object & | rhs | ) |
const |
|
noexcept |
Inequality operator for comparing two Objects.
- Parameters
-
rhs | The Object to compare with. |
- Returns
- True if the Objects are not equal, false otherwise.
◆ operator&()
Get the address of the underlying PDObject.
- Returns
- The address of the PDObject.
◆ operator=() [1/2]
Copy assignment operator for the Object class.
- Parameters
-
rhs | The Object to copy assign from. |
- Returns
- A reference to the assigned Object.
◆ operator=() [2/2]
Move assignment operator for the Object class.
- Parameters
-
rhs | The Object to move assign from. |
- Returns
- A reference to the assigned Object.
◆ operator==()
bool PDF::Object::operator== |
( |
const Object & | rhs | ) |
const |
|
noexcept |
Equality operator for comparing two Objects.
- Parameters
-
rhs | The Object to compare with. |
- Returns
- True if the Objects are equal, false otherwise.
◆ reset()
void PDF::Object::reset |
( |
PDObject | obj, |
|
|
bool | adopt = false ) |
|
noexcept |
Reset the Object with a new PDObject.
- Parameters
-
obj | The new PDObject to reset the Object with. |
adopt | Flag indicating whether the Object should adopt ownership of the PDObject. |
◆ StreamOpen()
ReadStream PDF::Object::StreamOpen |
( |
PDObjectStreamOpenMode | openMode = kPDObjectStreamOpenFiltered | ) |
|
Open a read stream for the Object.
- Parameters
-
openMode | The open mode for the read stream. |
- Returns
- The read stream.
The documentation for this class was generated from the following file: