Adobe.com
Contents Suites Classes Class Index Member Index

AIDictionarySuite Struct Reference
[API Suite List]

This suite provides function to create and manage Illustrator data dictionaries. More...

#include <AIDictionary.h>

List of all members.

Public Attributes

AIAPI AIErr(* CreateDictionary )(AIDictionaryRef *dictionary)
 Creates a new dictionary.
AIAPI AIErr(* CreateDictionaryFromJSONFile )(AIDictionaryRef *dictionary, const ai::FilePath &file)
 Opens a JSON file from the provided path and parses it to a newly created dictionary.
AIAPI ai::int32(* AddRef )(AIDictionaryRef dictionary)
 Increments the reference count of a dictionary.
AIAPI ai::int32(* Release )(AIDictionaryRef dictionary)
 Frees the memory associated with a dictionary when it is no longer needed (the reference count is 0).
AIAPI AIErr(* Clone )(ConstAIDictionaryRef src, AIDictionaryRef *dst)
 Creates a new dictionary that is an exact duplicate of an existing dictionary.
AIAPI AIErr(* Copy )(AIDictionaryRef dict, ConstAIDictionaryRef src)
 Makes a copy of a dictionary, replacing the current contents of an existing dictionary.
AIAPI ai::uint32(* Size )(ConstAIDictionaryRef dict)
 Gets the number of entries in a dictionary.
AIAPI AIErr(* Begin )(ConstAIDictionaryRef dict, AIDictionaryIterator *iterator)
 Creates a new iterator object for visiting dictionary entries.
AIAPI AIDictKey(* Key )(const char *keyString)
 Finds a dictionary key, or creates a new one if the specified key does not exist.
AIAPI const char *(* GetKeyString )(AIDictKey key)
 Retrieves the name string of a key.
AIAPI AIBoolean(* IsKnown )(ConstAIDictionaryRef dictionary, AIDictKey key)
 Reports whether there is an entry with a given key in a dictionary.
AIAPI AIErr(* DeleteEntry )(AIDictionaryRef dictionary, AIDictKey key)
 Removes the entry with a given key from a dictionary.
AIAPI AIErr(* GetEntryType )(ConstAIDictionaryRef dictionary, AIDictKey key, AIEntryType *entryType)
 Retrieves the data type of an entry.
AIAPI AIErr(* CopyEntry )(ConstAIDictionaryRef dictionary1, AIDictionaryRef dictionary2, AIDictKey key1, AIDictKey key2)
 Copies an entry from one dictionary to another, or to another key in the same dictionary.
AIAPI AIErr(* MoveEntry )(AIDictionaryRef dictionary1, AIDictionaryRef dictionary2, AIDictKey key1, AIDictKey key2)
 Moves an entry from one dictionary to another (or to another key in the same dictionary), removing the source entry.
AIAPI AIErr(* SwapEntries )(AIDictionaryRef dictionary1, AIDictionaryRef dictionary2, AIDictKey key1, AIDictKey key2)
 Swaps two entries in two dictionaries, or in the same dictionary.
AIAPI AIErr(* GetArtEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, AIArtHandle *art)
 Retrieves an art object from a dictionary entry.
AIAPI AIErr(* NewArtEntry )(AIDictionaryRef dictionary, AIDictKey key, ai::int16 type)
 Creates an entry which is a new art object of a specified type.
AIAPI AIErr(* MoveArtToEntry )(AIDictionaryRef dictionary, AIDictKey key, AIArtHandle art)
 Moves an art object from the artwork tree into a dictionary, removing it from the artwork tree.
AIAPI AIErr(* MoveEntryToArt )(AIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *art)
 Moves an art object from a dictionary into the artwork tree, removing the entry from the dictionary.
AIAPI AIErr(* CopyArtToEntry )(AIDictionaryRef dictionary, AIDictKey key, AIArtHandle art)
 Copies an art object from the artwork tree into a dictionary.
AIAPI AIErr(* CopyEntryToArt )(ConstAIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *art)
 Copies an art object from a dictionary into the artwork tree.
AIAPI AIErr(* SetEntryToLayer )(AIDictionaryRef dictionary, AIDictKey key, AILayerHandle layer)
 Sets an entry in a dictionary to refer to the topmost group of a layer.
