PDFix SDK  6.5.0
PdsDictionary Struct Referenceabstract

PdsDictionary class. More...

Inheritance diagram for PdsDictionary:
PdsObject

Public Member Functions

virtual bool Known (const wchar_t *key)=0
 
virtual int GetNumKeys ()=0
 Gets the number of keys in the dictionary. More...
 
virtual int GetKey (int index, wchar_t *buffer, int len)=0
 Gets the key in the dictionary by index. More...
 
virtual PdsObjectGet (const wchar_t *key)=0
 Gets the value of the specified key in the specified dictionary. More...
 
virtual bool Put (const wchar_t *key, PdsObject *value)=0
 Method puts object to specified key in the dictionary. More...
 
virtual bool PutBool (const wchar_t *key, bool value)=0
 Method puts Boolean to specified key in the dictionary. More...
 
virtual bool PutName (const wchar_t *key, const wchar_t *value)=0
 Method puts Name to specified key in the dictionary. More...
 
virtual bool PutString (const wchar_t *key, const wchar_t *value)=0
 Method puts string to specified key in the dictionary. More...
 
virtual bool PutNumber (const wchar_t *key, double value)=0
 Method puts number to specified key in the dictionary. More...
 
virtual bool PutRect (const wchar_t *key, PdfRect *rect)=0
 Method puts rectangle to specified key in the dictionary. More...
 
virtual bool PutMatrix (const wchar_t *key, PdfMatrix *matrix)=0
 Method puts matrix to specified key in the dictionary. More...
 
virtual PdsDictionaryPutDict (const wchar_t *key)=0
 Method puts new dictionary to specified key in the dictionary. More...
 
virtual PdsArrayPutArray (const wchar_t *key)=0
 Method puts new array to specified key in the dictionary. More...
 
virtual PdsDictionaryGetDictionary (const wchar_t *key)=0
 
virtual PdsArrayGetArray (const wchar_t *key)=0
 
virtual PdsStreamGetStream (const wchar_t *key)=0
 
virtual int GetString (const wchar_t *key, char *buffer, int len)=0
 
virtual int GetText (const wchar_t *key, wchar_t *buffer, int len)=0
 
virtual double GetNumber (const wchar_t *key)=0
 
virtual int GetInteger (const wchar_t *key, int default_value)=0
 
virtual bool GetBoolean (const wchar_t *key, bool default_value)=0
 
- Public Member Functions inherited from PdsObject
virtual PdfObjectType GetObjectType ()=0
 Gets the type of an object. More...
 
virtual int GetId ()=0
 Gets the object number. More...
 

Detailed Description

PdsDictionary class.

A PdsDictionary is an associative table whose elements are pairs of objects:

  • The first element of a pair is the key, which is always a name object, a sequence of characters beginning with the forward slash (/) character.
  • The second element is the PdsObject representing the value.

Member Function Documentation

◆ Get()

virtual PdsObject* PdsDictionary::Get ( const wchar_t *  key)
pure virtual

Gets the value of the specified key in the specified dictionary.

Parameters
keyThe key whose value is obtained.
Returns
The object associated with the specified key. If key is not present or if its value is null, returns an object of type kPdsNull.

◆ GetArray()

virtual PdsArray* PdsDictionary::GetArray ( const wchar_t *  key)
pure virtual

Gets the PdsArray object from dictionary by key or null if the objecs does not exist or it's an object of the different type.

Parameters
keyThe key under which the object is to be retrieved.
Returns
The object in the dictionary under specified key or null

◆ GetBoolean()

virtual bool PdsDictionary::GetBoolean ( const wchar_t *  key,
bool  default_value 
)
pure virtual

Gets the value of PdsBoolean object from array by index. Method returns default value if the objecs does not exist or it's an object of the different type.

Parameters
keyThe key under which the object is to be retrieved.
default_valueThe default value to be returned if the value cannot be retrieved
Returns
The object in the array under specified index or the default value

◆ GetDictionary()

virtual PdsDictionary* PdsDictionary::GetDictionary ( const wchar_t *  key)
pure virtual

Gets the PdsDictionary object from dictionary by key or null if the objecs does not exist or it's an object of the different type.

Parameters
keyThe key under which the object is to be retrieved.
Returns
The object in the dictionary under specified key or null

◆ GetInteger()

virtual int PdsDictionary::GetInteger ( const wchar_t *  key,
int  default_value 
)
pure virtual

Gets the integer value of the PdsNumber object from array by index. Method returns default value if the objecs does not exist or it's an object of the different type.

Parameters
keyThe key under which the object is to be retrieved.
default_valueThe default value to be returned if the value cannot be retrieved
Returns
The object in the array under specified index or the default value.

◆ GetKey()

virtual int PdsDictionary::GetKey ( int  index,
wchar_t *  buffer,
int  len 
)
pure virtual

