![]() | InDesign SDK 20.5 |
Public Types | |
| enum | Type { kBoolean, kInteger, kLongInteger, kReal, kString, kFile, kDate, kDictionary, kArray, kInvalidType = 0xffffffff } |
Public Member Functions | |
| virtual Type | GetType () const =0 |
| virtual ObjectPtr | CreateBoolean (bool16 value) const =0 |
| virtual ObjectPtr | CreateInteger (int32 value) const =0 |
| virtual ObjectPtr | CreateLongInteger (int64 value) const =0 |
| virtual ObjectPtr | CreateReal (PMReal const &value) const =0 |
| virtual ObjectPtr | CreateString (WideString const &value) const =0 |
| virtual ObjectPtr | CreateFile (IDFile const &value) const =0 |
| virtual ObjectPtr | CreateDate (IDTime const &value) const =0 |
| virtual ObjectPtr | CreateDictionary () const =0 |
| virtual ObjectPtr | CreateArray (size_t size=0) const =0 |
| virtual bool | GetBoolean (bool16 &value) const =0 |
| virtual bool | SetBoolean (bool16 value)=0 |
| virtual bool | GetInteger (int32 &value) const =0 |
| virtual bool | SetInteger (int32 value)=0 |
| virtual bool | GetLongInteger (int64 &value) const =0 |
| virtual bool | SetLongInteger (int64 value)=0 |
| virtual bool | GetReal (PMReal &value) const =0 |
| virtual bool | SetReal (PMReal const &value)=0 |
| virtual bool | GetString (WideString &value) const =0 |
| virtual bool | SetString (WideString const &value)=0 |
| virtual bool | GetFile (IDFile &value) const =0 |
| virtual bool | SetFile (IDFile const &value)=0 |
| virtual bool | GetDate (IDTime &value) const =0 |
| virtual bool | SetDate (IDTime const &value)=0 |
| virtual bool | GetDictionaryKeys (K2Vector< WideString > &keys) const =0 |
| virtual bool | GetDictionaryValue (WideString const &key, ObjectPtr &value) const =0 |
| virtual bool | SetDictionaryValue (WideString const &key, ObjectPtr const &value)=0 |
| virtual bool | RemoveDictionaryValue (WideString const &key)=0 |
| virtual bool | ClearDictionary ()=0 |
| virtual bool | GetArraySize (size_t &size) const =0 |
| virtual bool | SetArraySize (size_t size)=0 |
| virtual bool | GetNthArrayValue (size_t index, ObjectPtr &value) const =0 |
| virtual bool | SetNthArrayValue (size_t index, ObjectPtr const &value)=0 |
| virtual bool | AppendArrayValue (ObjectPtr const &value)=0 |
| bool | GetBooleanValue (WideString const &key, bool16 &value) const |
| bool | SetBooleanValue (WideString const &key, bool16 value) |
| bool | GetIntegerValue (WideString const &key, int32 &value) const |
| bool | SetIntegerValue (WideString const &key, int32 value) |
| bool | GetLongIntegerValue (WideString const &key, int64 &value) const |
| bool | SetLongIntegerValue (WideString const &key, int64 value) |
| bool | GetRealValue (WideString const &key, PMReal &value) const |
| bool | SetRealValue (WideString const &key, PMReal const &value) |
| bool | GetStringValue (WideString const &key, WideString &value) const |
| bool | SetStringValue (WideString const &key, WideString const &value) |
| bool | GetFileValue (WideString const &key, IDFile &value) const |
| bool | SetFileValue (WideString const &key, IDFile const &value) |
| bool | GetDateValue (WideString const &key, IDTime &value) const |
| bool | SetDateValue (WideString const &key, IDTime const &value) |
| bool | GetNthArrayRealValue (size_t index, PMReal &value) const |
| bool | GetNthArrayFileValue (size_t index, IDFile &value) const |
| ObjectPtr | CreatePointObject (PMReal const &x, PMReal const &y) const |
| ObjectPtr | CreatePMPointObject (PMPoint const &p) const |
| bool | GetPMPointValue (WideString const &key, PMPoint &point) const |
| ObjectPtr | CreateRectObject (PMReal const &left, PMReal const &top, PMReal const &right, PMReal const &bottom) const |
| ObjectPtr | CreatePMRectObject (PMRect const &r) const |
| bool | GetPMRectValue (WideString const &key, PMRect &bounds) const |
| ObjectPtr | CreateAssetObject (IDFile const &file, WideString const &id, WideString const &tag=WideString()) const |
| bool | GetAssetObjectValues (IDFile &file, WideString &id, WideString &tag) const |
Object types
| pure virtual |
Appends a value to an array object. Fails if the object is not an array or if the value is invalid (null).
| value | The value to be appended |
| pure virtual |
Clears a dictionary object. Fails if the object isn't a dictionary.
| pure virtual |
Factory method for creating an instance of an array object.
| size | The array's initial size |
| inline |
Factory method for creating an asset object. An asset is a 3-tuple comprised of a file, an ID, and a tag. The returned object is a dictionary.
| file | The file portion of the asset |
| id | The asset's ID |
| tag | The asset's tag (optional) |
| pure virtual |
Factory method for creating an instance of a boolean object.
| value | The object's initial value |
| pure virtual |
Factory method for creating an instance of a date object.
| value | The object's initial value |
| pure virtual |
Factory method for creating an instance of a dictionary object.
| pure virtual |
Factory method for creating an instance of a file object.
| value | The object's initial value |
| pure virtual |
Factory method for creating an instance of an integer object.
| value | The object's initial value |
| pure virtual |
Factory method for creating an instance of a long integer object.
| value | The object's initial value |
| inline |
Factory method for creating an object to represent a PMPoint
| r | The point whose value is used to create the object |
| inline |
Factory method for creating an object to represent a PMRect
| r | The rectangle whose value is used to create the object |
Factory method for creating an object to represent a PMPoint
| x | The point's x value |
| y | The point's y value |
| pure virtual |
Factory method for creating an instance of a real (floating point) object.
| value | The object's initial value |
| inline |
Factory method for creating an object to represent a PMRect
| left | The rectangle's left value |
| top | The rectangle's top value |
| right | The rectangle's right value |
| bottom | The rectangle's bottom value |
| pure virtual |
Factory method for creating an instance of a string object.
| value | The object's initial value |
| pure virtual |
Retrieves the size of an array object. Fails if the object is not an array.
| size | Out param that receives the size of the array |
| inline |
Convenience method for retrieving the values for an asset from an object, which is assumed to be a dictionary with File and ID values. Fails if not.
Note: This assumes that the assets used by calling code require both the File and ID values. If this is not the case, you should consider simply calling yourAssetObject->GetFileValue(WideString("File"), file).
| file | Out param to receive the file portion of this asset |
| id | Out param to receive the asset's ID |
| tag | Out param to receive the asset's tag |
| pure virtual |
Boolean getter. Assumes object is a boolean. Fails if not.
| value | Out param to receive the object's value |
| inline |
Boolean getter. Assumes object is a dictionary and the child value indexed by key is a boolean. Fails if not.
| key | The key to retrieve |
| value | Out param to receive the object's value |
| pure virtual |
Date getter. Assumes object is a date. Fails if not.
| value | Out param to receive the object's value |
| inline |
Date getter. Assumes object is a dictionary and the child value indexed by key is a date. Fails if not.
| key | The key to retrieve |
| value | Out param to receive the object's value |
| pure virtual |
Retrieves the set of keys stored in the object, which is assumed to be a dictionary. Fails if object isn't a dictionary.
| keys | Out param that receives the list of defined keys |
| pure virtual |
Retrieves a value from a dictionary object. Fails if the key isn't defined or if the object isn't a dictionary (use GetType to distinguish).
| key | The key whose value is to be retrieved |
| value | Out param to receive the object associated with key |
| pure virtual |
File getter. Assumes object is a file. Fails if not.
| value | Out param to receive the object's value |
| inline |
File getter. Assumes object is a dictionary and the child value indexed by key is a file. Fails if not.
| key | The key to retrieve |
| value | Out param to receive the object's value |
| pure virtual |
Integer getter. Assumes object is an integer. Fails if not.
| value | Out param to receive the object's value |
| inline |
Integer getter. Assumes object is a dictionary and the child value indexed by key is an integer. Fails if not.
| key | The key to retrieve |
| value | Out param to receive the object's value |
| pure virtual |
Long integer getter. Assumes object is a long integer. Fails if not.
| value | Out param to receive the object's value |
| inline |
Long integer getter. Assumes object is a dictionary and the child value indexed by key is a long integer. Fails if not.
| key | The key to retrieve |
| value | Out param to receive the object's value |
| inline |
Retrieves the nth file value from an array object. Fails if object is not an array, if index is out of range, or value at index is not a file.
| index | The index to query |
| value | Out param to receive the file value |
| inline |
Retrieves the nth real (floating point) value from an array object. Fails if object is not an array, if index is out of range, or value at index is not a real.
| index | The index to query |
| value | Out param to receive the real value |
| pure virtual |
Retrieves the nth value in an array object. Fails if the object is not an array or if the index is invalid.
| index | The index of the value to retrieve |
| value | Out param to receive the object at index |
| inline |
Retrieves the PMPoint value associated with a key from a dictionary. Fails if object is not a dictionary or if value at key is undefined or invalid.
| key | The key to query |
| bounds | Out param to receive the rectangle value |
| inline |
Retrieves the PMRect value associated with a key from a dictionary. Fails if object is not a dictionary or if value at key is undefined or invalid.
| key | The key to query |
| bounds | Out param to receive the rectangle value |
| pure virtual |
Real getter. Assumes object is a real (floating point value). Fails if not.
| value | Out param to receive the object's value |
| inline |
Real getter. Assumes object is a dictionary and the child value indexed by key is a real (floating point value). Fails if not.
| key | The key to retrieve |
| value | Out param to receive the object's value |
| pure virtual |
String getter. Assumes object is a string. Fails if not.
| value | Out param to receive the object's value |
| inline |
String getter. Assumes object is a dictionary and the child value indexed by key is a string. Fails if not.
| key | The key to retrieve |
| value | Out param to receive the object's value |
| pure virtual |
| pure virtual |
Removes a key from a dictionary object. Fails if the object isn't a dictionary.
Note: Return value does not reflect whether a key was actually removed, only if the operation itself was successful (i.e., this object is a dictioanry)
| key | The key to remove |
| pure virtual |
Sets the size of an array object. Fails if the object is not an array.
Note: If the array is made larger, it is padded with invalid (null) objects. These are not considered valid objects and care should be exercised when doing this. Recommended use is to immediately fill open slots with valid values or to use the simpler AppendArrayValue method instead.
| size | The new size of the array |
| pure virtual |
Boolean setter. Assumes object is a boolean. Fails if not.
| value | The object's new value |
| inline |
Boolean setter. Assumes object is a dictionary. Fails if not.
Note: If a boolean value already exists under key in the dictionary, its value is replaced; otherwise a new value is created and stored.
| key | The key to set |
| value | The value to be stored |
| pure virtual |
Date setter. Assumes object is a date. Fails if not.
| value | The object's new value |
| inline |
Date setter. Assumes object is a dictionary. Fails if not.
Note: If a date value already exists under key in the dictionary, its value is replaced; otherwise a new value is created and stored.
| key | The key to set |
| value | The value to be stored |
| pure virtual |
Sets a value in a dictionary object. Fails if the object isn't a dictionary.
Note: Any value currently associated with key will be replaced
| key | The key whose value is to be set |
| value | The value to associate with key |
| pure virtual |
File setter. Assumes object is a file. Fails if not.
| value | The object's new value |
| inline |
File setter. Assumes object is a dictionary. Fails if not.
Note: If a file value already exists under key in the dictionary, its value is replaced; otherwise a new value is created and stored.
| key | The key to set |
| value | The value to be stored |
| pure virtual |
Integer setter. Assumes object is an integer. Fails if not.
| value | The object's new value |
| inline |
Integer setter. Assumes object is a dictionary. Fails if not.
Note: If a integer value already exists under key in the dictionary, its value is replaced; otherwise a new value is created and stored.
| key | The key to set |
| value | The value to be stored |
| pure virtual |
Long integer setter. Assumes object is a long integer. Fails if not.
| value | The object's new value |
| inline |
Long integer setter. Assumes object is a dictionary. Fails if not.
Note: If a long integer value already exists under key in the dictionary, its value is replaced; otherwise a new value is created and stored.
| key | The key to set |
| value | The value to be stored |
| pure virtual |
Sets the nth value in an array object. Fails if the object is not an array, if the index is invalid, or if the value is invalid (null).
| index | The index at which to store the value |
| value | The value to be stored |
| pure virtual |
Real setter. Assumes object is a real (floating point value). Fails if not.
| value | The object's new value |
| inline |
Real (floating point) setter. Assumes object is a dictionary. Fails if not.
Note: If a real value already exists under key in the dictionary, its value is replaced; otherwise a new value is created and stored.
| key | The key to set |
| value | The value to be stored |
| pure virtual |
String setter. Assumes object is a string. Fails if not.
| value | The object's new value |
| inline |
String setter. Assumes object is a dictionary. Fails if not.
Note: If a string value already exists under key in the dictionary, its value is replaced; otherwise a new value is created and stored.
| key | The key to set |
| value | The value to be stored |