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

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

#include <hdicoreArrayPref.h>

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

Public Types

typedef std::vector< PrefData * > PrefDataVector
 
- 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

 ArrayPref (const ArrayPref &array_)
 Constructs a new ArrayPref object from an existing ArrayPref object (copy constructor) More...
 
 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. More...
 
virtual ~ArrayPref ()
 Destructs an ArrayPref object. More...
 
virtual ArrayPrefoperator= (const ArrayPref &rhs_)
 Allows one ArrayPref object to be assigned from another. More...
 
virtual ArrayPrefclone () const
 Convenience method to clone an ArrayPref object on the heap. More...
 
virtual uint32_t count () const
 Gets the count of elements in the top-level of the array. More...
 
virtual bool element (const uint32_t index_, std::auto_ptr< PrefData > &data__) const
 Gets a single element object from the array data tree. More...
 
virtual bool pushElement (const PrefData &data_)
 Adds a persistent data object to the end of the array. More...
 
virtual bool popElement (std::auto_ptr< PrefData > &data__)
 Removes a persistent data object from the end of the array. More...
 
virtual bool insertElement (const uint32_t index_, const PrefData &data_)
 Inserts a persistent data object at an arbitrary position in the array. More...
 
virtual bool removeElement (const uint32_t index_, std::auto_ptr< PrefData > &data__)
 Removes a persistent data object from an arbitrary position in the array. More...
 
virtual void clear ()
 Removes all elements from an array. More...
 
virtual bool getArrayElement (const uint32_t index_, ArrayPref &array__) const
 Gets a persistent array object from the containing array. More...
 
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 anew with a series of default elements. More...
 
virtual bool getArtboardPointElement (const uint32_t index_, ArtboardPointPref &abp__) const
 Gets a persistent point object from the array. More...
 
virtual bool getOrCreateArtboardPointElement (const uint32_t index_, const ArtboardPoint &default_, ArtboardPointPref &abp__)
 Similar to getArtboardPointElement(), except that, if the element does not already exist, it will be created anew with a default value. More...
 
virtual bool getArtboardRectElement (const uint32_t index_, ArtboardRectPref &abr__) const
 Gets a persistent artboard rect object from the array. More...
 
virtual bool getOrCreateArtboardRectElement (const uint32_t index_, const ArtboardRect &default_, ArtboardRectPref &abr__)
 Similar to getArtboardRectElement(), except that, if the element does not already exist, it will be created anew with a default value. More...
 
virtual bool getArtColorElement (const uint32_t index_, ArtColorPref &ac__) const
 Gets a persistent art color object from the array. More...
 
virtual bool getOrCreateArtColorElement (const uint32_t index_, const ArtColor &default_, ArtColorPref &ac__)
 Similar to getArtColorElement(), except that, if the element does not already exist, it will be created anew with a default value. More...
 
virtual bool getBoolElement (const uint32_t index_, BoolPref &b__) const
 Gets a persistent bool object from the array. More...
 
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 anew with a default value. More...
 
virtual bool getColorElement (const uint32_t index_, ColorPref &c__) const
 Gets a persistent color object from the array. More...
 
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 anew with a default value. More...
 
virtual bool getDashStyleElement (const uint32_t index_, DashStylePref &ds__)
 Gets a persistent dash style object from the dictionary. More...
 
virtual bool getOrCreateDashStyleElement (const uint32_t index_, const DashStyle &default_, DashStylePref &ds__)
 Similar to getDashStyleElement(), except that, if the element does not already exist, it will be created anew with a default value. More...
 
virtual bool getDashStyleMapElement (const uint32_t index_, DashStyleMapPref &ds__)
 Gets a persistent dash style map object from the dictionary. More...
 
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, it will be created anew with a default value. More...
 
virtual bool getDictElement (const uint32_t index_, DictionaryPref &dict__) const
 Gets a persistent dictionary object from the array. More...
 
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 anew with a series of default members. More...
 
virtual bool getFillStyleElement (const uint32_t index_, FillStylePref &fs__)
 Gets a persistent fill style object from the dictionary. More...
 
virtual bool getOrCreateFillStyleElement (const uint32_t index_, const FillStyle &default_, FillStylePref &fs__)
 Similar to getFillStyleElement(), except that, if the element does not already exist, it will be created anew with a default value. More...
 
virtual bool getFillStyleMapElement (const uint32_t index_, FillStyleMapPref &fs__)
 Gets a persistent fill style map object from the dictionary. More...
 
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, it will be created anew with a default value. More...
 