Gets the key in the dictionary by index.

Parameters
indexThe index of key whose value is obtained.
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetNumber()

virtual double PdsDictionary::GetNumber ( const wchar_t *  key)
pure virtual

Gets the float value of the PdsNumber object from dictionary by key. Method returns 0 if the objecs does not exist or it's an object of the different type.

Parameters
keyThe key under which the object is to be retrieved.
Returns
The object in the array under specified key or 0.

◆ GetNumKeys()

virtual int PdsDictionary::GetNumKeys ( )
pure virtual

Gets the number of keys in the dictionary.

Returns
Number of objects in the dictionary

◆ GetStream()

virtual PdsStream* PdsDictionary::GetStream ( const wchar_t *  key)
pure virtual

Gets the PdsStream object from dictionary by key or null if the objecs does not exist or it's an object of the different type.

Parameters
keyThe key under which the object is to be retrieved.
Returns
The object in the dictionary under specified key or null

◆ GetString()

virtual int PdsDictionary::GetString ( const wchar_t *  key,
char *  buffer,
int  len 
)
pure virtual

Gets the string value of the PdsString or PdsName object from dictionary by key. Method returns 0 if the objecs does not exist or it's an object of the different type.

Parameters
keyThe key under which the object is to be retrieved.
buffer(filled by method) If the buffer is null function returns required length of string data.
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetText()

virtual int PdsDictionary::GetText ( const wchar_t *  key,
wchar_t *  buffer,
int  len 
)
pure virtual

Gets the unicode value of the PdsString or PdsName object from dictionary by key. Method returns 0 if the objecs does not exist or it's an object of the different type.

Parameters
keyThe key under which the object is to be retrieved.
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.
See also
PdeWord::GetValue

◆ Known()

virtual bool PdsDictionary::Known ( const wchar_t *  key)
pure virtual

Tests whether a specific key is found in the specified dictionary. Calling this method is equivalent to checking if the value returned from GetObject is a null object.

Parameters
keyThe key to find.
Returns
true if the value of a key is known (exists and is not null) in dict; false otherwise.

◆ Put()

virtual bool PdsDictionary::Put ( const wchar_t *  key,
PdsObject value 
)
pure virtual

Method puts object to specified key in the dictionary.

Parameters
keyThe name of the key under which the object is stored.
Returns
true if object was added successfully, false othervise

◆ PutArray()

virtual PdsArray* PdsDictionary::PutArray ( const wchar_t *  key)
pure virtual

Method puts new array to specified key in the dictionary.

Parameters
keyThe name of the key under which the object is stored.
Returns
A newly created array or null.

◆ PutBool()

virtual bool PdsDictionary::PutBool ( const wchar_t *  key,
bool  value 
)
pure virtual

Method puts Boolean to specified key in the dictionary.

Parameters
keyThe name of the key under which the object is stored.
valueboolean.
Returns
true if object was added successfully, false othervise

◆ PutDict()

virtual PdsDictionary* PdsDictionary::PutDict ( const wchar_t *  key)
pure virtual

Method puts new dictionary to specified key in the dictionary.

Parameters
keyThe name of the key under which the object is stored.
Returns
A newly created dictionary or null.

◆ PutMatrix()

virtual bool PdsDictionary::PutMatrix ( const wchar_t *  key,
PdfMatrix matrix 
)
pure virtual

Method puts matrix to specified key in the dictionary.

Parameters
keyThe name of the key under which the object is stored.
matrixPointer to matrix.
Returns
true if object was added successfully, false othervise

◆ PutName()

virtual bool PdsDictionary::PutName ( const wchar_t *  key,
const wchar_t *  value 
)
pure virtual

Method puts Name to specified key in the dictionary.

Parameters
keyThe name of the key under which the object is stored.
valueName.
Returns
true if object was added successfully, false othervise

◆ PutNumber()

virtual bool PdsDictionary::PutNumber ( const wchar_t *  key,
double  value 
)
pure virtual

Method puts number to specified key in the dictionary.

Parameters
keyThe name of the key under which the object is stored.
valueDouble number.
Returns
true if object was added successfully, false othervise

◆ PutRect()

virtual bool PdsDictionary::PutRect ( const wchar_t *  key,
PdfRect rect 
)
pure virtual

Method puts rectangle to specified key in the dictionary.

Parameters
keyThe name of the key under which the object is stored.
rectPointer to a rectangle specified in user space coordinates.
Returns
true if object was added successfully, false othervise

◆ PutString()

virtual bool PdsDictionary::PutString ( const wchar_t *  key,
const wchar_t *  value 
)
pure virtual

Method puts string to specified key in the dictionary.

Parameters
keyThe name of the key under which the object is stored.
valuestring.
Returns
true if object was added successfully, false othervise