7#ifndef __HDI_CORE_ARRAY_PREF__
8#define __HDI_CORE_ARRAY_PREF__
35 #if defined(HDI_CORE_AIP_MODE)
39 class TransformMatrix;
41 class ArtboardPointPref;
42 class ArtboardRectPref;
45 class DashStyleMapPref;
47 class FillStyleMapPref;
49 class PathStyleMapPref;
50 class StrokeStylePref;
51 class StrokeStyleMapPref;
52 class TransformMatrixPref;
62 typedef std::vector< std::shared_ptr<PrefData> > PrefDataVector;
84 ArrayPref(
const PrefDataVector* elements_ = NULL,
const std::string& name_ =
"");
139 virtual bool element(
const uint32_t index_, std::unique_ptr<PrefData>& data__)
const;
191 virtual bool removeElement(
const uint32_t index_, std::unique_ptr<PrefData>& data__);
228 const uint32_t index_,
229 const PrefDataVector* elements_,
233 #if defined(HDI_CORE_AIP_MODE)
259 const uint32_t index_,
289 const uint32_t index_,
319 const uint32_t index_,
376 #if defined(HDI_CORE_AIP_MODE)
403 const uint32_t index_,
434 const uint32_t index_,
470 const uint32_t index_,
471 const PrefDataVector* members_,
475 #if defined(HDI_CORE_AIP_MODE)
502 const uint32_t index_,
533 const uint32_t index_,
565 const uint32_t index_,
566 const Font& defaultFont_,
567 const double defaultSize_,
571 #if defined(HDI_CORE_AIP_MODE)
597 const uint32_t index_,
644 #if defined(HDI_CORE_AIP_MODE)
671 const uint32_t index_,
702 const uint32_t index_,
810 const uint32_t index_,
811 const std::string& default_,
815 #if defined(HDI_CORE_AIP_MODE)
842 const uint32_t index_,
873 const uint32_t index_,
881 typedef std::unique_ptr<ArrayPref> ArrayPrefUP;
882 typedef std::shared_ptr<ArrayPref> ArrayPrefSP;
883 typedef std::weak_ptr<ArrayPref> ArrayPrefWP;
Acts as an array-style container to store any other persistent data types, including arrays and dicti...
Definition: hdicoreArrayPref.h:60
virtual bool getPathStyleMapElement(const uint32_t index_, PathStyleMapPref &ps__)
Gets a persistent path style map object from the dictionary.
virtual bool getPathStyleElement(const uint32_t index_, PathStylePref &ps__)
Gets a persistent path style object from the dictionary.
virtual bool element(const uint32_t index_, std::unique_ptr< PrefData > &data__) const
Gets a single element object from the array data tree.
virtual bool getFillStyleMapElement(const uint32_t index_, FillStyleMapPref &fs__)
Gets a persistent fill style map object from the dictionary.
virtual bool getArtboardRectElement(const uint32_t index_, ArtboardRectPref &abr__) const
Gets a persistent artboard rect object from the array.
virtual bool getOrCreateFontElement(const uint32_t index_, const Font &defaultFont_, const double defaultSize_, FontPref &font__)
Similar to getFontElement(), except that, if the element does not already exist, it will be created a...
virtual bool getOrCreatePathStyleElement(const uint32_t index_, const PathStyle &default_, PathStylePref &ps__)
Similar to getPathStyleElement(), except that, if the element does not already exist,...
virtual bool getArtColorElement(const uint32_t index_, ArtColorPref &ac__) const
Gets a persistent art color object from the array.
virtual bool getDictElement(const uint32_t index_, DictionaryPref &dict__) const
Gets a persistent dictionary object from the array.
virtual bool getTransformMatrixElement(const uint32_t index_, TransformMatrixPref &tm__) const
Gets a persistent matrix object from the array.
virtual uint32_t count() const
Gets the count of elements in the top-level of the array.
virtual bool getArrayElement(const uint32_t index_, ArrayPref &array__) const
Gets a persistent array object from the containing array.
virtual bool getDashStyleMapElement(const uint32_t index_, DashStyleMapPref &ds__)
Gets a persistent dash style map object from the dictionary.
virtual bool getOrCreateStrokeStyleMapElement(const uint32_t index_, const StrokeStyle::Map &default_, StrokeStyleMapPref &ss__)
Similar to getStrokeStyleMapElement(), except that, if the element does not already exist,...
virtual bool getDashStyleElement(const uint32_t index_, DashStylePref &ds__)
Gets a persistent dash style object from the dictionary.
virtual bool getOrCreateStrokeStyleElement(const uint32_t index_, const StrokeStyle &default_, StrokeStylePref &ss__)
Similar to getStrokeStyleElement(), except that, if the element does not already exist,...
virtual bool getRectElement(const uint32_t index_, RectPref &r__) const
Gets a persistent rect object from the array.
virtual bool getOrCreateIntElement(const uint32_t index_, const int64_t default_, NumberPref &n__)
Similar to getNumberElement(), except that, if the element does not already exist,...
virtual bool removeElement(const uint32_t index_, std::unique_ptr< PrefData > &data__)
Removes a persistent data object from an arbitrary position in the array.
virtual ArrayPref & operator=(const ArrayPref &rhs_)
Allows one ArrayPref object to be assigned from another.
virtual bool getOrCreateFillStyleMapElement(const uint32_t index_, const FillStyle::Map &default_, FillStyleMapPref &fs__)
Similar to getFillStyleMapElement(), except that, if the element does not already exist,...
virtual bool getOrCreateBoolElement(const uint32_t index_, const bool default_, BoolPref &b__)
Similar to getBoolElement(), except that, if the element does not already exist, it will be created a...
virtual bool getOrCreatePointElement(const uint32_t index_, const Point &default_, PointPref &p__)
Similar to getPointElement(), except that, if the element does not already exist, it will be created ...
virtual bool getOrCreateArtboardPointElement(const uint32_t index_, const ArtboardPoint &default_, ArtboardPointPref &abp__)
Similar to getArtboardPointElement(), except that, if the element does not already exist,...
virtual bool getOrCreateArtColorElement(const uint32_t index_, const ArtColor &default_, ArtColorPref &ac__)
Similar to getArtColorElement(), except that, if the element does not already exist,...
virtual void clear()
Removes all elements from an array.
virtual bool getOrCreateStringElement(const uint32_t index_, const std::string &default_, StringPref &str__)
Similar to getStringElement(), except that, if the element does not already exist,...
ArrayPref(const PrefDataVector *elements_=NULL, const std::string &name_="")
Constructs an ArrayPref object, with new data, to be added to a container at a later time.
virtual bool getNumberElement(const uint32_t index_, NumberPref &n__) const
Gets a persistent number object from the array.
virtual bool insertElement(const uint32_t index_, const PrefData &data_)
Inserts a persistent data object at an arbitrary position in the array.
virtual bool getOrCreateDashStyleElement(const uint32_t index_, const DashStyle &default_, DashStylePref &ds__)
Similar to getDashStyleElement(), except that, if the element does not already exist,...
virtual bool getOrCreateFillStyleElement(const uint32_t index_, const FillStyle &default_, FillStylePref &fs__)
Similar to getFillStyleElement(), except that, if the element does not already exist,...
virtual bool getSizeElement(const uint32_t index_, SizePref &s__) const
Gets a persistent size object from the array.
virtual bool getOrCreateDictElement(const uint32_t index_, const PrefDataVector *members_, DictionaryPref &dict__)
Similar to getDictElement(), except that, if the element does not already exist, it will be created a...
virtual bool pushElement(const PrefData &data_)
Adds a persistent data object to the end of the array.
virtual bool getStrokeStyleElement(const uint32_t index_, StrokeStylePref &ss__)
Gets a persistent stroke style object from the dictionary.
virtual bool getOrCreateDashStyleMapElement(const uint32_t index_, const DashStyle::Map &default_, DashStyleMapPref &ds__)
Similar to getDashStyleMapElement(), except that, if the element does not already exist,...
virtual bool getOrCreateArrayElement(const uint32_t index_, const PrefDataVector *elements_, ArrayPref &array__)
Similar to getArrayElement(), except that, if the element does not already exist, it will be created ...
virtual bool getOrCreateFloatElement(const uint32_t index_, const double default_, NumberPref &n__)
Similar to getNumberElement(), except that, if the element does not already exist,...
virtual bool getArtboardPointElement(const uint32_t index_, ArtboardPointPref &abp__) const
Gets a persistent point object from the array.
virtual bool getOrCreateColorElement(const uint32_t index_, const Color &default_, ColorPref &c__)
Similar to getColorElement(), except that, if the element does not already exist, it will be created ...
virtual ArrayPref * clone() const
Convenience method to clone an ArrayPref object on the heap.
virtual bool getOrCreateRectElement(const uint32_t index_, const Rect &default_, RectPref &r__)
Similar to getRectElement(), except that, if the element does not already exist, it will be created a...
virtual bool getOrCreateSizeElement(const uint32_t index_, const Size &default_, SizePref &s__)
Similar to getSizeElement(), except that, if the element does not already exist, it will be created a...
virtual bool getColorElement(const uint32_t index_, ColorPref &c__) const
Gets a persistent color object from the array.
virtual bool getStringElement(const uint32_t index_, StringPref &str__) const
Gets a persistent string object from the array.
virtual bool getBoolElement(const uint32_t index_, BoolPref &b__) const
Gets a persistent bool object from the array.
virtual bool getPointElement(const uint32_t index_, PointPref &p__) const
Gets a persistent point object from the array.
virtual bool getOrCreateArtboardRectElement(const uint32_t index_, const ArtboardRect &default_, ArtboardRectPref &abr__)
Similar to getArtboardRectElement(), except that, if the element does not already exist,...
ArrayPref(const ArrayPref &array_)
Constructs a new ArrayPref object from an existing ArrayPref object (copy constructor)
virtual bool getFontElement(const uint32_t index_, FontPref &font__) const
Gets a persistent font object from the array.
virtual bool getStrokeStyleMapElement(const uint32_t index_, StrokeStyleMapPref &ss__)
Gets a persistent stroke style map object from the dictionary.
virtual bool getOrCreateTransformMatrixElement(const uint32_t index_, const TransformMatrix &default_, TransformMatrixPref &tm__)
Similar to getTransformMatrixElement(), except that, if the element does not already exist,...
virtual bool getOrCreatePathStyleMapElement(const uint32_t index_, const PathStyle::Map &default_, PathStyleMapPref &ps__)
Similar to getPathStyleMapElement(), except that, if the element does not already exist,...
virtual bool popElement(std::unique_ptr< PrefData > &data__)
Removes a persistent data object from the end of the array.
virtual ~ArrayPref()
Destructs an ArrayPref object.
virtual bool getFillStyleElement(const uint32_t index_, FillStylePref &fs__)
Gets a persistent fill style object from the dictionary.
Describes the color of art on the artboard.
Definition: hdicoreArtColor.h:40
Allows for storage of art colors.
Definition: hdicoreArtColorPref.h:23
Describes a point on the Illustrator artboard.
Definition: hdicoreArtboardPoint.h:31
Allows for storage of 2D artboard points.
Definition: hdicoreArtboardPointPref.h:23
Describes a rectangular area on the Illustrator artboard.
Definition: hdicoreArtboardRect.h:28
Allows for storage of artboard rects/bounds.
Definition: hdicoreArtboardRectPref.h:23
Allows for storage of bools.
Definition: hdicoreBoolPref.h:20
Describes an RGB color, with opacity, typically for UI purposes.
Definition: hdicoreColor.h:32
Allows for storage of colors.
Definition: hdicoreColorPref.h:21
Acts as a DashStyle value map, indicating which values are "known".
Definition: hdicorePathStyle.h:33
Describes the dash styling of a path.
Definition: hdicorePathStyle.h:22
Allows for storage of dash style maps.
Definition: hdicoreDashStyleMapPref.h:28
Allows for storage of dash styles.
Definition: hdicoreDashStylePref.h:28
Acts as a dictionary-style container to store any other persistent data types, including arrays and d...
Definition: hdicoreDictionaryPref.h:60
Acts as a FillStyle value map, indicating which values are "known".
Definition: hdicorePathStyle.h:153
Describes the fill styling of a path.
Definition: hdicorePathStyle.h:147
Allows for storage of fill style maps.
Definition: hdicoreFillStyleMapPref.h:28
Allows for storage of fill styles.
Definition: hdicoreFillStylePref.h:28
Font class to allow for easy font manipulation.
Definition: hdicoreFont.h:183
Allows for storage of font faces and sizes.
Definition: hdicoreFontPref.h:22
Allows for the storage of numbers.
Definition: hdicoreNumberPref.h:20
Acts as a StrokeStyle value map, indicating which values are "known".
Definition: hdicorePathStyle.h:448
Describes all styling attributes of a path.
Definition: hdicorePathStyle.h:442
Allows for storage of path style maps.
Definition: hdicorePathStyleMapPref.h:23
Allows for storage of path styles.
Definition: hdicorePathStylePref.h:23
Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document ...
Definition: hdicorePoint.h:38
Allows for storage of 2D points.
Definition: hdicorePointPref.h:21
Base class for persistent data objects, stored via JSON.
Definition: hdicorePrefData.h:25
Contains Point and Size objects to describe a rectangle that exists at a specific point of given dime...
Definition: hdicoreRect.h:34
Allows for storage of rects/bounds.
Definition: hdicoreRectPref.h:21
Contains a width and height for a rectangular shape.
Definition: hdicoreSize.h:25
Allows for storage of 2D sizes.
Definition: hdicoreSizePref.h:21
Allows for the storage of strings.
Definition: hdicoreStringPref.h:20
Acts as a StrokeStyle value map, indicating which values are "known".
Definition: hdicorePathStyle.h:287
Describes the stroke styling of a path.
Definition: hdicorePathStyle.h:260
Allows for storage of stroke style maps.
Definition: hdicoreStrokeStyleMapPref.h:28
Allows for storage of stroke styles.
Definition: hdicoreStrokeStylePref.h:28
Header file for path style-related classes.
Header file for general preference data storage.