7#ifndef __HDI_CORE_DICTIONARY_PREF__
8#define __HDI_CORE_DICTIONARY_PREF__
35 #if defined(HDI_CORE_AIP_MODE)
62 typedef std::vector< std::shared_ptr<PrefData> > PrefDataVector;
63 typedef std::vector< std::string > KeyVector;
188 std::unique_ptr<PrefData>
value()
const;
193 friend class DictionaryPref;
214 explicit Iterator(
const DictionaryPref& dict_);
217 typedef std::unique_ptr<Iterator> IteratorUP;
218 typedef std::shared_ptr<Iterator> IteratorSP;
219 typedef std::weak_ptr<Iterator> IteratorWP;
243 DictionaryPref(
const PrefDataVector* members_ = NULL,
const std::string& name_ =
"");
312 virtual bool member(
const std::string& name_, std::unique_ptr<PrefData>& data__)
const;
327 virtual bool removeMember(
const std::string& name_, std::unique_ptr<PrefData>& data__);
382 const std::string& name_,
383 const PrefDataVector* elements_,
387 #if defined(HDI_CORE_AIP_MODE)
414 const std::string& key_,
445 const std::string& key_,
476 const std::string& key_,
508 const std::string& key_,
538 const std::string& key_,
539 const Color& default_,
543 #if defined(HDI_CORE_AIP_MODE)
570 const std::string& key_,
601 const std::string& key_,
638 const std::string& name_,
639 const PrefDataVector* members_,
643 #if defined(HDI_CORE_AIP_MODE)
670 const std::string& key_,
701 const std::string& key_,
734 const std::string& key_,
735 const Font& defaultFont_,
736 const double defaultSize_,
740 #if defined(HDI_CORE_AIP_MODE)
767 const std::string& key_,
816 #if defined(HDI_CORE_AIP_MODE)
843 const std::string& key_,
874 const std::string& key_,
985 const std::string& key_,
986 const std::string& default_,
990 #if defined(HDI_CORE_AIP_MODE)
1017 const std::string& key_,
1048 const std::string& key_,
1056 typedef std::unique_ptr<DictionaryPref> DictionaryPrefUP;
1057 typedef std::shared_ptr<DictionaryPref> DictionaryPrefSP;
1058 typedef std::weak_ptr<DictionaryPref> DictionaryPrefWP;
Acts as an array-style container to store any other persistent data types, including arrays and dicti...
Definition hdicoreArrayPref.h:60
Describes the color of art on the artboard.
Definition hdicoreArtColor.h:42
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:34
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
Allows for iteration through the members of a dictionary pref, a la std::vector iteration.
Definition hdicoreDictionaryPref.h:77
~Iterator()
Destructs an Iterator object.
bool operator==(const Iterator &rhs_) const
Tests whether a given Iterator object is the same as another.
Iterator & operator--()
Prefix decrement operator for reverse iteration.
Iterator operator--(int)
Postfix decrement operator for reverse iteration.
Iterator & operator++()
Prefix increment operator for forward iteration.
std::unique_ptr< PrefData > value() const
Gets the current member's value as pointed to by the iterator.
bool atEnd() const
Determines whether iteration should stop; works well as the conditional in a for() loop.
std::string key() const
Gets the current member's key as pointed to by the iterator.
bool operator!=(const Iterator &rhs_) const
Tests whether a given Iterator object is not the same as another.
Iterator(const Iterator &iter_)
Constructs an Iterator object from an existing Iterator object (copy constructor)
Iterator & operator=(const Iterator &rhs_)
Assigns one Iterator object to another.
Iterator operator++(int)
Postfix increment operator for forward iteration.
virtual bool getPathStyleMapMember(const std::string &key_, PathStyleMapPref &ps__)
Gets a persistent path style map object from the dictionary.
virtual bool getArtboardPointMember(const std::string &key_, ArtboardPointPref &abp__) const
Gets a persistent artboard point object from the dictionary.
virtual ~DictionaryPref()
Destructs a DictionaryPref object.
virtual bool getTransformMatrixMember(const std::string &key_, TransformMatrixPref &tm__) const
Gets a persistent matrix object from the dictionary.
virtual bool getStrokeStyleMapMember(const std::string &key_, StrokeStyleMapPref &ss__)
Gets a persistent stroke style map object from the dictionary.
virtual DictionaryPref & operator=(const DictionaryPref &rhs_)
Allows one DictionaryPref object to be assigned from another.
virtual bool getFillStyleMember(const std::string &key_, FillStylePref &fs__)
Gets a persistent fill style object from the dictionary.
virtual bool getNumberMember(const std::string &key_, NumberPref &n__) const
Gets a persistent number object from the dictionary.
virtual Iterator begin() const
Gets an iterator for the dictionary.
virtual bool getOrCreateTransformMatrixMember(const std::string &key_, const TransformMatrix &default_, TransformMatrixPref &tm__)
Similar to getTransformMatrixMember(), except that, if the member does not already exist,...
virtual bool getOrCreateColorMember(const std::string &key_, const Color &default_, ColorPref &c__)
Similar to getColorMember(), except that, if the member does not already exist, it will be created an...
virtual bool getOrCreateFloatMember(const std::string &key_, const double default_, NumberPref &n__)
Similar to getNumberMember(), except that, if the member does not already exist, it will be created a...
virtual bool getDictMember(const std::string &key_, DictionaryPref &dict__) const
Gets a persistent dictionary object from the dictionary.
virtual bool getStrokeStyleMember(const std::string &key_, StrokeStylePref &ss__)
Gets a persistent stroke style object from the dictionary.
virtual bool getOrCreateFillStyleMapMember(const std::string &key_, const FillStyle::Map &default_, FillStyleMapPref &fs__)
Similar to getFillStyleMapMember(), except that, if the member does not already exist,...
virtual bool getOrCreateDashStyleMember(const std::string &key_, const DashStyle &default_, DashStylePref &ds__)
Similar to getDashStyleMember(), except that, if the member does not already exist,...
virtual bool getOrCreateIntMember(const std::string &key_, const int64_t default_, NumberPref &n__)
Similar to getNumberMember(), except that, if the member does not already exist, it will be created a...
virtual bool member(const std::string &name_, std::unique_ptr< PrefData > &data__) const
Gets a single member object from the dictionary data tree.
virtual bool getArrayMember(const std::string &key_, ArrayPref &array__) const
Gets a persistent array object from the containing dictionary.
virtual bool getPointMember(const std::string &key_, PointPref &p__) const
Gets a persistent point object from the dictionary.
virtual bool getOrCreateDictMember(const std::string &name_, const PrefDataVector *members_, DictionaryPref &dict__)
Similar to getDictMember(), except that, if the member does not already exist, it will be created ane...
virtual KeyVector allKeys() const
Gets a vector of all keys contained by the target dictionary.
virtual bool getOrCreateStrokeStyleMember(const std::string &key_, const StrokeStyle &default_, StrokeStylePref &ss__)
Similar to getStrokeStyleMember(), except that, if the member does not already exist,...
virtual void clear()
Removes all members from the target dictionary.
virtual bool getSizeMember(const std::string &key_, SizePref &s__) const
Gets a persistent size object from the dictionary.
virtual bool getOrCreateStringMember(const std::string &key_, const std::string &default_, StringPref &str__)
Similar to getStringMember(), except that, if the member does not already exist, it will be created a...
virtual bool getOrCreateRectMember(const std::string &key_, const Rect &default_, RectPref &r__)
Similar to getRectMember(), except that, if the member does not already exist, it will be created ane...
virtual bool getArtboardRectMember(const std::string &key_, ArtboardRectPref &abr__) const
Gets a persistent artboard rect object from the dictionary.
virtual bool getOrCreateBoolMember(const std::string &key_, const bool default_, BoolPref &b__)
Similar to getBoolMember(), except that, if the member does not already exist, it will be created ane...
virtual bool getFillStyleMapMember(const std::string &key_, FillStyleMapPref &fs__)
Gets a persistent fill style map object from the dictionary.
virtual bool addMember(const PrefData &data_)
Adds a PrefData object into the dictionary member tree at the top-level.
virtual bool getFontMember(const std::string &key_, FontPref &f__) const
Gets a persistent font object from the dictionary.
virtual bool getOrCreateArtboardPointMember(const std::string &key_, const ArtboardPoint &default_, ArtboardPointPref &abp__)
Similar to getArtboardPointMember(), except that, if the member does not already exist,...
virtual bool removeMember(const std::string &name_, std::unique_ptr< PrefData > &data__)
Removes a PrefData member from the dictionary.
virtual bool getOrCreatePointMember(const std::string &key_, const Point &default_, PointPref &p__)
Similar to getPointMember(), except that, if the member does not already exist, it will be created an...
virtual DictionaryPref * clone() const
Convenience method to clone an DictionaryPref object on the heap.
virtual bool getArtColorMember(const std::string &key_, ArtColorPref &ac__) const
Gets a persistent art color object from the dictionary.
DictionaryPref(const PrefDataVector *members_=NULL, const std::string &name_="")
Constructs a DictionaryPref object, with new data, to be added to a container at a later time.
virtual bool getColorMember(const std::string &key_, ColorPref &c__) const
Gets a persistent color object from the dictionary.
virtual bool getBoolMember(const std::string &key_, BoolPref &b__) const
Gets a persistent bool object from the dictionary.
DictionaryPref(const DictionaryPref &dict_)
Constructs a new DictionaryPref object from an existing DictionaryPref object (copy constructor)
virtual bool getOrCreateArtboardRectMember(const std::string &key_, const ArtboardRect &default_, ArtboardRectPref &abr__)
Similar to getArtboardRectMember(), except that, if the member does not already exist,...
virtual bool getOrCreateArtColorMember(const std::string &key_, const ArtColor &default_, ArtColorPref &ac__)
Similar to getArtColorMember(), except that, if the member does not already exist,...
virtual bool getDashStyleMember(const std::string &key_, DashStylePref &ds__)
Gets a persistent dash style object from the dictionary.
virtual bool getRectMember(const std::string &key_, RectPref &r__) const
Gets a persistent rect object from the dictionary.
virtual bool getDashStyleMapMember(const std::string &key_, DashStyleMapPref &ds__)
Gets a persistent dash style map object from the dictionary.
virtual bool getOrCreateStrokeStyleMapMember(const std::string &key_, const StrokeStyle::Map &default_, StrokeStyleMapPref &ss__)
Similar to getStrokeStyleMapMember(), except that, if the member does not already exist,...
virtual bool getOrCreateFillStyleMember(const std::string &key_, const FillStyle &default_, FillStylePref &fs__)
Similar to getFillStyleMember(), except that, if the member does not already exist,...
virtual bool getOrCreateFontMember(const std::string &key_, const Font &defaultFont_, const double defaultSize_, FontPref &f__)
Similar to getFontMember(), except that, if the member does not already exist, it will be created ane...
virtual bool getOrCreatePathStyleMember(const std::string &key_, const PathStyle &default_, PathStylePref &ps__)
Similar to getPathStyleMember(), except that, if the member does not already exist,...
virtual bool getPathStyleMember(const std::string &key_, PathStylePref &ps__)
Gets a persistent path style object from the dictionary.
virtual bool getOrCreateArrayMember(const std::string &name_, const PrefDataVector *elements_, ArrayPref &array__)
Similar to getArrayMember(), except that, if the member does not already exist, it will be created an...
virtual bool getOrCreateSizeMember(const std::string &key_, const Size &default_, SizePref &s__)
Similar to getSizeMember(), except that, if the member does not already exist, it will be created ane...
virtual bool getStringMember(const std::string &key_, StringPref &str__) const
Gets a persistent string object from the dictionary.
virtual bool getOrCreateDashStyleMapMember(const std::string &key_, const DashStyle::Map &default_, DashStyleMapPref &ds__)
Similar to getDashStyleMapMember(), except that, if the member does not already exist,...
virtual bool getOrCreatePathStyleMapMember(const std::string &key_, const PathStyle::Map &default_, PathStyleMapPref &ps__)
Similar to getPathStyleMapMember(), except that, if the member does not already exist,...
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
PrefData()
Constructs an empty PrefData object.
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.