virtual bool getFontElement (const uint32_t index_, FontPref &font__) const
 Gets a persistent font object from the array. More...
 
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 anew with a default value. More...
 
virtual bool getTransformMatrixElement (const uint32_t index_, TransformMatrixPref &tm__) const
 Gets a persistent matrix object from the array. More...
 
virtual bool getOrCreateTransformMatrixElement (const uint32_t index_, const TransformMatrix &default_, TransformMatrixPref &tm__)
 Similar to getTransformMatrixElement(), except that, if the element does not already exist, it will be created anew with a default value. More...
 
virtual bool getNumberElement (const uint32_t index_, NumberPref &n__) const
 Gets a persistent number object from the array. More...
 
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, it will be created anew with a default value. More...
 
virtual bool getOrCreateFloatElement (const uint32_t index_, const double default_, NumberPref &n__)
 Similar to getNumberElement(), except that, if the element does not already exist, it will be created anew with a default value. More...
 
virtual bool getPathStyleElement (const uint32_t index_, PathStylePref &ps__)
 Gets a persistent path style object from the dictionary. More...
 
virtual bool getOrCreatePathStyleElement (const uint32_t index_, const PathStyle &default_, PathStylePref &ps__)
 Similar to getPathStyleElement(), except that, if the element does not already exist, it will be created anew with a default value. More...
 
virtual bool getPathStyleMapElement (const uint32_t index_, PathStyleMapPref &ps__)
 Gets a persistent path style map object from the dictionary. More...
 
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, it will be created anew with a default value. More...
 
virtual bool getPointElement (const uint32_t index_, PointPref &p__) const
 Gets a persistent point object from the array. More...
 
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 anew with a default value. More...
 
virtual bool getRectElement (const uint32_t index_, RectPref &r__) const
 Gets a persistent rect object from the array. More...
 
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 anew with a default value. More...
 
virtual bool getSizeElement (const uint32_t index_, SizePref &s__) const
 Gets a persistent size object from the array. More...
 
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 anew with a default value. More...
 
virtual bool getStringElement (const uint32_t index_, StringPref &str__) const
 Gets a persistent string object from the array. More...
 
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, it will be created anew with a default value. More...
 
virtual bool getStrokeStyleElement (const uint32_t index_, StrokeStylePref &ss__)
 Gets a persistent stroke style object from the dictionary. More...
 
virtual bool getOrCreateStrokeStyleElement (const uint32_t index_, const StrokeStyle &default_, StrokeStylePref &ss__)
 Similar to getStrokeStyleElement(), except that, if the element does not already exist, it will be created anew with a default value. More...
 
virtual bool getStrokeStyleMapElement (const uint32_t index_, StrokeStyleMapPref &ss__)
 Gets a persistent stroke style map object from the dictionary. More...
 
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, 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 an array-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::ArrayPref::ArrayPref ( const ArrayPref array_)

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

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

Author
GW
Date
09/2013
Parameters
elements_Initial array elements, if any
name_Name for the data array 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 another ArrayPref object.
Warning
The newly constructed ArrayPref object does not assume responsibility of the memory for the elements_ container.
virtual hdi::core::ArrayPref::~ArrayPref ( )
virtual

Destructs an ArrayPref object.

Author
GW
Date
09/2013

Member Function Documentation

virtual void hdi::core::ArrayPref::clear ( )
virtual

Removes all elements from an array.

Author
GW
Date
09/2013
virtual ArrayPref* hdi::core::ArrayPref::clone ( ) const
virtual

Convenience method to clone an ArrayPref object on the heap.

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

Implements hdi::core::PrefData.

virtual uint32_t hdi::core::ArrayPref::count ( ) const
virtual

Gets the count of elements in the top-level of the array.

Author
GW
Date
09/2013
Returns
Number of elements in the array
virtual bool hdi::core::ArrayPref::element ( const uint32_t  index_,
std::auto_ptr< PrefData > &  data__ 
) const
virtual

Gets a single element object from the array data tree.

Author
GW
Date
09/2013
Parameters
index_Index of the element to get from the top-level of the array data tree
data__Return-by-reference for the element found at the given index
Returns
true if the element 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 bool hdi::core::ArrayPref::getArrayElement ( const uint32_t  index_,
ArrayPref array__ 
) const
virtual

Gets a persistent array object from the containing array.

