Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreaiDictionary.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_AI_DICTIONARY__
8 #define __HDI_CORE_AI_DICTIONARY__
9 
10 #include "hdicoreTypes.h"
11 
12 namespace hdi
13 {
14  namespace plugin
15  {
16  class IllustratorDictionary;
17  }
18 
19  namespace core
20  {
21  class Art;
22  class UID;
23 
24  namespace ai
25  {
26  class Array;
27  class Entry;
28 
33  class Dictionary
34  {
35  public:
47  class Iterator
48  {
49  public:
57  Iterator(const Iterator& iter_);
58 
64  ~Iterator();
65 
75  Iterator& operator=(const Iterator& rhs_);
76 
85  bool operator==(const Iterator& rhs_) const;
86 
95  bool operator!=(const Iterator& rhs_) const;
96 
104  Iterator& operator++();
105 
113  Iterator operator++(int);
114 
122  Iterator& operator--();
123 
131  Iterator operator--(int);
132 
141  bool atEnd() const;
142 
151  std::string key() const;
152 
160  std::auto_ptr<Entry> value() const;
161 
162 
163  private:
164  // Only Dictionary can construct a new Iterator object
165  friend class Dictionary;
166 
170  void* __data;
171 
177  Iterator();
178 
186  explicit Iterator(const Dictionary& dict_);
187  };
188 
189  typedef std::auto_ptr<Iterator> IteratorAP;
190 
196  Dictionary();
197 
205  Dictionary(const Dictionary& d_);
206 
214  Dictionary(const AIDictionaryRef aiDict_);
215 
221  virtual ~Dictionary();
222 
233  virtual Dictionary& operator=(const Dictionary& rhs_);
234 
243  virtual bool operator==(const Dictionary& rhs_) const;
244 
253  virtual bool operator!=(const Dictionary& rhs_) const;
254 
269  virtual AIDictionaryRef aiDictionaryRef() const;
270 
281  virtual bool getEntry(const std::string& keyName_, Entry& entry__) const;
282 
292  virtual bool setEntry(const std::string& keyName_, const Entry& entry_);
293 
302  virtual bool deleteEntry(const std::string& keyName_);
303 
313  virtual bool getArrayEntry(const std::string& keyName_, Array& array__) const;
314 
324  virtual bool setArrayEntry(const std::string& keyName_, const Array& array_);
325 
335  virtual bool getBoolEntry(const std::string& keyName_, bool& value__) const;
336 
346  virtual bool setBoolEntry(const std::string& keyName_, const bool value_);
347 
357  virtual bool getDictEntry(const std::string& keyName_, Dictionary& dict__) const;
358 
368  virtual bool setDictEntry(const std::string& keyName_, const Dictionary& dict_);
369 
379  virtual bool getIntEntry(const std::string& keyName_, int64_t& value__) const;
380 
390  virtual bool setIntEntry(const std::string& keyName_, const int64_t value_);
391 
401  virtual bool getFloatEntry(const std::string& keyName_, double& value__) const;
402 
418  virtual bool setFloatEntry(const std::string& keyName_, const double value_);
419 
429  virtual bool getStringEntry(const std::string& keyName_, std::string& value__) const;
430 
440  virtual bool setStringEntry(const std::string& keyName_, const std::string& value_);
441 
451  virtual bool getUIDEntry(const std::string& keyName_, UID& uid__) const;
452 
462  virtual bool setUIDEntry(const std::string& keyName_, const UID& value_);
463 
473  virtual bool getArtEntry(const std::string& keyName_, Art& art__) const;
474 
484  virtual bool setArtEntry(const std::string& keyName_, const Art& value_);
485 
494  virtual bool hasKey(const std::string& keyName_) const;
495 
503  virtual bool clear();
504 
520  Iterator begin() const;
521 
522 
523  private:
524  friend plugin::IllustratorDictionary* __accessImpl(const Dictionary&);
525  friend Dictionary __accessCtor(const plugin::IllustratorDictionary&);
526 
530  plugin::IllustratorDictionary* __impl;
531 
537  Dictionary(const plugin::IllustratorDictionary&);
538  };
539 
540  typedef std::auto_ptr<Dictionary> DictionaryAP;
541 
542  extern plugin::IllustratorDictionary* __accessImpl(const Dictionary&);
543  extern Dictionary __accessCtor(const plugin::IllustratorDictionary&);
544  }
545  }
546 }
547 
548 #endif
549 // __HDI_CORE_AI_DICTIONARY__
Handles general art-related functionality.
Definition: hdicoreArt.h:48
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
Allows for iteration through the members of a dictionary, a la std::vector iteration.
Definition: hdicoreaiDictionary.h:47
Embodies Illustrator&#39;s dictionary storage containers; can be placed inside an array, or another dictionary.
Definition: hdicoreaiDictionary.h:33
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
Definition: hdicoreaiArray.h:12
Embodies Illustrator&#39;s array storage containers; can be placed inside a dictionary or another array...
Definition: hdicoreaiArray.h:32