AIAPI AIErr(* SetLayerToEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, AILayerHandle prep, AILayerHandle *layer)
 Inserts a new layer in the current document, whose topmost group is the group referenced by a dictionary entry.
AIAPI AIEntryRef(* Get )(ConstAIDictionaryRef dictionary, AIDictKey key)
 Retrieves a dictionary entry.
AIAPI AIErr(* Set )(AIDictionaryRef dictionary, AIDictKey key, AIEntryRef entry)
 Sets a dictionary entry.
AIAPI AIErr(* GetBooleanEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, AIBoolean *value)
 Retrieves a boolean value from a dictionary entry.
AIAPI AIErr(* SetBooleanEntry )(AIDictionaryRef dictionary, AIDictKey key, AIBoolean value)
 Sets a boolean value for a dictionary entry.
AIAPI AIErr(* GetIntegerEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, ai::int32 *value)
 Retrieves an integer value from a dictionary entry.
AIAPI AIErr(* SetIntegerEntry )(AIDictionaryRef dictionary, AIDictKey key, ai::int32 value)
 Sets an integer value for a dictionary entry.
AIAPI AIErr(* GetPointerEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, ai::intptr *value)
 Retrieves a pointer value from a dictionary entry (pointers may be 64-bit or 32-bit depending on platform).
AIAPI AIErr(* SetPointerEntry )(AIDictionaryRef dictionary, AIDictKey key, ai::intptr value)
 Sets a pointer value for a temporary dictionary entry.
AIAPI AIErr(* GetRealEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, AIReal *value)
 Retrieves a real-number value from a dictionary entry.
AIAPI AIErr(* SetRealEntry )(AIDictionaryRef dictionary, AIDictKey key, AIReal value)
 Sets a real-number value for a dictionary entry.
AIAPI AIErr(* GetStringEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, const char **value)
 Retrieves a string value from a dictionary entry.
AIAPI AIErr(* SetStringEntry )(AIDictionaryRef dictionary, AIDictKey key, const char *value)
 Sets a string value for a dictionary entry.
AIAPI AIErr(* GetBinaryEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, void *value, size_t *size)
 Retrieves a binary value from a dictionary entry.
AIAPI AIErr(* SetBinaryEntry )(AIDictionaryRef dictionary, AIDictKey key, void *value, size_t size)
 Sets a binary value for a dictionary entry.
AIAPI AIErr(* GetDictEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, AIDictionaryRef *value)
 Retrieves a dictionary value from a dictionary entry.
AIAPI AIErr(* SetDictEntry )(AIDictionaryRef dictionary, AIDictKey key, AIDictionaryRef value)
 Sets a dictionary value for a dictionary entry.
AIAPI AIErr(* GetArrayEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, AIArrayRef *value)
 Retrieves an array value from a dictionary entry.
AIAPI AIErr(* SetArrayEntry )(AIDictionaryRef dictionary, AIDictKey key, AIArrayRef value)
 Sets an array value for a dictionary entry.
AIAPI AIErr(* GetUnicodeStringEntry )(ConstAIDictionaryRef dictionary, AIDictKey key, ai::UnicodeString &value)
 Retrieves a Unicode string value from a dictionary entry.
AIAPI AIErr(* SetUnicodeStringEntry )(AIDictionaryRef dictionary, AIDictKey key, const ai::UnicodeString &value)
 Sets a Unicode string value for a dictionary entry.
AIAPI AIErr(* TouchArt )(ConstAIDictionaryRef dictionary)
 Marks art as changed when a change has been made to the dictionary that affects a user-visible property of any associated art object.
AIAPI AIErr(* Find )(ConstAIDictionaryRef dict, AIDictKey key, AIDictionaryIterator *iterator)
 Creates a new iterator object for the matched key.

Detailed Description

This suite provides function to create and manage Illustrator data dictionaries.

A dictionary is a heterogeneous container whose elements, called entries, are accessed by keys.

Entries are of type AIEntryRef. The AIEntrySuite provides methods to construct and query entries of different types. Entries can contain values of various data types; simple types such as booleans, integers, floats, and strings; and complex types such as arrays, other dictionaries, and references to document objects including art objects, brushes and styles. This makes dictionaries very flexible and powerful containers.

