7#ifndef __HDI_CORE_PREF_DATA__
8#define __HDI_CORE_PREF_DATA__
37 #if defined(HDI_CORE_AIP_MODE)
38 ArtboardPointType = 20,
39 ArtboardRectType = 30,
46 #if defined(HDI_CORE_AIP_MODE)
48 DashStyleMapType = 80,
53 #if defined(HDI_CORE_AIP_MODE)
55 FillStyleMapType = 110,
61 #if defined(HDI_CORE_AIP_MODE)
64 PathStyleMapType = 160,
72 #if defined(HDI_CORE_AIP_MODE)
73 StrokeStyleType = 210,
74 StrokeStyleMapType = 220,
75 TransformMatrixType = 230,
78 CustomTypeOffset = 10000
103 static std::unique_ptr<PrefData>
parse(
const std::string& jsonStr_);
195 virtual std::string
key()
const;
207 virtual void setKey(
const std::string& key_);
224 friend plat::PersistentData* __accessImpl(
const PrefData&);
225 friend PrefData* __accessCtor(plat::PersistentData*&);
256 typedef std::unique_ptr<PrefData> PrefDataUP;
257 typedef std::shared_ptr<PrefData> PrefDataSP;
258 typedef std::weak_ptr<PrefData> PrefDataWP;
260 extern plat::PersistentData* __accessImpl(
const PrefData&);
261 extern PrefData* __accessCtor(plat::PersistentData*&);
Base class for persistent data objects, stored via JSON.
Definition: hdicorePrefData.h:25
virtual ~PrefData()
Destructs a PrefData object.
Type
Describes the type of the data the PrefData object contains; useful for determining which subclass to...
Definition: hdicorePrefData.h:32
virtual std::string key() const
Gets the persistent data object's key.
PrefData(const PrefData &data_)
Constructs a new PrefData object from an existing PrefData object (copy constructor)
virtual PrefData * clone() const =0
Convenience method to clone a PrefData object, taking its subclass type into account for proper memor...
virtual std::string stringify() const
Recursively serializes the target object as a JSON data (sub)tree, returning the appropriate JSON str...
void * __impl() const
Internal use only.
PrefData()
Constructs an empty PrefData object.
virtual PrefData & operator=(const PrefData &rhs_)
Allows one PrefData object to be assigned from another.
virtual void setKey(const std::string &key_)
Sets the persistent data object's key.
virtual bool operator==(const PrefData &rhs_) const
Tests whether a given PrefData object is the same as another.
virtual bool isEmpty() const
Gets whether the target PrefData object is empty (constructed with the default ctor)
static std::unique_ptr< PrefData > parse(const std::string &jsonStr_)
Parses the given JSON string to a best-fit representation of PrefData subclass objects in a tree.
PrefData(plat::PersistentData *&)
Internal use only.
void * _data
Private implementation data.
Definition: hdicorePrefData.h:230
virtual bool operator!=(const PrefData &rhs_) const
Tests whether a given PrefData object is not the same as another.
virtual Type dataType() const
Gets the type of persistent data.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.