Author
GW
Date
09/2013
Parameters
index_Index of the array JSON node to get from the top-level and return as a neatly-packed persistent data type
array__Return-by-reference for the array element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getArtboardPointElement ( const uint32_t  index_,
ArtboardPointPref abp__ 
) const
virtual

Gets a persistent point object from the array.

Author
GW
Date
09/2013
Parameters
index_Index of the artboard point JSON node to get from the top-level and return as a neatly-packed persistent data type
abp__Return-by-reference for the artboard point element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getArtboardRectElement ( const uint32_t  index_,
ArtboardRectPref abr__ 
) const
virtual

Gets a persistent artboard rect object from the array.

Author
GW
Date
09/2013
Parameters
index_Index of the artboard rect JSON node to get from the top-level and return as a neatly-packed persistent data type
abr__Return-by-reference for the artboard rect element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getArtColorElement ( const uint32_t  index_,
ArtColorPref ac__ 
) const
virtual

Gets a persistent art color object from the array.

Author
GW
Date
09/2013
Parameters
index_Index of the art color JSON node to get from the top-level and return as a neatly- packed persistent data type
ac__Return-by-reference for the art color element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getBoolElement ( const uint32_t  index_,
BoolPref b__ 
) const
virtual

Gets a persistent bool object from the array.

Author
GW
Date
09/2013
Parameters
index_Index of the bool JSON node to get from the top-level and return as a neatly- packed persistent data type
b__Return-by-reference for the bool element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getColorElement ( const uint32_t  index_,
ColorPref c__ 
) const
virtual

Gets a persistent color object from the array.

Author
GW
Date
09/2013
Parameters
index_Index of the color JSON node to get from the top-level and return as a neatly- packed persistent data type
c__Return-by-reference for the color element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getDashStyleElement ( const uint32_t  index_,
DashStylePref ds__ 
)
virtual

Gets a persistent dash style object from the dictionary.

Author
GW
Date
11/2015
Parameters
index_Index 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 element identified by key_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getDashStyleMapElement ( const uint32_t  index_,
DashStyleMapPref ds__ 
)
virtual

Gets a persistent dash style map object from the dictionary.

Author
GW
Date
11/2015
Parameters
index_Index 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 element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getDictElement ( const uint32_t  index_,
DictionaryPref dict__ 
) const
virtual

Gets a persistent dictionary object from the array.

Author
GW
Date
09/2013
Parameters
index_Index of the dictionary JSON node to get from the top-level and return as a neatly-packed persistent data type
dict__Return-by-reference for the dictionary element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getFillStyleElement ( const uint32_t  index_,
FillStylePref fs__ 
)
virtual

Gets a persistent fill style object from the dictionary.

Author
GW
Date
11/2015
Parameters
index_Index 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 element identified by key_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getFillStyleMapElement ( const uint32_t  index_,
FillStyleMapPref fs__ 
)
virtual

Gets a persistent fill style map object from the dictionary.

Author
GW
Date
11/2015
Parameters
index_Index 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 element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getFontElement ( const uint32_t  index_,
FontPref font__ 
) const
virtual

Gets a persistent font object from the array.

Author
GW
Date
09/2013
Parameters
index_Index of the font JSON node to get from the top-level and return as a neatly- packed persistent data type
font__Return-by-reference for the font element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getNumberElement ( const uint32_t  index_,
NumberPref n__ 
) const
virtual

Gets a persistent number object from the array.

