Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Classes | Public Types | Public Member Functions | List of all members
hdi::core::DictionaryPref Class Reference

Acts as a dictionary-style container to store any other persistent data types, including arrays and dictionaries, and can itself be stored inside another container type. More...

#include <hdicoreDictionaryPref.h>

Inheritance diagram for hdi::core::DictionaryPref:
Inheritance graph
[legend]
Collaboration diagram for hdi::core::DictionaryPref:
Collaboration graph
[legend]

Classes

class  Iterator
 Allows for iteration through the members of a dictionary pref, a la std::vector iteration. More...
 

Public Types

typedef std::vector< PrefData * > PrefDataVector
 
typedef std::auto_ptr< IteratorIteratorAP
 
- Public Types inherited from hdi::core::PrefData
enum  Type {
  UnknownType = 0, ArrayType = 10, ArtboardPointType = 20, ArtboardRectType = 30,
  ArtColorType = 40, BoolType = 50, ColorType = 60, DashStyleType = 70,
  DashStyleMapType = 80, DictionaryType = 90, FillStyleType = 100, FillStyleMapType = 110,
  FontType = 120, NumberType = 130, PathType = 140, PathStyleType = 150,
  PathStyleMapType = 160, PointType = 170, RectType = 180, SizeType = 190,
  StringType = 200, StrokeStyleType = 210, StrokeStyleMapType = 220, TransformMatrixType = 230,
  CustomTypeOffset = 10000
}
 Describes the type of the data the PrefData object contains; useful for determining which subclass to cast a PrefData object to.
 

Public Member Functions

 DictionaryPref (const DictionaryPref &dict_)
 Constructs a new DictionaryPref object from an existing DictionaryPref object (copy constructor) More...
 
 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. More...
 
virtual ~DictionaryPref ()
 Destructs a DictionaryPref object. More...
 
virtual DictionaryPrefoperator= (const DictionaryPref &rhs_)
 Allows one DictionaryPref object to be assigned from another. More...
 
virtual DictionaryPrefclone () const
 Convenience method to clone an DictionaryPref object on the heap. More...
 
virtual bool addMember (const PrefData &data_)
 Adds a PrefData object into the dictionary member tree at the top-level. More...
 
virtual bool member (const std::string &name_, std::auto_ptr< PrefData > &data__) const
 Gets a single member object from the dictionary data tree. More...
 
virtual bool removeMember (const std::string &name_, std::auto_ptr< PrefData > &data__)
 Removes a PrefData member from the dictionary. More...
 
virtual Iterator begin () const
 Gets an iterator for the dictionary. More...
 
virtual bool getArrayMember (const std::string &key_, ArrayPref &array__) const
 Gets a persistent array object from the containing dictionary. More...
 
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 anew with a series of default elements. More...
 
virtual bool getArtboardPointMember (const std::string &key_, ArtboardPointPref &abp__) const
 Gets a persistent artboard point object from the dictionary. More...
 
virtual bool getOrCreateArtboardPointMember (const std::string &key_, const ArtboardPoint &default_, ArtboardPointPref &abp__)
 Similar to getArtboardPointMember(), except that, if the member does not already exist, it will be created anew with a default value. More...
 
virtual bool getArtboardRectMember (const std::string &key_, ArtboardRectPref &abr__) const
 Gets a persistent artboard rect object from the dictionary. More...
 
virtual bool getOrCreateArtboardRectMember (const std::string &key_, const ArtboardRect &default_, ArtboardRectPref &abr__)
 Similar to getArtboardRectMember(), except that, if the member does not already exist, it will be created anew with a default value. More...
 
virtual bool getArtColorMember (const std::string &key_, ArtColorPref &ac__) const
 Gets a persistent art color object from the dictionary. More...
 
virtual bool getOrCreateArtColorMember (const std::string &key_, const ArtColor &default_, ArtColorPref &ac__)
 Similar to getArtColorMember(), except that, if the member does not already exist, it will be created anew with a default value. More...
 
