A stack of dictionaries.
More...
A stack of dictionaries.
PDDictionaryStack is a special purpose dictionary implementation which is used to access a stack of dictionaries.
The dictionaries are located in a regular stack. Only the top-most stack is affected by changes, including entry deletions, dictionary clears, etc.
When polling a dictionary for a given key, the stack is traversed until a dictionary is encountered whose value for the given key is non-NULL. This value is returned.
The implementation allows for "modifications" to master dictionaries, such as the latin encoding dictionary, modified by Differences arrays in an Encoding dictionary.
A dictionary stack implementation.
The dictionary stack construct.
Add all entries from the given PDF dictionary stack to the top dictionary. Entries will replace pre-existing key/value pairs when a key in the pd_stack matches the key in the dictionary.
- Parameters
-
ds | Dictionary to add entries to |
stack | PDF dictionary stack |
Remove all entries in the top dictionary.
- Parameters
-
Create a new dictionary stack with the given dictionary as the initial dictionary.
- Parameters
-
- Returns
- A new dictionary stack
Delete the given key from the top dictionary.
- Parameters
-
ds | The dictionary stack |
key | The key to delete |
Get the value of the given key.
- Parameters
-
ds | The dictionary stack |
key | The key |
Iterate over the dictionary stack entries using the given iterator.
- Parameters
-
ds | The dictionary stack whose dictionaries should be iterated |
it | The iterating function |
ui | User information to pass to iterator, if any |
Pop the topmost dictionary from the dictionary stack.
- Parameters
-
- Returns
- The topmost dictionary, or NULL if the dictionary stack is empty
Push the given dictionary on top of the dictionary stack.
- Parameters
-
ds | Dictionary stack |
dict | Dictionary to push |
Set key to value. If value is NULL, an assertion is thrown. To delete keys, use PDDictionaryDelete().
- Parameters
-
ds | The dictionary stack |
key | The key |
value | The value |