![]() |
#include <Obj.h>
Public Types | |
enum | Type { e_null, e_bool, e_number, e_name, e_string, e_dict, e_array, e_stream } |
The object type. More... | |
Public Member Functions | |
Type | GetType () const |
bool | IsBool () const |
bool | IsNumber () const |
bool | IsNull () const |
bool | IsString () const |
bool | IsName () const |
bool | IsIndirect () const |
bool | IsContainer () const |
bool | IsDict () const |
bool | IsArray () const |
bool | IsStream () const |
class SDFDoc & | GetDoc () const |
void | Write (Filters::FilterWriter &stream) |
The function writes the Obj to the output stream. | |
size_t | Size () const |
UInt32 | GetObjNum () const |
UInt16 | GetGenNum () const |
size_t | GetOffset () const |
bool | IsFree () const |
void | SetMark (bool mark) |
Set the object mark. | |
bool | IsMarked () const |
bool | IsLoaded () const |
bool | GetBool () const |
void | SetBool (bool b) |
double | GetNumber () const |
void | SetNumber (double n) |
const UChar * | GetBuffer () const |
void | GetAsPDFText (UString &out_str) const |
Convert the SDF/Cos String object to 'PDF Text String' (a Unicode string). | |
void | SetString (const UChar *value, size_t size) |
Sets the string object value. | |
void | SetString (const UString &str) |
Sets the string object value. | |
const char * | GetName () const |
void | SetName (const char *name) |
DictIterator | GetDictIterator () |
DictIterator | Find (const char *key) |
Search the dictionary for a given key. | |
Obj | FindObj (const char *key) |
Search the dictionary for a given key. | |
DictIterator | Get (const char *key) |
Search the dictionary for a given key and throw an exception if the key is not found. | |
Obj | PutName (const char *key, const char *name) |
Inserts a <key, Obj::Type::e_name> pair in the dictionary. | |
Obj | PutArray (const char *key) |
Inserts a <key, Obj::Type::e_array> pair in the dictionary. | |
Obj | PutBool (const char *key, bool value) |
Inserts a <key, Obj::Type::e_bool> pair in the dictionary. | |
Obj | PutDict (const char *key) |
Inserts a <key, Obj::Type::e_dict> pair in the dictionary. | |
Obj | PutNumber (const char *key, double value) |
Inserts a <key, Obj::Type::e_number> pair in the dictionary. | |
Obj | PutString (const char *key, const char *value) |
Inserts a <key, Obj::Type::e_string> pair in the dictionary. | |
Obj | PutString (const char *key, const char *value, int size) |
Inserts a <key, Obj::Type::e_string> pair in the dictionary. | |
Obj | PutText (const char *key, const UString &value) |
Inserts a <key, Obj::Type::e_string> pair in the dictionary. | |
void | PutNull (const char *key) |
Inserts a <key, Obj::Type::e_null> pair in the dictionary. | |
Obj | Put (const char *key, Obj obj) |
Inserts a <key, Obj> pair in the dictionary. | |
Obj | PutRect (const char *key, double x1, double y1, double x2, double y2) |
Inserts a <key, [x1,y1,x2,y2]> pair in the dictionary. | |
Obj | PutMatrix (const char *key, const Common::Matrix2D &value) |
Inserts a <key, [a,b,c,d,h,v]> pair in the dictionary. | |
void | Erase (const char *key) |
Removes an element in the dictionary that matches the given key. | |
void | Erase (DictIterator pos) |
Removes an element in the dictionary from specified position. | |
bool | Rename (const char *old_key, const char *new_key) |
Change the key value of a dictionary entry. | |
Obj | GetAt (size_t index) const |
Obj | InsertName (size_t pos, const char *name) |
Inserts an Obj::Type::e_name object in the array. | |
Obj | InsertArray (size_t pos) |
Inserts an Obj::Type::e_array object in the array. | |
Obj | InsertBool (size_t pos, bool value) |
Inserts an Obj::Type::e_bool object in the array. | |
Obj | InsertDict (size_t pos) |
Inserts an Obj::Type::e_dict object in the array. | |
Obj | InsertNumber (size_t pos, double value) |
Inserts an Obj::Type::e_number object in the array. | |
Obj | InsertString (size_t pos, const char *value) |
Inserts an Obj::Type::e_string object in the array. | |
Obj | InsertString (size_t pos, const char *value, int size) |
Inserts an Obj::Type::e_string object in the array. | |
Obj | InsertText (size_t pos, const UString &value) |
Inserts an Obj::Type::e_string object in the array. | |
Obj | InsertNull (size_t pos) |
Inserts an Obj::Type::e_null object in the array. | |
Obj | Insert (size_t pos, Obj obj) |
Inserts an existing Obj in this array. | |
Obj | InsertRect (size_t pos, double x1, double y1, double x2, double y2) |
Inserts an array of 4 numbers in this array. | |
Obj | InsertMatrix (size_t pos, Common::Matrix2D &value) |
Inserts an array of 6 numbers in this array. | |
Obj | PushBackName (const char *name) |
Appends a new Obj::Type::e_name object at the end of the array. | |
Obj | PushBackArray () |
Appends a new Obj::Type::e_array object at the end of the array. | |
Obj | PushBackBool (bool value) |
Appends a new Obj::Type::e_bool object at the end of the array. | |
Obj | PushBackDict () |
Appends a new Obj::Type::e_dict object at the end of the array. | |
Obj | PushBackNumber (double value) |
Appends a new Obj::Type::e_number object at the end of the array. | |
Obj | PushBackString (const char *value) |
Appends a new Obj::Type::e_string object at the end of the array. | |
Obj | PushBackString (const char *value, int size) |
Appends a new Obj::Type::e_string object at the end of the array. | |
Obj | PushBackText (const UString &value) |
Appends a new Obj::Type::e_string object at the end of the array. | |
Obj | PushBackNull () |
Appends a new Obj::Type::e_null object at the end of the array. | |
Obj | PushBack (Obj obj) |
Appends an existing Obj at the end of the array. | |
Obj | PushBackRect (double x1, double y1, double x2, double y2) |
Appends an array of 4 numbers at the end of the array. | |
Obj | PushBackMatrix (Common::Matrix2D &value) |
Appends an array of 6 numbers at the end of the array. | |
void | EraseAt (size_t pos) |
Checks whether the position is within the array bounds and then removes it from the array and moves each subsequent element to the slot with the next smaller index and decrements the arrays length by 1. | |
size_t | GetRawStreamLength () const |
Filters::Filter | GetRawStream (bool decrypt) const |
Filters::Filter | GetDecodedStream () const |
void | SetStreamData (const char *data, const size_t data_size, Filters::Filter filter_chain=Filters::Filter()) |
allows to replace the content stream with a new one without creating a new object | |
Obj () | |
Obj (const Obj &c) | |
Obj & | operator= (const Obj &c) |
operator bool () | |
bool | IsEqual (const Obj &to) const |
bool | operator== (const Obj &to) const |
Obj hierarchy implements the composite design pattern. As a result, you can invoke a member function of any 'derived' object through Obj interface. If the member function is not supported (e.g. if you invoke Obj::GetNumber() on a boolean object) an Exception will be thrown.
You can use GetType() or obl.Is???() member functions to find out type-information at run time, however most of the time the type can be inferred from the PDF specification. Therefore when you call Doc::GetTrailer() you can assume that returned object is a dictionary. If there is any ambiguity use Is???() methods.
Objects can't be shared across documents, however you can use Doc::ImportObj() to copy objects from one document to another.
Objects can be shared within a document provided that they are created as indirect. Indirect objects are the ones that are referenced in cross-reference table. To create an object as indirect use doc.CreateIndirect???() (where ? is the Object type).
pdftron::SDF::Obj::Obj | ( | ) | [inline] |
pdftron::SDF::Obj::Obj | ( | const Obj & | c | ) | [inline] |
Type pdftron::SDF::Obj::GetType | ( | ) | const |
bool pdftron::SDF::Obj::IsBool | ( | ) | const |
bool pdftron::SDF::Obj::IsNumber | ( | ) | const |
bool pdftron::SDF::Obj::IsNull | ( | ) | const |
bool pdftron::SDF::Obj::IsString | ( | ) | const |
bool pdftron::SDF::Obj::IsName | ( | ) | const |
bool pdftron::SDF::Obj::IsIndirect | ( | ) | const |
bool pdftron::SDF::Obj::IsContainer | ( | ) | const |
bool pdftron::SDF::Obj::IsDict | ( | ) | const |
bool pdftron::SDF::Obj::IsArray | ( | ) | const |
bool pdftron::SDF::Obj::IsStream | ( | ) | const |
class SDFDoc& pdftron::SDF::Obj::GetDoc | ( | ) | const |
void pdftron::SDF::Obj::Write | ( | Filters::FilterWriter & | stream | ) |
size_t pdftron::SDF::Obj::Size | ( | ) | const |
UInt32 pdftron::SDF::Obj::GetObjNum | ( | ) | const |
UInt16 pdftron::SDF::Obj::GetGenNum | ( | ) | const |
size_t pdftron::SDF::Obj::GetOffset | ( | ) | const |
bool pdftron::SDF::Obj::IsFree | ( | ) | const |
void pdftron::SDF::Obj::SetMark | ( | bool | mark | ) |
Set the object mark.
Mark is a boolean value that can be associated with every indirect object. This is especially useful when and object graph should be traversed and an operation should be performed on each node only once.
bool pdftron::SDF::Obj::IsMarked | ( | ) | const |
bool pdftron::SDF::Obj::IsLoaded | ( | ) | const |
bool pdftron::SDF::Obj::GetBool | ( | ) | const |
Exception | is thrown if the object is not Obj::Type::e_bool |
void pdftron::SDF::Obj::SetBool | ( | bool | b | ) |
b | - bool value used to set Bool object. |
An | Exception is thrown if this is not a Obj::Type::e_bool |
double pdftron::SDF::Obj::GetNumber | ( | ) | const |
An | Exception is thrown if the object is not a Obj::Type::e_number |
void pdftron::SDF::Obj::SetNumber | ( | double | n | ) |
n | - value used to set Number object. |
An | Exception is thrown if this is not a Obj::Type::e_number |
const UChar* pdftron::SDF::Obj::GetBuffer | ( | ) | const |
use Size() member function in order to obtain the number of bytes in string buffer.
Exception | is thrown if this is not a Obj::Type::e_string. |
void pdftron::SDF::Obj::GetAsPDFText | ( | UString & | out_str | ) | const |
Convert the SDF/Cos String object to 'PDF Text String' (a Unicode string).
PDF Text Strings are not used to represent page content, however they are used in text annotations, bookmark names, article names, document information etc. These strings are encoded in either PDFDocEncoding or Unicode character encoding. For more information on PDF Text Strings, please refer to section 3.8.1 'Text Strings' in PDF Reference.
An | Exception is thrown if this is not a Obj::Type::e_string. |
void pdftron::SDF::Obj::SetString | ( | const UChar * | value, | |
size_t | size | |||
) |
Sets the string object value.
value | - character buffer. | |
size | - the size of character buffer. |
An | Exception is thrown if this is not a Obj::Type::e_string |
void pdftron::SDF::Obj::SetString | ( | const UString & | str | ) |
Sets the string object value.
str | - A Unicode string value. |
An | Exception is thrown if this is not a Obj::Type::e_string |
const char* pdftron::SDF::Obj::GetName | ( | ) | const |
An | Exception is thrown if this is not a Obj::Type::e_name |
void pdftron::SDF::Obj::SetName | ( | const char * | name | ) |
name | - value used to set Name object. |
An | Exception is thrown if this is not a Obj::Type::e_name |
DictIterator pdftron::SDF::Obj::GetDictIterator | ( | ) |
An | Exception is thrown if this is not a dictionary object (Dict). |
DictIterator pdftron::SDF::Obj::Find | ( | const char * | key | ) |
Search the dictionary for a given key.
key | - a key to search for in the dictionary |
Exception | is thrown if this is not a dictionary or a stream |
DictIterator itr = info_dict.Find("Info"); if (itr.HasNext()) { Obj info = itr.Value(); if (info.IsDict()) info.PutString("Producer", "PDFTron PDFNet SDK"); }
Obj pdftron::SDF::Obj::FindObj | ( | const char * | key | ) |
Search the dictionary for a given key.
key | - a key to search for in the dictionary |
Exception | is thrown if this is not a dictionary or a stream |
DictIterator pdftron::SDF::Obj::Get | ( | const char * | key | ) |
Search the dictionary for a given key and throw an exception if the key is not found.
key | - a key to search for in the dictionary |
otherwise return the iterator to the matching key/value pair.
An | Exception is thrown if the dictionary does not contain the specified key. | |
An | Exception is thrown if this is not a Obj::Type::e_dict or a stream. |
Obj pdftron::SDF::Obj::PutName | ( | const char * | key, | |
const char * | name | |||
) |
Inserts a <key, Obj::Type::e_name> pair in the dictionary.
key | The key of the value to set. | |
name | The value of the Obj::Type::e_name object to be inserted into the dictionary. |
An | Exception is thrown if this is not a dictionary or a stream object. |
Obj pdftron::SDF::Obj::PutArray | ( | const char * | key | ) |
Inserts a <key, Obj::Type::e_array> pair in the dictionary.
key | The key of the value to set. |
An | Exception is thrown if this is not a dictionary or a stream object. |
Obj pdftron::SDF::Obj::PutBool | ( | const char * | key, | |
bool | value | |||
) |
Inserts a <key, Obj::Type::e_bool> pair in the dictionary.
key | The key of the value to set. | |
value | The value of the Obj::Type::e_bool object to be inserted into the dictionary. |
An | Exception is thrown if this is not a dictionary or a stream object. |
Obj pdftron::SDF::Obj::PutDict | ( | const char * | key | ) |
Inserts a <key, Obj::Type::e_dict> pair in the dictionary.
key | The key of the value to set. |
An | Exception is thrown if this is not a dictionary or a stream object. |
Obj pdftron::SDF::Obj::PutNumber | ( | const char * | key, | |
double | value | |||
) |
Inserts a <key, Obj::Type::e_number> pair in the dictionary.
key | The key of the value to set. | |
value | The value of the Obj::Type::e_number object to be inserted into the dictionary. |
An | Exception is thrown if this is not a dictionary or a stream object. |
Obj pdftron::SDF::Obj::PutString | ( | const char * | key, | |
const char * | value | |||
) |
Inserts a <key, Obj::Type::e_string> pair in the dictionary.
key | The key of the value to set. | |
value | The value of the Obj::Type::e_string object to be inserted into the dictionary. |
An | Exception is thrown if this is not a dictionary or a stream object. |
Obj pdftron::SDF::Obj::PutString | ( | const char * | key, | |
const char * | value, | |||
int | size | |||
) |
Inserts a <key, Obj::Type::e_string> pair in the dictionary.
key | The key of the value to set. | |
value | The buffer used to set the value of the Obj::Type::e_string object to be inserted into the dictionary. | |
size | The number of bytes to copy from the 'value' buffer parameter. |
An | Exception is thrown if this is not a dictionary or a stream object. |
Inserts a <key, Obj::Type::e_string> pair in the dictionary.
key | The key of the value to set. | |
value | The value of the Obj::Type::e_string object to be inserted into the dictionary. |
An | Exception is thrown if this is not a dictionary or a stream object. |
void pdftron::SDF::Obj::PutNull | ( | const char * | key | ) |
Inserts a <key, Obj::Type::e_null> pair in the dictionary.
key | The key of the value to set. |
An | Exception is thrown if this is not a dictionary or a stream object. |
Inserts a <key, Obj> pair in the dictionary.
key | The key of the value to set. | |
obj | The value to be inserted into the dictionary. If 'obj' is indirect (i.e. is a shared) object it will be inserted by reference, otherwise the object will be cloned and then inserted into the dictionary. |
An | Exception is thrown if this is not a dictionary or a stream object. |
Obj pdftron::SDF::Obj::PutRect | ( | const char * | key, | |
double | x1, | |||
double | y1, | |||
double | x2, | |||
double | y2 | |||
) |
Inserts a <key, [x1,y1,x2,y2]> pair in the dictionary.
key | The key of the value to set. | |
x1,y1,x2,y2 | - The values for an array of four numbers to be inserted into the dictionary. |
An | Exception is thrown if this is not a dictionary or a stream object. |
Obj pdftron::SDF::Obj::PutMatrix | ( | const char * | key, | |
const Common::Matrix2D & | value | |||
) |
Inserts a <key, [a,b,c,d,h,v]> pair in the dictionary.
key | The key of the value to set. | |
value | - A matrix used to set the values in an array of six numbers. The resulting array will be inserted into the dictionary. |
An | Exception is thrown if this is not a dictionary or a stream object. |
void pdftron::SDF::Obj::Erase | ( | const char * | key | ) |
Removes an element in the dictionary that matches the given key.
An | Exception is thrown if this is not a dictionary or a stream. |
void pdftron::SDF::Obj::Erase | ( | DictIterator | pos | ) |
Removes an element in the dictionary from specified position.
An | Exception is thrown if this is not a dictionary or a stream. |
bool pdftron::SDF::Obj::Rename | ( | const char * | old_key, | |
const char * | new_key | |||
) |
Change the key value of a dictionary entry.
The key can't be renamed if another key with the same name already exists in the dictionary. In this case Rename returns false.
An | Exception is thrown if this is not a dictionary or a stream. |
Obj pdftron::SDF::Obj::GetAt | ( | size_t | index | ) | const |
index | - The array element to obtain. The first element in an array has an index of zero. |
throws | an Exception if index is outside the array bounds. | |
An | Exception is thrown if this is not an Obj::Type::e_array. |
Obj pdftron::SDF::Obj::InsertName | ( | size_t | pos, | |
const char * | name | |||
) |
Inserts an Obj::Type::e_name object in the array.
pos | - The location in the array to insert the object . The object is inserted before the specified location. The first element in an array has a pos of zero. If pos >= Array->Length(), appends obj to array. | |
name | The value of the Obj::Type::e_name object to be inserted. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::InsertArray | ( | size_t | pos | ) |
Inserts an Obj::Type::e_array object in the array.
pos | - The location in the array to insert the object . The object is inserted before the specified location. The first element in an array has a pos of zero. If pos >= Array->Length(), appends obj to array. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::InsertBool | ( | size_t | pos, | |
bool | value | |||
) |
Inserts an Obj::Type::e_bool object in the array.
pos | - The location in the array to insert the object . The object is inserted before the specified location. The first element in an array has a pos of zero. If pos >= Array->Length(), appends obj to array. | |
value | The value of the Obj::Type::e_bool object to be inserted. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::InsertDict | ( | size_t | pos | ) |
Inserts an Obj::Type::e_dict object in the array.
pos | - The location in the array to insert the object . The object is inserted before the specified location. The first element in an array has a pos of zero. If pos >= Array->Length(), appends obj to array. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::InsertNumber | ( | size_t | pos, | |
double | value | |||
) |
Inserts an Obj::Type::e_number object in the array.
pos | - The location in the array to insert the object . The object is inserted before the specified location. The first element in an array has a pos of zero. If pos >= Array->Length(), appends obj to array. | |
value | The value of the Obj::Type::e_number object to be inserted. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::InsertString | ( | size_t | pos, | |
const char * | value | |||
) |
Inserts an Obj::Type::e_string object in the array.
pos | - The location in the array to insert the object . The object is inserted before the specified location. The first element in an array has a pos of zero. If pos >= Array->Length(), appends obj to array. | |
value | The value of the Obj::Type::e_string object to be inserted. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::InsertString | ( | size_t | pos, | |
const char * | value, | |||
int | size | |||
) |
Inserts an Obj::Type::e_string object in the array.
pos | - The location in the array to insert the object . The object is inserted before the specified location. The first element in an array has a pos of zero. If pos >= Array->Length(), appends obj to array. | |
value | The buffer used to set the value of the Obj::Type::e_string object to be inserted. | |
size | The number of bytes to copy from the 'value' buffer parameter. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Inserts an Obj::Type::e_string object in the array.
pos | - The location in the array to insert the object . The object is inserted before the specified location. The first element in an array has a pos of zero. If pos >= Array->Length(), appends obj to array. | |
value | The value of the Obj::Type::e_string object to be inserted. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::InsertNull | ( | size_t | pos | ) |
Inserts an Obj::Type::e_null object in the array.
pos | - The location in the array to insert the object . The object is inserted before the specified location. The first element in an array has a pos of zero. If pos >= Array->Length(), appends obj to array. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Inserts an existing Obj in this array.
pos | - The location in the array to insert the object . The object is inserted before the specified location. The first element in an array has a pos of zero. If pos >= Array->Length(), appends obj to array. | |
obj | The value to be inserted into the dictionary. If 'obj' is indirect (i.e. is a shared) object it will be inserted by reference, otherwise the object will be cloned and then inserted. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::InsertRect | ( | size_t | pos, | |
double | x1, | |||
double | y1, | |||
double | x2, | |||
double | y2 | |||
) |
Inserts an array of 4 numbers in this array.
pos | - The location in the array to insert the object . The object is inserted before the specified location. The first element in an array has a pos of zero. If pos >= Array->Length(), appends obj to array. | |
x1,y1,x2,y2 | - The values for an array of four numbers to be inserted in this array. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::InsertMatrix | ( | size_t | pos, | |
Common::Matrix2D & | value | |||
) |
Inserts an array of 6 numbers in this array.
pos | - The location in the array to insert the object . The object is inserted before the specified location. The first element in an array has a pos of zero. If pos >= Array->Length(), appends obj to array. | |
value | - A matrix used to set the values in an array of six numbers. The resulting array will be then inserted in this array. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::PushBackName | ( | const char * | name | ) |
Appends a new Obj::Type::e_name object at the end of the array.
name | - The value of the Obj::Type::e_name object. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::PushBackArray | ( | ) |
Appends a new Obj::Type::e_array object at the end of the array.
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::PushBackBool | ( | bool | value | ) |
Appends a new Obj::Type::e_bool object at the end of the array.
name | - The value of the Obj::Type::e_bool object. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::PushBackDict | ( | ) |
Appends a new Obj::Type::e_dict object at the end of the array.
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::PushBackNumber | ( | double | value | ) |
Appends a new Obj::Type::e_number object at the end of the array.
value | - The value of the Obj::Type::e_number object. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::PushBackString | ( | const char * | value | ) |
Appends a new Obj::Type::e_string object at the end of the array.
value | - The value of the Obj::Type::e_string object. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::PushBackString | ( | const char * | value, | |
int | size | |||
) |
Appends a new Obj::Type::e_string object at the end of the array.
value | The buffer used to set the value of the Obj::Type::e_string object to be inserted. | |
size | The number of bytes to copy from the 'value' buffer parameter. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Appends a new Obj::Type::e_string object at the end of the array.
value | The value of the Obj::Type::e_string object to be inserted. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::PushBackNull | ( | ) |
Appends a new Obj::Type::e_null object at the end of the array.
An | Exception is thrown if this is not an Obj::Type::e_array |
Appends an existing Obj at the end of the array.
obj | The value to be inserted into the dictionary. If 'obj' is indirect (i.e. is a shared) object it will be inserted by reference, otherwise the object will be cloned and then appended. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::PushBackRect | ( | double | x1, | |
double | y1, | |||
double | x2, | |||
double | y2 | |||
) |
Appends an array of 4 numbers at the end of the array.
x1,y1,x2,y2 | - The values for an array of four numbers to be appended. |
An | Exception is thrown if this is not an Obj::Type::e_array |
Obj pdftron::SDF::Obj::PushBackMatrix | ( | Common::Matrix2D & | value | ) |
Appends an array of 6 numbers at the end of the array.
value | - A matrix used to set the values in an array of six numbers. The resulting array will be then inserted in this array. |
An | Exception is thrown if this is not an Obj::Type::e_array |
void pdftron::SDF::Obj::EraseAt | ( | size_t | pos | ) |
Checks whether the position is within the array bounds and then removes it from the array and moves each subsequent element to the slot with the next smaller index and decrements the arrays length by 1.
idx | The index for the array member to remove. Array indexes start at 0. |
An | Exception is thrown if this is not an Obj::Type::e_array |
size_t pdftron::SDF::Obj::GetRawStreamLength | ( | ) | const |
An | Exception is thrown if this is not a Obj::Type::e_stream |
Filters::Filter pdftron::SDF::Obj::GetRawStream | ( | bool | decrypt | ) | const |
decrypt | - If true decrypt the stream if the stream is encrypted. |
An | Exception is thrown if this is not a Obj::Type::e_stream |
Filters::Filter pdftron::SDF::Obj::GetDecodedStream | ( | ) | const |
An | Exception is thrown if this is not a Obj::Type::e_stream |
void pdftron::SDF::Obj::SetStreamData | ( | const char * | data, | |
const size_t | data_size, | |||
Filters::Filter | filter_chain = Filters::Filter() | |||
) |
allows to replace the content stream with a new one without creating a new object
pdftron::SDF::Obj::operator bool | ( | ) | [inline] |
bool pdftron::SDF::Obj::IsEqual | ( | const Obj & | to | ) | const |
obj | - Obj to compare to |
bool pdftron::SDF::Obj::operator== | ( | const Obj & | to | ) | const |