Dictionaries can themselves be stored in other containers such as arrays or other dictionaries. In particular they can be stored in the dictionaries attached to art objects and to the document. When a dictionary is stored in one of these places (directly or indirectly) it is read and written as a part of the document.


Member Data Documentation

AIAPI ai::int32(* AIDictionarySuite::AddRef)(AIDictionaryRef dictionary)

Increments the reference count of a dictionary.

Parameters:
dictionary The dictionary reference.

Creates a new iterator object for visiting dictionary entries.

Iterators are reference counted.

Parameters:
dict The dictionary.
iterator [out] A buffer in which to return the iterator object.
See also:
AIDictionaryIteratorSuite::AddRef(), AIDictionaryIteratorSuite::Release()

Referenced by ai::Dictionary::begin().

Creates a new dictionary that is an exact duplicate of an existing dictionary.

Performs a deep copy.

Parameters:
src The dictionary to copy.
dst [out] A buffer in which to return the new dictionary reference.

Referenced by ai::Dictionary::Impl::clone().

Makes a copy of a dictionary, replacing the current contents of an existing dictionary.

Parameters:
dict The dictionary into which to copy contents.
src The dictionary to copy.

Referenced by ai::Dictionary::Impl::copy().

Copies an art object from the artwork tree into a dictionary.

Parameters:
dictionary The dictionary.
key The entry key.
art The art object.

Copies an entry from one dictionary to another, or to another key in the same dictionary.

Parameters:
dictionary1 The source dictionary.
dictionary2 The destination dictionary.
key1 The key for the entry to copy.
key2 The key for the new entry.
AIAPI AIErr(* AIDictionarySuite::CopyEntryToArt)(ConstAIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *art)

Copies an art object from a dictionary into the artwork tree.

Parameters:
dictionary The dictionary.
key The entry key.
paintOrder The paint order, relative to the prep object. See AITypes::AIPaintOrder.
prep The prepositional art object. This can be an object whose boundaries might overlap this one, or a compound path or group that might contain this path.
art [out] A buffer in which to return a pointer to the art object.
See also:
AIArtSuite

Creates a new dictionary.

Dictionaries are reference counted; the initial reference count is 1.

Parameters:
dictionary [out] A buffer in which to return the new dictionary reference.
See also:
AddRef(), Release()

Referenced by ai::Dictionary::Impl::Impl().

Opens a JSON file from the provided path and parses it to a newly created dictionary.

The JSON file must have an object as top-level element. Dictionaries are reference counted; the initial reference count is 1.

Parameters:
dictionary [out] A buffer in which to return the new dictionary reference.
file The path to the JSON file
See also:
AddRef(), Release()

Removes the entry with a given key from a dictionary.

Parameters:
dict The dictionary.
key The key object.

Referenced by ai::Dictionary::Impl::DeleteEntry().

Creates a new iterator object for the matched key.

Iterators are reference counted.

Parameters:
dict The dictionary.
key The key to find
iterator [out] A buffer in which to return the iterator object. use AIDictionaryIteratorSuite::GetEntry to get value directly from iterator returns kNoSuchKey if the key is not found.
See also:
AIDictionaryIteratorSuite::AddRef(), AIDictionaryIteratorSuite::Release()

Referenced by ai::Dictionary::find().

Retrieves a dictionary entry.

(Note that this function returns an entry object, not an error code.)

Parameters:
dictionary The dictionary.
key The entry key.
Returns:
The entry object or a null entry if an entry with the given key does not exist..

Referenced by ai::Dictionary::Impl::Get().

Retrieves an array value from a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value [out] A buffer in which to return the value.

Referenced by ai::Dictionary::Impl::GetArray().

Retrieves an art object from a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
art [out] A buffer in which to return the art object.
AIAPI AIErr(* AIDictionarySuite::GetBinaryEntry)(ConstAIDictionaryRef dictionary, AIDictKey key, void *value, size_t *size)

Retrieves a binary value from a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value [out] A buffer in which to return the value.
size [out] A buffer in which to return the number of bytes in the value buffer.

Referenced by ai::Dictionary::Impl::GetBinary().

Retrieves a boolean value from a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value [out] A buffer in which to return the value.