Author
GW
Date
09/2013
Parameters
index_Index of the number JSON node to get from the top-level and return as a neatly- packed persistent data type
n__Return-by-reference for the number element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateArrayElement ( const uint32_t  index_,
const PrefDataVector *  elements_,
ArrayPref array__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the array JSON node to get from the top-level and return
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 element located at index_ (or created anew)
Returns
true if the element 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::ArrayPref::getOrCreateArtboardPointElement ( const uint32_t  index_,
const ArtboardPoint default_,
ArtboardPointPref abp__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the artboard point JSON node to get from the top-level and return
default_Default value for the element, in case it didn't already exist
abp__Return-by-reference for the artboard point element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateArtboardRectElement ( const uint32_t  index_,
const ArtboardRect default_,
ArtboardRectPref abr__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the artboard rect JSON node to get from the top-level and return
default_Default value for the element, in case it didn't already exist
abr__Return-by-reference for the artboard rect element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateArtColorElement ( const uint32_t  index_,
const ArtColor default_,
ArtColorPref ac__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the art color JSON node to get from the top-level and return
default_Default value for the element, in case it didn't already exist
ac__Return-by-reference for the art color element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateBoolElement ( const uint32_t  index_,
const bool  default_,
BoolPref b__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the bool JSON node to get from the top-level and return
default_Default value for the element, in case it didn't already exist
b__Return-by-reference for the bool element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateColorElement ( const uint32_t  index_,
const Color default_,
ColorPref c__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the color JSON node to get from the top-level and return
default_Default value for the element, in case it didn't already exist
c__Return-by-reference for the color element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateDashStyleElement ( const uint32_t  index_,
const DashStyle default_,
DashStylePref ds__ 
)
virtual

Similar to getDashStyleElement(), except that, if the element 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 element, in case it didn't already exist
c__Return-by-reference for the dash style element identified by key_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateDashStyleMapElement ( const uint32_t  index_,
const DashStyle::Map default_,
DashStyleMapPref ds__ 
)
virtual

Similar to getDashStyleMapElement(), except that, if the element 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 element, 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 element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateDictElement ( const uint32_t  index_,
const PrefDataVector *  members_,
DictionaryPref dict__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the dictionary JSON node to get from the top-level and return
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 element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
Note
The names of the elements 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::ArrayPref::getOrCreateFillStyleElement ( const uint32_t  index_,
const FillStyle default_,
FillStylePref fs__ 
)
virtual

Similar to getFillStyleElement(), except that, if the element 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 element, in case it didn't already exist
c__Return-by-reference for the fill style element identified by key_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateFillStyleMapElement ( const uint32_t  index_,
const FillStyle::Map default_,
FillStyleMapPref fs__ 
)
virtual

Similar to getFillStyleMapElement(), except that, if the element 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 element, 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 element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateFloatElement ( const uint32_t  index_,
const double  default_,
NumberPref n__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the number JSON node to get from the top-level and return
default_Default double value for the element, in case it didn't already exist
n__Return-by-reference for the number element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateFontElement ( const uint32_t  index_,
const Font defaultFont_,
const double  defaultSize_,
FontPref font__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the font JSON node to get from the top-level and return
defaultFont_Default font for the element, in case it didn't already exist
defaultSize_Default font size for the element, in case it didn't already exist
font__Return-by-reference for the font element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateIntElement ( const uint32_t  index_,
const int64_t  default_,
NumberPref n__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the number JSON node to get from the top-level and return
default_Default integer value for the element, in case it didn't already exist
n__Return-by-reference for the number element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreatePathStyleElement ( const uint32_t  index_,
const PathStyle default_,
PathStylePref ps__ 
)
virtual

Similar to getPathStyleElement(), except that, if the element 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 element, in case it didn't already exist
c__Return-by-reference for the path style element identified by key_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreatePathStyleMapElement ( const uint32_t  index_,
const PathStyle::Map default_,
PathStyleMapPref ps__ 
)
virtual

Similar to getPathStyleMapElement(), except that, if the element 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 element, 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 element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreatePointElement ( const uint32_t  index_,
const Point default_,
PointPref p__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the point JSON node to get from the top-level and return
default_Default value for the element, in case it didn't already exist
p__Return-by-reference for the point element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateRectElement ( const uint32_t  index_,
const Rect default_,
RectPref r__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the rect JSON node to get from the top-level and return
default_Default value for the element, in case it didn't already exist
r__Return-by-reference for the rect element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateSizeElement ( const uint32_t  index_,
const Size default_,
SizePref s__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the size JSON node to get from the top-level and return
default_Default value for the element, in case it didn't already exist
s__Return-by-reference for the size element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateStringElement ( const uint32_t  index_,
const std::string &  default_,
StringPref str__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the string JSON node to get from the top-level and return
default_Default value for the element, in case it didn't already exist, as UTF-8
str__Return-by-reference for the string element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateStrokeStyleElement ( const uint32_t  index_,
const StrokeStyle default_,
StrokeStylePref ss__ 
)
virtual

Similar to getStrokeStyleElement(), except that, if the element 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 element, in case it didn't already exist
c__Return-by-reference for the stroke style element identified by key_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateStrokeStyleMapElement ( const uint32_t  index_,
const StrokeStyle::Map default_,
StrokeStyleMapPref ss__ 
)
virtual

Similar to getStrokeStyleMapElement(), except that, if the element 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 element, 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 element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getOrCreateTransformMatrixElement ( const uint32_t  index_,
const TransformMatrix default_,
TransformMatrixPref tm__ 
)
virtual

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

Author
GW
Date
09/2013
Parameters
index_Index of the matrix JSON node to get from the top-level and return
default_Default value for the element, in case it didn't already exist
tm__Return-by-reference for the transformation matrix element located at index_ (or created anew)
Returns
true if the element could be acquired or created, false otherwise
virtual bool hdi::core::ArrayPref::getPathStyleElement ( const uint32_t  index_,
PathStylePref ps__ 
)
virtual

Gets a persistent path style object from the dictionary.

Author
GW
Date
11/2015
Parameters
index_Index 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 element identified by key_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getPathStyleMapElement ( const uint32_t  index_,
PathStyleMapPref ps__ 
)
virtual

Gets a persistent path style map object from the dictionary.

Author
GW
Date
11/2015
Parameters
index_Index 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 element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getPointElement ( const uint32_t  index_,
PointPref p__ 
) const
virtual

Gets a persistent point object from the array.

Author
GW
Date
09/2013
Parameters
index_Index of the point JSON node to get from the top-level and return as a neatly- packed persistent data type
p__Return-by-reference for the point element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getRectElement ( const uint32_t  index_,
RectPref r__ 
) const
virtual

Gets a persistent rect object from the array.

Author
GW
Date
09/2013
Parameters
index_Index of the rect JSON node to get from the top-level and return as a neatly- packed persistent data type
r__Return-by-reference for the rect element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getSizeElement ( const uint32_t  index_,
SizePref s__ 
) const
virtual

Gets a persistent size object from the array.

Author
GW
Date
09/2013
Parameters
index_Index of the size JSON node to get from the top-level and return as a neatly- packed persistent data type
s__Return-by-reference for the size element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getStringElement ( const uint32_t  index_,
StringPref str__ 
) const
virtual

Gets a persistent string object from the array.

Author
GW
Date
09/2013
Parameters
index_Index of the string JSON node to get from the top-level and return as a neatly- packed persistent data type
str__Return-by-reference for the string element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getStrokeStyleElement ( const uint32_t  index_,
StrokeStylePref ss__ 
)
virtual

Gets a persistent stroke style object from the dictionary.

Author
GW
Date
11/2015
Parameters
index_Index 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 element identified by key_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getStrokeStyleMapElement ( const uint32_t  index_,
StrokeStyleMapPref ss__ 
)
virtual

Gets a persistent stroke style map object from the dictionary.

Author
GW
Date
11/2015
Parameters
index_Index 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 element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::getTransformMatrixElement ( const uint32_t  index_,
TransformMatrixPref tm__ 
) const
virtual

Gets a persistent matrix object from the array.

Author
GW
Date
09/2013
Parameters
index_Index of the matrix JSON node to get from the top-level and return as a neatly- packed persistent data type
tm__Return-by-reference for the transformation matrix element located at index_
Returns
true if the element could be acquired, false otherwise
virtual bool hdi::core::ArrayPref::insertElement ( const uint32_t  index_,
const PrefData data_ 
)
virtual

Inserts a persistent data object at an arbitrary position in the array.

Author
GW
Date
09/2013
Parameters
index_Desired index for the new data element
data_New data element to insert in the array
Returns
true if the element was inserted successfully, or false otherwise
Note
Index_ must be in the range [0,n], where n is the count of objects already in the array.
virtual ArrayPref& hdi::core::ArrayPref::operator= ( const ArrayPref rhs_)
virtual

Allows one ArrayPref 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 ArrayPref object, but with its value updated to match that of rhs_
virtual bool hdi::core::ArrayPref::popElement ( std::auto_ptr< PrefData > &  data__)
virtual

Removes a persistent data object from the end of the array.

Author
GW
Date
09/2013
Parameters
data__Return-by-reference for the PrefData object for the element that was removed
Returns
true if the element could be popped 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.
virtual bool hdi::core::ArrayPref::pushElement ( const PrefData data_)
virtual

Adds a persistent data object to the end of the array.

Author
GW
Date
09/2013
Parameters
data_New data element to add to the end of the array
Returns
true if the element was added, or false otherwise
virtual bool hdi::core::ArrayPref::removeElement ( const uint32_t  index_,
std::auto_ptr< PrefData > &  data__ 
)
virtual

Removes a persistent data object from an arbitrary position in the array.

Author
GW
Date
09/2013
Parameters
index_Index of the desired data element to be removed
data__Return-by-reference for the PrefData object for the element that was removed
Returns
true if the element 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.
Index_ must be in the range [0,n], where n is the count of objects already in the array.
All elements located after index_ will have their index decremented