Hot Door CORE 0.8.3
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreUID.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_UID__
8#define __HDI_CORE_UID__
9
10#if defined(HDI_CORE_AIP_MODE)
11
12#include "hdicoreTypes.h"
13
14namespace hdi
15{
16 namespace aip
17 {
18 class UID;
19 }
20
21 namespace core
22 {
23 class Art;
24
31 class UID
32 {
33 public:
44 static std::string normalizeName(const std::string& name_);
45
54 static std::string denormalizeID(const std::string& id_);
55
66 UID();
67
75 UID(const UID& u_);
76
84 UID(const std::string& name_);
85
93 UID(const AIUIDRef aiUID_);
94
100 virtual ~UID();
101
110 virtual UID& operator=(const UID& rhs_);
111
120 virtual bool operator==(const UID& rhs_) const;
121
130 virtual bool operator!=(const UID& rhs_) const;
131
145 virtual AIUIDRef aiUIDRef() const;
146
154 virtual bool isEmpty() const;
155
163 virtual std::unique_ptr<Art> art() const;
164
172 virtual std::string name() const;
173
191 void setName(const std::string& name_);
192
193
194 private:
195 friend aip::UID* __accessImpl(const UID&);
196 friend UID __accessCtor(const aip::UID&);
197
201 aip::UID* __impl;
202
208 UID(const aip::UID&);
209 };
210
211 typedef std::unique_ptr<UID> UIDUP;
212 typedef std::shared_ptr<UID> UIDSP;
213 typedef std::weak_ptr<UID> UIDWP;
214
215 extern aip::UID* __accessImpl(const UID&);
216 extern UID __accessCtor(const aip::UID&);
217 }
218}
219
220#endif
221// HDI_CORE_AIP_MODE
222
223#endif
224// __HDI_CORE_UID__
Allows for easy UID acquisition, art access, etc.
Definition: hdicoreUID.h:32
UID(const std::string &name_)
Constructs a new UID object from a UID name.
void setName(const std::string &name_)
Sets the name of the target UID object.
static std::string normalizeName(const std::string &name_)
Normalizes the proposed name into Adobe's special UID naming format.
virtual std::unique_ptr< Art > art() const
Gets an Art object for the target UID.
virtual bool operator==(const UID &rhs_) const
Tests whether a given UID object is the same as another.
UID(const UID &u_)
UID copy constructor.
UID()
Creates an empty UID object.
virtual bool operator!=(const UID &rhs_) const
Tests whether a given UID object is not the same as another.
static std::string denormalizeID(const std::string &id_)
Denormalizes the UID name/ID back into a regular/user-readable name.
virtual ~UID()
Destructs a UID object.
virtual UID & operator=(const UID &rhs_)
Overloaded assignment operator for UID objects.
virtual bool isEmpty() const
Gets whether the target UID object is empty (constructed with the default ctor)
virtual std::string name() const
Gets the unique name of the target UID object.
virtual AIUIDRef aiUIDRef() const
Gets the UID ref around which the target object is wrapped.
UID(const AIUIDRef aiUID_)
Constructs a new UID object from an AIUIDRef.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.