Referenced by ai::Dictionary::Impl::GetBoolean().

Retrieves a dictionary value from a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value [out] A buffer in which to return the value.

Referenced by ai::Dictionary::Impl::GetDictionary().

Retrieves the data type of an entry.

Parameters:
dict The dictionary.
key The key object.
entryType [out] A buffer in which to return the entry type.
See also:
AIEntrySuite

Referenced by ai::Dictionary::Impl::GetEntryType().

AIAPI AIErr(* AIDictionarySuite::GetIntegerEntry)(ConstAIDictionaryRef dictionary, AIDictKey key, ai::int32 *value)

Retrieves an integer value from a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value [out] A buffer in which to return the value.

Referenced by ai::Dictionary::Impl::GetInteger().

AIAPI const char*(* AIDictionarySuite::GetKeyString)(AIDictKey key)

Retrieves the name string of a key.

(Note that this function returns a string value, not an error code.)

Parameters:
key The key object.
Returns:
The key name.

Referenced by ai::Dictionary::Impl::GetKeyString().

AIAPI AIErr(* AIDictionarySuite::GetPointerEntry)(ConstAIDictionaryRef dictionary, AIDictKey key, ai::intptr *value)

Retrieves a pointer value from a dictionary entry (pointers may be 64-bit or 32-bit depending on platform).

Parameters:
dictionary The dictionary.
key The entry key.
value [out] A buffer in which to return the value.

Referenced by ai::Dictionary::Impl::GetPointer().

AIAPI AIErr(* AIDictionarySuite::GetRealEntry)(ConstAIDictionaryRef dictionary, AIDictKey key, AIReal *value)

Retrieves a real-number value from a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value [out] A buffer in which to return the value.

Referenced by ai::Dictionary::Impl::GetReal().

AIAPI AIErr(* AIDictionarySuite::GetStringEntry)(ConstAIDictionaryRef dictionary, AIDictKey key, const char **value)

Retrieves a string value from a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value [out] A buffer in which to return the value.

Referenced by ai::Dictionary::Impl::GetString().

Retrieves a Unicode string value from a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value [out] A buffer in which to return the value.

Referenced by ai::Dictionary::Impl::GetUnicodeString().

Reports whether there is an entry with a given key in a dictionary.

(Note that this function returns a boolean value, not an error code.)

Parameters:
dict The dictionary.
key The key object.

Referenced by ai::Dictionary::Impl::IsKnown().

AIAPI AIDictKey(* AIDictionarySuite::Key)(const char *keyString)

Finds a dictionary key, or creates a new one if the specified key does not exist.

(Note that this function returns a key object, not an error code.)

Parameters:
key The name of the key.
Returns:
The key object.

Referenced by ai::Dictionary::Impl::GetKey().

Moves an art object from the artwork tree into a dictionary, removing it from the artwork tree.

Parameters:
dictionary The dictionary.
key The entry key.
art The art object.
AIAPI AIErr(* AIDictionarySuite::MoveEntry)(AIDictionaryRef dictionary1, AIDictionaryRef dictionary2, AIDictKey key1, AIDictKey key2)

Moves an entry from one dictionary to another (or to another key in the same dictionary), removing the source entry.

Parameters:
dictionary1 The source dictionary.
dictionary2 The destination dictionary.
key1 The key for the entry to copy and remove.
key2 The key for the new entry.
AIAPI AIErr(* AIDictionarySuite::MoveEntryToArt)(AIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *art)

Moves an art object from a dictionary into the artwork tree, removing the entry from the dictionary.

Parameters:
dictionary The dictionary.
key The entry key.
paintOrder The paint order, relative to the prep object. See AITypes::AIPaintOrder.
prep The prepositional art object. This can be an object whose boundaries might overlap this one, or a compound path or group that might contain this path.
art [out] A buffer in which to return a pointer to the art object.
See also:
AIArtSuite
AIAPI AIErr(* AIDictionarySuite::NewArtEntry)(AIDictionaryRef dictionary, AIDictKey key, ai::int16 type)

Creates an entry which is a new art object of a specified type.

Parameters:
dictionary The dictionary.
key The entry key.
art The art type, an AIArtType value.
AIAPI ai::int32(* AIDictionarySuite::Release)(AIDictionaryRef dictionary)

