Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreaiEntry.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_AI_ENTRY__
8#define __HDI_CORE_AI_ENTRY__
9
10#if defined(HDI_CORE_AIP_MODE)
11
12#include "hdicoreTypes.h"
13
14namespace hdi
15{
16 namespace aip
17 {
18 class IllustratorEntry;
19 }
20
21 namespace core
22 {
23 class Art;
24 class UID;
25
26 namespace ai
27 {
28 class Array;
29 class Dictionary;
30
34 class Entry
35 {
36 public:
40 enum Type
41 {
42 UnknownType = 0,
43 BoolType = 10,
44 IntType = 20,
45 FloatType = 30,
46 StringType = 40,
47 BinaryType = 50, // Reserved for future use
48 DictionaryType = 60,
49 ArrayType = 70,
50 AngleType = 80, // Reserved for future use
51 ArtboardPointType = 90, // Reserved for future use
52 ArtboardRectType = 100, // Reserved for future use
53 ArtboardSegPointType = 110, // Reserved for future use
54 ArtColorType = 120, // Reserved for future use
55 ArtStyleType = 130, // Reserved for future use
56 BezierType = 140, // Reserved for future use
57 ColorType = 150, // Reserved for future use
58 DashStyleType = 160, // Reserved for future use
59 DashStyleMapType = 170, // Reserved for future use
60 FillStyleType = 180, // Reserved for future use
61 FillStyleMapType = 190, // Reserved for future use
62 FontType = 200, // Reserved for future use
63 HitDataType = 210, // Reserved for future use
64 PathStyleType = 220, // Reserved for future use
65 PathStyleMapType = 230, // Reserved for future use
66 PointType = 240, // Reserved for future use
67 RectType = 250, // Reserved for future use
68 SegPointType = 260, // Reserved for future use
69 SizeType = 270, // Reserved for future use
70 StrokeStyleType = 280, // Reserved for future use
71 StrokeStyleMapType = 290, // Reserved for future use
72 TransformMatrixType = 300, // Reserved for future use
73 UIDType = 310,
74 ArtType = UIDType
75 };
76
88
96 Entry(const Entry& e_);
97
105 Entry(const AIEntryRef aiEntry_);
106
112 virtual ~Entry();
113
124 virtual Entry& operator=(const Entry& rhs_);
125
134 virtual bool operator==(const Entry& rhs_) const;
135
144 virtual bool operator!=(const Entry& rhs_) const;
145
153 virtual bool isEmpty() const;
154
169 virtual AIEntryRef aiEntryRef() const;
170
178 virtual Type entryType() const;
179
188 virtual bool asArray(Array& array__) const;
189
198 virtual bool asBool(bool& value__) const;
199
209 virtual bool asDict(Dictionary& dict__) const;
210
219 virtual bool asInt(int64_t& value__) const;
220
229 virtual bool asFloat(double& value__) const;
230
239 virtual bool asString(std::string& value__) const;
240
249 virtual bool asUID(UID& uid__) const;
250
259 virtual bool asArt(Art& art__) const;
260
269 static Entry FromArray(const Array& value_);
270
279 static Entry FromBool(const bool value_);
280
289 static Entry FromDict(const Dictionary& value_);
290
299 static Entry FromInt(const int64_t value_);
300
313 static Entry FromFloat(const double value_);
314
323 static Entry FromString(const std::string& value_);
324
333 static Entry FromUID(const UID& value_);
334
343 static Entry FromArt(const Art& value_);
344
345
346 private:
347 friend aip::IllustratorEntry* __accessImpl(const Entry&);
348 friend Entry __accessCtor(const aip::IllustratorEntry&);
349
353 aip::IllustratorEntry* __impl;
354
360 Entry(const aip::IllustratorEntry&);
361 };
362
363 typedef std::unique_ptr<Entry> EntryUP;
364 typedef std::shared_ptr<Entry> EntrySP;
365 typedef std::weak_ptr<Entry> EntryWP;
366
367 extern aip::IllustratorEntry* __accessImpl(const Entry&);
368 extern Entry __accessCtor(const aip::IllustratorEntry&);
369 }
370 }
371}
372
373#endif
374// HDI_CORE_AIP_MODE
375
376#endif
377// __HDI_CORE_AI_ENTRY__
Handles general art-related functionality.
Definition: hdicoreArt.h:51
Allows for easy UID acquisition, art access, etc.
Definition: hdicoreUID.h:32
Embodies Illustrator's array storage containers; can be placed inside a dictionary or another array.
Definition: hdicoreaiArray.h:35
Embodies Illustrator's dictionary storage containers; can be placed inside an array,...
Definition: hdicoreaiDictionary.h:36
Illustrator entry wrapper class to allow for entry creation, manipulation, storage,...
Definition: hdicoreaiEntry.h:35
static Entry FromBool(const bool value_)
Statically constructs an Entry object from a given bool.
virtual bool asDict(Dictionary &dict__) const
Gets a dictionary value from the entry.
virtual ~Entry()
Destructs an Entry object.
virtual bool asFloat(double &value__) const
Gets a floating-point value from the entry.
virtual bool asString(std::string &value__) const
Gets a string value from the entry.
Type
Describes the type of data an Entry object represents.
Definition: hdicoreaiEntry.h:41
Entry(const AIEntryRef aiEntry_)
Constructs a new Entry object from an AIEntryRef.
virtual bool asInt(int64_t &value__) const
Gets an integer value from the entry.
virtual Type entryType() const
Gets the type of the entry.
virtual bool isEmpty() const
Gets whether the target Entry object is empty (constructed with the default ctor)
virtual bool asArray(Array &array__) const
Gets an array value from the entry.
static Entry FromArray(const Array &value_)
Statically constructs an Entry object from a given array.
virtual bool operator==(const Entry &rhs_) const
Tests whether a given Entry object is the same as another.
virtual bool asUID(UID &uid__) const
Gets a UID value from the entry.
static Entry FromInt(const int64_t value_)
Statically constructs an Entry object from a given integer.
virtual AIEntryRef aiEntryRef() const
Gets the entry ref around which the target object is wrapped.
static Entry FromString(const std::string &value_)
Statically constructs an Entry object from a given string.
static Entry FromFloat(const double value_)
Statically constructs an Entry object from a given floating point.
Entry()
Constructs an empty Entry object.
virtual bool asBool(bool &value__) const
Gets a bool value from the entry.
static Entry FromDict(const Dictionary &value_)
Statically constructs an Entry object from a given dictionary.
virtual bool operator!=(const Entry &rhs_) const
Tests whether a given Entry object is not the same as another.
static Entry FromArt(const Art &value_)
Statically constructs an Entry object from a given Art object.
Entry(const Entry &e_)
Entry copy constructor.
static Entry FromUID(const UID &value_)
Statically constructs an Entry object from a given UID object.
virtual Entry & operator=(const Entry &rhs_)
Overloaded assignment operator for Entry objects.
virtual bool asArt(Art &art__) const
Gets an Art value from the entry.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
ArtType
Indicates a type of art (when querying an art object for its type)
Definition: hdicoreTypes.h:165