virtual bool getBoolMember (const std::string &key_, BoolPref &b__) const
 Gets a persistent bool object from the dictionary. More...
 
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 anew with a default value. More...
 
virtual bool getColorMember (const std::string &key_, ColorPref &c__) const
 Gets a persistent color object from the dictionary. More...
 
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 anew with a default value. More...
 
virtual bool getDashStyleMember (const std::string &key_, DashStylePref &ds__)
 Gets a persistent dash style object from the dictionary. More...
 
virtual bool getOrCreateDashStyleMember (const std::string &key_, const DashStyle &default_, DashStylePref &ds__)
 Similar to getDashStyleMember(), except that, if the member does not already exist, it will be created anew with a default value. More...
 
virtual bool getDashStyleMapMember (const std::string &key_, DashStyleMapPref &ds__)
 Gets a persistent dash style map object from the dictionary. More...
 
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, it will be created anew with a default value. More...
 
virtual bool getDictMember (const std::string &key_, DictionaryPref &dict__) const
 Gets a persistent dictionary object from the dictionary. More...
 
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 anew with a series of default members. More...
 
virtual bool getFillStyleMember (const std::string &key_, FillStylePref &fs__)
 Gets a persistent fill style object from the dictionary. More...
 
virtual bool getOrCreateFillStyleMember (const std::string &key_, const FillStyle &default_, FillStylePref &fs__)
 Similar to getFillStyleMember(), except that, if the member does not already exist, it will be created anew with a default value. More...
 
virtual bool getFillStyleMapMember (const std::string &key_, FillStyleMapPref &fs__)
 Gets a persistent fill style map object from the dictionary. More...
 
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, it will be created anew with a default value. More...
 
virtual bool getFontMember (const std::string &key_, FontPref &f__) const
 Gets a persistent font object from the dictionary. More...
 
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 anew with a default value. More...
 
virtual bool getTransformMatrixMember (const std::string &key_, TransformMatrixPref &tm__) const
 Gets a persistent matrix object from the dictionary. More...
 
virtual bool getOrCreateTransformMatrixMember (const std::string &key_, const TransformMatrix &default_, TransformMatrixPref &tm__)
 Similar to getTransformMatrixMember(), except that, if the member does not already exist, it will be created anew with a default value. More...
 
virtual bool getNumberMember (const std::string &key_, NumberPref &n__) const
 Gets a persistent number object from the dictionary. More...
 
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 anew with a default value. More...
 
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 anew with a default value. More...
 
virtual bool getPathStyleMember (const std::string &key_, PathStylePref &ps__)
 Gets a persistent path style object from the dictionary. More...
 
virtual bool getOrCreatePathStyleMember (const std::string &key_, const PathStyle &default_, PathStylePref &ps__)
 Similar to getPathStyleMember(), except that, if the member does not already exist, it will be created anew with a default value. More...
 
virtual bool getPathStyleMapMember (const std::string &key_, PathStyleMapPref &ps__)
 Gets a persistent path style map object from the dictionary. More...
 
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, it will be created anew with a default value. More...
 
virtual bool getPointMember (const std::string &key_, PointPref &p__) const
 Gets a persistent point object from the dictionary. More...
 
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 anew with a default value. More...
 
virtual bool getRectMember (const std::string &key_, RectPref &r__) const
 Gets a persistent rect object from the dictionary. More...
 
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 anew with a default value. More...
 
virtual bool getSizeMember (const std::string &key_, SizePref &s__) const
 Gets a persistent size object from the dictionary. More...
 
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 anew with a default value. More...
 
virtual bool getStringMember (const std::string &key_, StringPref &str__) const
 Gets a persistent string object from the dictionary. More...
 
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 anew with a default value. More...
 
virtual bool getStrokeStyleMember (const std::string &key_, StrokeStylePref &ss__)
 Gets a persistent stroke style object from the dictionary. More...
 
virtual bool getOrCreateStrokeStyleMember (const std::string &key_, const StrokeStyle &default_, StrokeStylePref &ss__)
 Similar to getStrokeStyleMember(), except that, if the member does not already exist, it will be created anew with a default value. More...
 
virtual bool getStrokeStyleMapMember (const std::string &key_, StrokeStyleMapPref &ss__)
 Gets a persistent stroke style map object from the dictionary. More...
 
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, it will be created anew with a default value. More...
 
- Public Member Functions inherited from hdi::core::PrefData
 PrefData ()
 Constructs an empty PrefData object. More...
 
 PrefData (const PrefData &data_)
 Constructs a new PrefData object from an existing PrefData object (copy constructor) More...
 
virtual ~PrefData ()
 Destructs a PrefData object. More...
 
virtual PrefDataoperator= (const PrefData &rhs_)
 Allows one PrefData object to be assigned from another. More...
 
virtual bool isEmpty () const
 Gets whether the target PrefData object is empty (constructed with the default ctor) More...
 
virtual bool operator== (const PrefData &rhs_) const
 Tests whether a given PrefData object is the same as another. More...
 
virtual bool operator!= (const PrefData &rhs_) const
 Tests whether a given PrefData object is not the same as another. More...
 
virtual Type dataType () const
 Gets the type of persistent data. More...
 
virtual std::string key () const
 Gets the persistent data object's key. More...
 
virtual void setKey (const std::string &key_)
 Sets the persistent data object's key. More...
 
virtual std::string stringify () const
 Recursively serializes the target object as a JSON data (sub)tree, returning the appropriate JSON string. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from hdi::core::PrefData
static std::auto_ptr< PrefDataparse (const std::string &jsonStr_)
 Parses the given JSON string to a best-fit representation of PrefData subclass objects in a tree. More...
 
- Protected Member Functions inherited from hdi::core::PrefData
void * __impl () const
 Internal use only. More...
 
 PrefData (plugin::PersistentData *&)
 Internal use only. More...
 
- Protected Attributes inherited from hdi::core::PrefData
void * _data
 Private implementation data.
 

Detailed Description

Acts as a dictionary-style container to store any other persistent data types, including arrays and dictionaries, and can itself be stored inside another container type.

Constructor & Destructor Documentation

hdi::core::DictionaryPref::DictionaryPref ( const DictionaryPref dict_)

Constructs a new DictionaryPref object from an existing DictionaryPref object (copy constructor)

Author
GW
Date
09/2013
Parameters
dict_Existing DictionaryPref object
hdi::core::DictionaryPref::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.

Author
GW
Date
09/2013
Parameters
members_Initial dictionary members, if any
name_Name for the data dictionary once it has been added to its container, as UTF-8
Note
The name_ argument can only be "" (omitted) if the object will be added directly to an array.
Warning
The newly constructed DictionaryPref object does not assume responsibility of the memory for the members_ container.
virtual hdi::core::DictionaryPref::~DictionaryPref ( )
virtual

Destructs a DictionaryPref object.

Author
GW
Date
09/2013

Member Function Documentation

virtual bool hdi::core::DictionaryPref::addMember ( const PrefData data_)
virtual

Adds a PrefData object into the dictionary member tree at the top-level.

Author
GW
Date
09/2013
Parameters
data_New data node to add into the top-level of the dictionary data tree
Returns
true if the member was added, or false otherwise
Note
The data is added to the top-most level of the dictionary data tree, with any children of its own appearing underneath the data_ member.
virtual Iterator hdi::core::DictionaryPref::begin ( ) const
virtual

Gets an iterator for the dictionary.

Author
GW
Date
09/2014
Returns
An Iterator object, for iterating through the target's members
// Here's an example, iterating through the children of dict:
for(hdi::core::DictionaryPref::Iterator iter = dict.begin(); !iter.atEnd(); ++iter)
{
// do stuff with iter.key() or iter.value()
}
virtual DictionaryPref* hdi::core::DictionaryPref::clone ( ) const
virtual

Convenience method to clone an DictionaryPref object on the heap.

Author
GW
Date
10/2013
Returns
A pointer to the new DictionaryPref object
Note
If you subclass DictionaryPref, you MUST overload this method yourself! If you don't and/or your clone() method does not return an instance of your DictionaryPref subclass, you will experience "object slicing" when adding the pref to a container.
Warning
The caller must manage the memory for the returned DictionaryPref object.

Implements hdi::core::PrefData.

virtual bool hdi::core::DictionaryPref::getArrayMember ( const std::string &  key_,
ArrayPref array__ 
) const
virtual

Gets a persistent array object from the containing dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the array JSON node to get from the top-level and return as a neatly-packed PrefData subclass
array__Return-by-reference for the array member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getArtboardPointMember ( const std::string &  key_,
ArtboardPointPref abp__ 
) const
virtual

Gets a persistent artboard point object from the dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the artboard point JSON node to get from the top-level and return as a neatly-packed PrefData subclass
abp__Return-by-reference for the artboard point member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getArtboardRectMember ( const std::string &  key_,
ArtboardRectPref abr__ 
) const
virtual

Gets a persistent artboard rect object from the dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the artboard rect JSON node to get from the top-level and return as a neatly-packed PrefData subclass
abr__Return-by-reference for the artboard rect member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getArtColorMember ( const std::string &  key_,
ArtColorPref ac__ 
) const
virtual

Gets a persistent art color object from the dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the art color JSON node to get from the top-level and return as a neatly-packed PrefData subclass
ac__Return-by-reference for the art color member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getBoolMember ( const std::string &  key_,
BoolPref b__ 
) const
virtual

Gets a persistent bool object from the dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the bool JSON node to get from the top-level and return as a neatly-packed PrefData subclass
b__Return-by-reference for the bool member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getColorMember ( const std::string &  key_,
ColorPref c__ 
) const
virtual

Gets a persistent color object from the dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the color JSON node to get from the top-level and return as a neatly-packed PrefData subclass
c__Return-by-reference for the color member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getDashStyleMapMember ( const std::string &  key_,
DashStyleMapPref ds__ 
)
virtual

Gets a persistent dash style map object from the dictionary.

Author
GW
Date
11/2015
Parameters
key_UTF-8 name/key of the dash style map JSON node to get from the top-level and return as a neatly-packed PrefData subclass
ds__Return-by-reference for the dash style map member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getDashStyleMember ( const std::string &  key_,
DashStylePref ds__ 
)
virtual

Gets a persistent dash style object from the dictionary.

Author
GW
Date
11/2015
Parameters
key_UTF-8 name/key of the dash style JSON node to get from the top-level and return as a neatly-packed PrefData subclass
ds__Return-by-reference for the dash style member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getDictMember ( const std::string &  key_,
DictionaryPref dict__ 
) const
virtual

Gets a persistent dictionary object from the dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the dictionary JSON node to get from the top-level and return as a neatly-packed PrefData subclass
dict__Return-by-reference for the dictionary member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getFillStyleMapMember ( const std::string &  key_,
FillStyleMapPref fs__ 
)
virtual

Gets a persistent fill style map object from the dictionary.

Author
GW
Date
11/2015
Parameters
key_UTF-8 name/key of the fill style map JSON node to get from the top-level and return as a neatly-packed PrefData subclass
ds__Return-by-reference for the fill style map member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getFillStyleMember ( const std::string &  key_,
FillStylePref fs__ 
)
virtual

Gets a persistent fill style object from the dictionary.

Author
GW
Date
11/2015
Parameters
key_UTF-8 name/key of the fill style JSON node to get from the top-level and return as a neatly-packed PrefData subclass
ds__Return-by-reference for the fill style member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getFontMember ( const std::string &  key_,
FontPref f__ 
) const
virtual

Gets a persistent font object from the dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the font JSON node to get from the top-level and return as a neatly-packed PrefData subclass
f__Return-by-reference for the font member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getNumberMember ( const std::string &  key_,
NumberPref n__ 
) const
virtual

Gets a persistent number object from the dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the number JSON node to get from the top-level and return as a neatly-packed PrefData subclass
n__Return-by-reference for the number member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateArrayMember ( const std::string &  name_,
const PrefDataVector *  elements_,
ArrayPref array__ 
)
virtual

Similar to getArrayMember(), except that, if the member does not already exist, it will be created anew with a series of default elements.

Author
GW
Date
09/2013
Parameters
name_UTF-8 name/key of the array JSON node to get from the top-level and return as a neatly-packed PrefData subclass
elements_Default elements for the array, in case it didn't already exist (NULL, or an empty vector, for none)
array__Return-by-reference for the array member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
Note
The order of the default elements in the array will match that of the passed elements_ argument.
Warning
The returned ArrayPref object does not assume responsibility of the memory for the elements_ container.
virtual bool hdi::core::DictionaryPref::getOrCreateArtboardPointMember ( const std::string &  key_,
const ArtboardPoint default_,
ArtboardPointPref abp__ 
)
virtual

Similar to getArtboardPointMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the artboard point JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
abp__Return-by-reference for the artboard point member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateArtboardRectMember ( const std::string &  key_,
const ArtboardRect default_,
ArtboardRectPref abr__ 
)
virtual

Similar to getArtboardRectMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the artboard rect JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
abr__Return-by-reference for the artboard rect member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateArtColorMember ( const std::string &  key_,
const ArtColor default_,
ArtColorPref ac__ 
)
virtual

Similar to getArtColorMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the art color JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
ac__Return-by-reference for the art color member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateBoolMember ( const std::string &  key_,
const bool  default_,
BoolPref b__ 
)
virtual

Similar to getBoolMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the bool JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
b__Return-by-reference for the bool member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateColorMember ( const std::string &  key_,
const Color default_,
ColorPref c__ 
)
virtual

Similar to getColorMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
09/2013
Parameters
key_UTF8 name/key of the color JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
c__Return-by-reference for the color member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateDashStyleMapMember ( const std::string &  key_,
const DashStyle::Map default_,
DashStyleMapPref ds__ 
)
virtual

Similar to getDashStyleMapMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
11/2015
Parameters
key_UTF8 name/key of the dash style map JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
c__Return-by-reference for the dash style map member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateDashStyleMember ( const std::string &  key_,
const DashStyle default_,
DashStylePref ds__ 
)
virtual

Similar to getDashStyleMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
11/2015
Parameters
key_UTF8 name/key of the dash style JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
c__Return-by-reference for the dash style member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateDictMember ( const std::string &  name_,
const PrefDataVector *  members_,
DictionaryPref dict__ 
)
virtual

Similar to getDictMember(), except that, if the member does not already exist, it will be created anew with a series of default members.

Author
GW
Date
09/2013
Parameters
name_UTF-8 name/key of the dictionary JSON node to get from the top-level and return as a neatly-packed PrefData subclass
members_Default members for the dictionary, in case it didn't already exist (NULL, or an empty vector, for none)
dict__Return-by-reference for the dictionary member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
Note
The names of the members in the dictionary will match that of the individual members in the passed members_ argument.
Warning
The returned DictionaryPref object does not assume responsibility of the memory for the members_ container.
virtual bool hdi::core::DictionaryPref::getOrCreateFillStyleMapMember ( const std::string &  key_,
const FillStyle::Map default_,
FillStyleMapPref fs__ 
)
virtual

Similar to getFillStyleMapMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
11/2015
Parameters
key_UTF8 name/key of the fill style map JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
c__Return-by-reference for the fill style map member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateFillStyleMember ( const std::string &  key_,
const FillStyle default_,
FillStylePref fs__ 
)
virtual

Similar to getFillStyleMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
11/2015
Parameters
key_UTF8 name/key of the fill style JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
c__Return-by-reference for the fill style member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateFloatMember ( const std::string &  key_,
const double  default_,
NumberPref n__ 
)
virtual

Similar to getNumberMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the number JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default double value for the member, in case it didn't already exist
n__Return-by-reference for the number member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateFontMember ( const std::string &  key_,
const Font defaultFont_,
const double  defaultSize_,
FontPref f__ 
)
virtual

Similar to getFontMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the font JSON node to get from the top-level and return as a neatly-packed PrefData subclass
defaultFont_Default font for the member, in case it didn't already exist
defaultSize_Default font size for the member, in case it didn't already exist
f__Return-by-reference for the font member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateIntMember ( const std::string &  key_,
const int64_t  default_,
NumberPref n__ 
)
virtual

Similar to getNumberMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the number JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default integer value for the member, in case it didn't already exist
n__Return-by-reference for the number member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreatePathStyleMapMember ( const std::string &  key_,
const PathStyle::Map default_,
PathStyleMapPref ps__ 
)
virtual

Similar to getPathStyleMapMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
11/2015
Parameters
key_UTF8 name/key of the path style map JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
c__Return-by-reference for the path style map member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreatePathStyleMember ( const std::string &  key_,
const PathStyle default_,
PathStylePref ps__ 
)
virtual

Similar to getPathStyleMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
11/2015
Parameters
key_UTF8 name/key of the path style JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
c__Return-by-reference for the path style member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreatePointMember ( const std::string &  key_,
const Point default_,
PointPref p__ 
)
virtual

Similar to getPointMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the point JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
p__Return-by-reference for the point member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateRectMember ( const std::string &  key_,
const Rect default_,
RectPref r__ 
)
virtual

Similar to getRectMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the rect JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
r__Return-by-reference for the rect member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateSizeMember ( const std::string &  key_,
const Size default_,
SizePref s__ 
)
virtual

Similar to getSizeMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the size JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
s__Return-by-reference for the size member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateStringMember ( const std::string &  key_,
const std::string &  default_,
StringPref str__ 
)
virtual

Similar to getStringMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the string JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default UTF-8 value for the member, in case it didn't already exist
str__Return-by-reference for the string member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateStrokeStyleMapMember ( const std::string &  key_,
const StrokeStyle::Map default_,
StrokeStyleMapPref ss__ 
)
virtual

Similar to getStrokeStyleMapMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
11/2015
Parameters
key_UTF8 name/key of the stroke style map JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
c__Return-by-reference for the stroke style map member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateStrokeStyleMember ( const std::string &  key_,
const StrokeStyle default_,
StrokeStylePref ss__ 
)
virtual

Similar to getStrokeStyleMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
11/2015
Parameters
key_UTF8 name/key of the stroke style JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
c__Return-by-reference for the stroke style member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getOrCreateTransformMatrixMember ( const std::string &  key_,
const TransformMatrix default_,
TransformMatrixPref tm__ 
)
virtual

Similar to getTransformMatrixMember(), except that, if the member does not already exist, it will be created anew with a default value.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the matrix JSON node to get from the top-level and return as a neatly-packed PrefData subclass
default_Default value for the member, in case it didn't already exist
tm__Return-by-reference for the matrix member identified by key_ (or created anew)
Returns
true if the member could be acquired or created, false otherwise
virtual bool hdi::core::DictionaryPref::getPathStyleMapMember ( const std::string &  key_,
PathStyleMapPref ps__ 
)
virtual

Gets a persistent path style map object from the dictionary.

Author
GW
Date
11/2015
Parameters
key_UTF-8 name/key of the path style map JSON node to get from the top-level and return as a neatly-packed PrefData subclass
ds__Return-by-reference for the path style map member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getPathStyleMember ( const std::string &  key_,
PathStylePref ps__ 
)
virtual

Gets a persistent path style object from the dictionary.

Author
GW
Date
11/2015
Parameters
key_UTF-8 name/key of the path style JSON node to get from the top-level and return as a neatly-packed PrefData subclass
ds__Return-by-reference for the path style member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getPointMember ( const std::string &  key_,
PointPref p__ 
) const
virtual

Gets a persistent point object from the dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the point JSON node to get from the top-level and return as a neatly-packed PrefData subclass
p__Return-by-reference for the point member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getRectMember ( const std::string &  key_,
RectPref r__ 
) const
virtual

Gets a persistent rect object from the dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the rect JSON node to get from the top-level and return as a neatly-packed PrefData subclass
r__Return-by-reference for the rect member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getSizeMember ( const std::string &  key_,
SizePref s__ 
) const
virtual

Gets a persistent size object from the dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the size JSON node to get from the top-level and return as a neatly-packed PrefData subclass
s__Return-by-reference for the size member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getStringMember ( const std::string &  key_,
StringPref str__ 
) const
virtual

Gets a persistent string object from the dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the string JSON node to get from the top-level and return as a neatly-packed PrefData subclass
str__Return-by-reference for the string member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getStrokeStyleMapMember ( const std::string &  key_,
StrokeStyleMapPref ss__ 
)
virtual

Gets a persistent stroke style map object from the dictionary.

Author
GW
Date
11/2015
Parameters
key_UTF-8 name/key of the stroke style map JSON node to get from the top-level and return as a neatly-packed PrefData subclass
ds__Return-by-reference for the stroke style map member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getStrokeStyleMember ( const std::string &  key_,
StrokeStylePref ss__ 
)
virtual

Gets a persistent stroke style object from the dictionary.

Author
GW
Date
11/2015
Parameters
key_UTF-8 name/key of the stroke style JSON node to get from the top-level and return as a neatly-packed PrefData subclass
ds__Return-by-reference for the stroke style member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::getTransformMatrixMember ( const std::string &  key_,
TransformMatrixPref tm__ 
) const
virtual

Gets a persistent matrix object from the dictionary.

Author
GW
Date
09/2013
Parameters
key_UTF-8 name/key of the matrix JSON node to get from the top-level and return as a neatly-packed PrefData subclass
tm__Return-by-reference for the matrix member identified by key_
Returns
true if the member could be acquired, false otherwise
virtual bool hdi::core::DictionaryPref::member ( const std::string &  name_,
std::auto_ptr< PrefData > &  data__ 
) const
virtual

Gets a single member object from the dictionary data tree.

Author
GW
Date
09/2013
Parameters
name_Name of the member to get from the top-level of the dictionary data tree, as UTF-8
data__Return-by-reference for the member found with the given name
Returns
true if the member could be acquired, false otherwise
Note
The type of the returned object can be determined from its dataType() method, such that correct casting can be accomplished.
virtual DictionaryPref& hdi::core::DictionaryPref::operator= ( const DictionaryPref rhs_)
virtual

Allows one DictionaryPref object to be assigned from another.

Author
GW
Date
09/2013
Parameters
rhs_Righthand side of the = operator; the object to copy values from
Returns
The target DictionaryPref object, but with its value updated to match that of rhs_
virtual bool hdi::core::DictionaryPref::removeMember ( const std::string &  name_,
std::auto_ptr< PrefData > &  data__ 
)
virtual

Removes a PrefData member from the dictionary.

Author
GW
Date
09/2013
Parameters
name_Name/key of the member to remove from the top-level of the dictionary data tree, as UTF-8
data__Return-by-reference for the PrefData object for the member that was removed
Returns
true if the member could be removed and acquired, false otherwise
Note
The type of the returned object can be determined from its dataType() method, such that correct casting can be accomplished.