Frees the memory associated with a dictionary when it is no longer needed (the reference count is 0).

Parameters:
dictionary The dictionary reference. Upon return, the reference is no longer valid.

Sets a dictionary entry.

Entries whose keys are prefixed with the character '-' are temporary, and are not saved to file.

Parameters:
dictionary The dictionary.
key The entry key.
entry The entry object.

Referenced by ai::Dictionary::Impl::Set().

Sets an array value for a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value The new value.

Referenced by ai::Dictionary::Impl::SetArray().

AIAPI AIErr(* AIDictionarySuite::SetBinaryEntry)(AIDictionaryRef dictionary, AIDictKey key, void *value, size_t size)

Sets a binary value for a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value The pointer to the buffer containing the new value.
size The number of bytes in the value buffer.

Referenced by ai::Dictionary::Impl::SetBinary().

Sets a boolean value for a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value The new value.

Referenced by ai::Dictionary::Impl::SetBoolean().

Sets a dictionary value for a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value The new value.

Referenced by ai::Dictionary::Impl::SetDictionary().

Sets an entry in a dictionary to refer to the topmost group of a layer.

Parameters:
dictionary The dictionary.
key The entry key.
layer The layer.
AIAPI AIErr(* AIDictionarySuite::SetIntegerEntry)(AIDictionaryRef dictionary, AIDictKey key, ai::int32 value)

Sets an integer value for a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value The new value.

Referenced by ai::Dictionary::Impl::SetInteger().

AIAPI AIErr(* AIDictionarySuite::SetLayerToEntry)(ConstAIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, AILayerHandle prep, AILayerHandle *layer)

Inserts a new layer in the current document, whose topmost group is the group referenced by a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key, which must reference an art object that is a group.
paintOrder The paint order, relative to the prep object. See AITypes::AIPaintOrder. Valid values are kPlaceDefault, kPlaceAbove, kPlaceBelow, kPlaceAboveAll and kPlaceBelowAll.
prep The prepositional art object. This can be an object whose boundaries might overlap this one, or a compound path or group that might contain this path.
art [out] A buffer in which to return the layer object.
See also:
AIArtSuite, AILayerSuite
AIAPI AIErr(* AIDictionarySuite::SetPointerEntry)(AIDictionaryRef dictionary, AIDictKey key, ai::intptr value)

Sets a pointer value for a temporary dictionary entry.

If the key is not temporary i.e. does not begin with "-", it returns kBadParameterErr

Parameters:
dictionary The dictionary.
key The entry key.
value The new value.

Referenced by ai::Dictionary::Impl::SetPointer().

AIAPI AIErr(* AIDictionarySuite::SetRealEntry)(AIDictionaryRef dictionary, AIDictKey key, AIReal value)

Sets a real-number value for a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value The new value.

Referenced by ai::Dictionary::Impl::SetReal().

AIAPI AIErr(* AIDictionarySuite::SetStringEntry)(AIDictionaryRef dictionary, AIDictKey key, const char *value)

Sets a string value for a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value The new value.

Referenced by ai::Dictionary::Impl::SetString().

Sets a Unicode string value for a dictionary entry.

Parameters:
dictionary The dictionary.
key The entry key.
value The new value.

Referenced by ai::Dictionary::Impl::SetUnicodeString().

AIAPI ai::uint32(* AIDictionarySuite::Size)(ConstAIDictionaryRef dict)

Gets the number of entries in a dictionary.

(Note that this function returns a numeric value, not an error code.)

Parameters:
dict The dictionary.
Returns:
The number of entries.

Swaps two entries in two dictionaries, or in the same dictionary.

Parameters:
dictionary1 The source dictionary.
dictionary2 The destination dictionary.
key1 The first key (in dictionary1, moved to dictionary2).
key2 The second key (in dictionary2, moved to dictionary1).

Marks art as changed when a change has been made to the dictionary that affects a user-visible property of any associated art object.

This causes any styles or plug-in groups containing the affected object to execute.

Parameters:
dictionary The dictionary.

Referenced by ai::Dictionary::Impl::TouchArt().


The documentation for this struct was generated from the following file:


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2014 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks