Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicoreaiEntry.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_AI_ENTRY__
8 #define __HDI_CORE_AI_ENTRY__
9 
10 #include "hdicoreTypes.h"
11 
12 namespace hdi
13 {
14  namespace plugin
15  {
16  class IllustratorEntry;
17  }
18 
19  namespace core
20  {
21  class Art;
22  class UID;
23 
24  namespace ai
25  {
26  class Array;
27  class Dictionary;
28 
32  class Entry
33  {
34  public:
38  enum Type
39  {
40  UnknownType = 0,
41  BoolType = 10,
42  IntType = 20,
43  FloatType = 30,
44  StringType = 40,
45  BinaryType = 50, // Reserved for future use
46  DictionaryType = 60,
47  ArrayType = 70,
48  AngleType = 80, // Reserved for future use
49  ArtboardPointType = 90, // Reserved for future use
50  ArtboardRectType = 100, // Reserved for future use
51  ArtboardSegPointType = 110, // Reserved for future use
52  ArtColorType = 120, // Reserved for future use
53  ArtStyleType = 130, // Reserved for future use
54  BezierType = 140, // Reserved for future use
55  ColorType = 150, // Reserved for future use
56  DashStyleType = 160, // Reserved for future use
57  DashStyleMapType = 170, // Reserved for future use
58  FillStyleType = 180, // Reserved for future use
59  FillStyleMapType = 190, // Reserved for future use
60  FontType = 200, // Reserved for future use
61  HitDataType = 210, // Reserved for future use
62  PathStyleType = 220, // Reserved for future use
63  PathStyleMapType = 230, // Reserved for future use
64  PointType = 240, // Reserved for future use
65  RectType = 250, // Reserved for future use
66  SegPointType = 260, // Reserved for future use
67  SizeType = 270, // Reserved for future use
68  StrokeStyleType = 280, // Reserved for future use
69  StrokeStyleMapType = 290, // Reserved for future use
70  TransformMatrixType = 300, // Reserved for future use
71  UIDType = 310,
72  ArtType = UIDType
73  };
74 
85  Entry();
86 
94  Entry(const Entry& e_);
95 
103  Entry(const AIEntryRef aiEntry_);
104 
110  virtual ~Entry();
111 
122  virtual Entry& operator=(const Entry& rhs_);
123 
132  virtual bool operator==(const Entry& rhs_) const;
133 
142  virtual bool operator!=(const Entry& rhs_) const;
143 
151  virtual bool isEmpty() const;
152 
167  virtual AIEntryRef aiEntryRef() const;
168 
176  virtual Type entryType() const;
177 
186  virtual bool asArray(Array& array__) const;
187 
196  virtual bool asBool(bool& value__) const;
197 
207  virtual bool asDict(Dictionary& dict__) const;
208 
217  virtual bool asInt(int64_t& value__) const;
218 
227  virtual bool asFloat(double& value__) const;
228 
237  virtual bool asString(std::string& value__) const;
238 
247  virtual bool asUID(UID& uid__) const;
248 
257  virtual bool asArt(Art& art__) const;
258 
267  static Entry FromArray(const Array& value_);
268 
277  static Entry FromBool(const bool value_);
278 
287  static Entry FromDict(const Dictionary& value_);
288 
297  static Entry FromInt(const int64_t value_);
298 
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 plugin::IllustratorEntry* __accessImpl(const Entry&);
348  friend Entry __accessCtor(const plugin::IllustratorEntry&);
349 
353  plugin::IllustratorEntry* __impl;
354 
360  Entry(const plugin::IllustratorEntry&);
361  };
362 
363  typedef std::auto_ptr<Entry> EntryAP;
364 
365  extern plugin::IllustratorEntry* __accessImpl(const Entry&);
366  extern Entry __accessCtor(const plugin::IllustratorEntry&);
367  }
368  }
369 }
370 
371 #endif
372 // __HDI_CORE_AI_ENTRY__
Handles general art-related functionality.
Definition: hdicoreArt.h:47
Allows for easy UID acquisition, art access, etc.
Definition: hdicoreUID.h:29
Illustrator entry wrapper class to allow for entry creation, manipulation, storage, etc.
Definition: hdicoreaiEntry.h:32
virtual bool asUID(UID &uid__) const
Gets a UID value from the entry.
static Entry FromString(const std::string &value_)
Statically constructs an Entry object from a given string.
virtual ~Entry()
Destructs an Entry object.
virtual bool asString(std::string &value__) const
Gets a string value from the entry.
virtual Type entryType() const
Gets the type of the entry.
virtual bool asArt(Art &art__) const
Gets an Art value from the entry.
static Entry FromDict(const Dictionary &value_)
Statically constructs an Entry object from a given dictionary.
virtual bool asArray(Array &array__) const
Gets an array value from the entry.
static Entry FromArt(const Art &value_)
Statically constructs an Entry object from a given Art object.
Embodies Illustrator's dictionary storage containers; can be placed inside an array, or another dictionary.
Definition: hdicoreaiDictionary.h:33
Entry()
Constructs an empty Entry object.
virtual bool asFloat(double &value__) const
Gets a floating-point value from the entry.
virtual bool asBool(bool &value__) const
Gets a bool value from the entry.
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 asDict(Dictionary &dict__) const
Gets a dictionary value from the entry.
virtual bool operator!=(const Entry &rhs_) const
Tests whether a given Entry object is not the same as another.
virtual AIEntryRef aiEntryRef() const
Gets the entry ref around which the target object is wrapped.
Type
Describes the type of data an Entry object represents.
Definition: hdicoreaiEntry.h:38
static Entry FromBool(const bool value_)
Statically constructs an Entry object from a given bool.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
virtual bool asInt(int64_t &value__) const
Gets an integer value from the entry.
virtual bool operator==(const Entry &rhs_) const
Tests whether a given Entry object is the same as another.
Definition: hdicoreaiArray.h:12
static Entry FromArray(const Array &value_)
Statically constructs an Entry object from a given array.
Embodies Illustrator's array storage containers; can be placed inside a dictionary or another array...
Definition: hdicoreaiArray.h:32
virtual bool isEmpty() const
Gets whether the target Entry object is empty (constructed with the default ctor) ...
static Entry FromInt(const int64_t value_)
Statically constructs an Entry object from a given integer.
static Entry FromFloat(const double value_)
Statically constructs an Entry object from a given floating point.