Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
hdi::core::ai::Entry Class Reference

Illustrator entry wrapper class to allow for entry creation, manipulation, storage, etc. More...

#include <hdicoreaiEntry.h>

Public Types

enum  Type {
  UnknownType = 0, BoolType = 10, IntType = 20, FloatType = 30,
  StringType = 40, BinaryType = 50, DictionaryType = 60, ArrayType = 70,
  AngleType = 80, ArtboardPointType = 90, ArtboardRectType = 100, ArtboardSegPointType = 110,
  ArtColorType = 120, ArtStyleType = 130, BezierType = 140, ColorType = 150,
  DashStyleType = 160, DashStyleMapType = 170, FillStyleType = 180, FillStyleMapType = 190,
  FontType = 200, HitDataType = 210, PathStyleType = 220, PathStyleMapType = 230,
  PointType = 240, RectType = 250, SegPointType = 260, SizeType = 270,
  StrokeStyleType = 280, StrokeStyleMapType = 290, TransformMatrixType = 300, UIDType = 310,
  ArtType = UIDType
}
 Describes the type of data an Entry object represents.
 

Public Member Functions

 Entry ()
 Constructs an empty Entry object. More...
 
 Entry (const Entry &e_)
 Entry copy constructor. More...
 
 Entry (const AIEntryRef aiEntry_)
 Constructs a new Entry object from an AIEntryRef. More...
 
virtual ~Entry ()
 Destructs an Entry object. More...
 
virtual Entryoperator= (const Entry &rhs_)
 Overloaded assignment operator for Entry objects. More...
 
virtual bool operator== (const Entry &rhs_) const
 Tests whether a given Entry object is the same as another. More...
 
virtual bool operator!= (const Entry &rhs_) const
 Tests whether a given Entry object is not the same as another. More...
 
virtual bool isEmpty () const
 Gets whether the target Entry object is empty (constructed with the default ctor) More...
 
virtual AIEntryRef aiEntryRef () const
 Gets the entry ref around which the target object is wrapped. More...
 
virtual Type entryType () const
 Gets the type of the entry. More...
 
virtual bool asArray (Array &array__) const
 Gets an array value from the entry. More...
 
virtual bool asBool (bool &value__) const
 Gets a bool value from the entry. More...
 
virtual bool asDict (Dictionary &dict__) const
 Gets a dictionary value from the entry. More...
 
virtual bool asInt (int64_t &value__) const
 Gets an integer value from the entry. More...
 
virtual bool asFloat (double &value__) const
 Gets a floating-point value from the entry. More...
 
virtual bool asString (std::string &value__) const
 Gets a string value from the entry. More...
 
virtual bool asUID (UID &uid__) const
 Gets a UID value from the entry. More...
 
virtual bool asArt (Art &art__) const
 Gets an Art value from the entry. More...
 

Static Public Member Functions

static Entry FromArray (const Array &value_)
 Statically constructs an Entry object from a given array. More...
 
static Entry FromBool (const bool value_)
 Statically constructs an Entry object from a given bool. More...
 
static Entry FromDict (const Dictionary &value_)
 Statically constructs an Entry object from a given dictionary. More...
 
static Entry FromInt (const int64_t value_)
 Statically constructs an Entry object from a given integer. More...
 
static Entry FromFloat (const double value_)
 Statically constructs an Entry object from a given floating point. More...
 
static Entry FromString (const std::string &value_)
 Statically constructs an Entry object from a given string. More...
 
static Entry FromUID (const UID &value_)
 Statically constructs an Entry object from a given UID object. More...
 
static Entry FromArt (const Art &value_)
 Statically constructs an Entry object from a given Art object. More...
 

Friends

plugin::IllustratorEntry * __accessImpl (const Entry &)
 
Entry __accessCtor (const plugin::IllustratorEntry &)
 

Detailed Description

Illustrator entry wrapper class to allow for entry creation, manipulation, storage, etc.

Constructor & Destructor Documentation

hdi::core::ai::Entry::Entry ( )

Constructs an empty Entry object.

Author
GW
Date
08/2013
Note
To test if an Entry object is empty, call isEmpty() on it
Empty Entry objects do not relate to any actual data; they are designed to be "receivers" of some other Entry object via the overloaded assignment operator. Empty Entry objects are useless until such time (though it is safe to call any of their methods)
hdi::core::ai::Entry::Entry ( const Entry e_)

Entry copy constructor.

Author
GW
Date
08/2013
Parameters
e_Entry object to clone
hdi::core::ai::Entry::Entry ( const AIEntryRef  aiEntry_)

Constructs a new Entry object from an AIEntryRef.

Author
GW
Date
08/2015
Parameters
aiEntry_Raw Illustrator AIEntryRef
virtual hdi::core::ai::Entry::~Entry ( )
virtual

Destructs an Entry object.

Author
GW
Date
08/2013

Member Function Documentation

virtual AIEntryRef hdi::core::ai::Entry::aiEntryRef ( ) const
virtual

Gets the entry ref around which the target object is wrapped.

Author
GW
Date
11/2013
Returns
AIEntryRef for the target object
Note
The caller should not release the returned AIEntryRef (its reference count is not increased before being returned).
Generally, you shouldn't need to call this method. Only use it if you know what you're doing. If a specific piece of functionality provided by Illustrator is not handled by this class (or related classes), then it should probably be added to the hdi_core library.
virtual bool hdi::core::ai::Entry::asArray ( Array array__) const
virtual

Gets an array value from the entry.

Author
GW
Date
08/2013
Parameters
array__Return-by-reference for the array value the entry is wrapped around
Returns
true if the entry is of type ArrayType and array__ can be acquired, false otherwise
virtual bool hdi::core::ai::Entry::asArt ( Art art__) const
virtual

Gets an Art value from the entry.

Author
GW
Date
08/2013
Parameters
art__Return-by-reference for the Art value the entry is wrapped around
Returns
true if the entry is of type ArtType and art__ can be acquired, false otherwise
virtual bool hdi::core::ai::Entry::asBool ( bool &  value__) const
virtual

Gets a bool value from the entry.

Author
GW
Date
08/2013
Parameters
value__Return-by-reference for the bool value the entry is wrapped around
Returns
true if the entry is of type BoolType and value__ can be acquired, false otherwise
virtual bool hdi::core::ai::Entry::asDict ( Dictionary dict__) const
virtual

Gets a dictionary value from the entry.

Author
GW
Date
08/2013
Parameters
dict__Return-by-reference for the dictionary value the entry is wrapped around
Returns
true if the entry is of type DictionaryType and dict__ can be acquired, false otherwise
virtual bool hdi::core::ai::Entry::asFloat ( double &  value__) const
virtual

Gets a floating-point value from the entry.

Author
GW
Date
08/2013
Parameters
value__Return-by-reference for the floating point value the entry is wrapped around
Returns
true if the entry is of type FloatType and value__ can be acquired, false otherwise
virtual bool hdi::core::ai::Entry::asInt ( int64_t &  value__) const
virtual

Gets an integer value from the entry.

Author
GW
Date
08/2013
Parameters
value__Return-by-reference for the integer value the entry is wrapped around
Returns
true if the entry is of type IntType and value__ can be acquired, false otherwise
virtual bool hdi::core::ai::Entry::asString ( std::string &  value__) const
virtual

Gets a string value from the entry.

Author
GW
Date
08/2013
Parameters
value__Return-by-reference for the UTF-8 string value the entry is wrapped around
Returns
true if the entry is of type StringType and value__ can be acquired, false otherwise
virtual bool hdi::core::ai::Entry::asUID ( UID uid__) const
virtual

Gets a UID value from the entry.

Author
GW
Date
08/2013
Parameters
uid__Return-by-reference for the UID value the entry is wrapped around
Returns
true if the entry is of type UIDType and uid__ can be acquired, false otherwise
virtual Type hdi::core::ai::Entry::entryType ( ) const
virtual

Gets the type of the entry.

Author
GW
Date
08/2013
Returns
An enum value describing the type of the entry
static Entry hdi::core::ai::Entry::FromArray ( const Array value_)
static

Statically constructs an Entry object from a given array.

Author
GW
Date
08/2013
Parameters
value_Array value for the new entry
Returns
An Entry object that contains the provided Array object
static Entry hdi::core::ai::Entry::FromArt ( const Art value_)
static

Statically constructs an Entry object from a given Art object.

Author
GW
Date
08/2013
Parameters
value_Art value for the new entry
Returns
An Entry object that contains the provided Art object
static Entry hdi::core::ai::Entry::FromBool ( const bool  value_)
static

Statically constructs an Entry object from a given bool.

Author
GW
Date
08/2013
Parameters
value_bool value for the new entry
Returns
An Entry object that contains the provided bool value
static Entry hdi::core::ai::Entry::FromDict ( const Dictionary value_)
static

Statically constructs an Entry object from a given dictionary.

Author
GW
Date
08/2013
Parameters
value_Dictionary value for the new entry
Returns
An Entry object that contains the provided Dictionary object
static Entry hdi::core::ai::Entry::FromFloat ( const double  value_)
static

Statically constructs an Entry object from a given floating point.

Author
GW
Date
08/2013
Parameters
value_Floating point value for the new entry
Returns
An Entry object that contains the provided double value
Note
This method compensates for values that are NaN by converting them to 0, and compensates for values that are -infinity or infinity by converting them to -FLT_MAX or FLT_MAX, respectively.
Illustrator 16 and below saves all floating-point values as floats (not doubles), so anything larger than FLT_MAX or smaller than -FLT_MAX is adjusted accordingly.
static Entry hdi::core::ai::Entry::FromInt ( const int64_t  value_)
static

Statically constructs an Entry object from a given integer.

Author
GW
Date
08/2013
Parameters
value_Integer value for the new entry
Returns
An Entry object that contains the provided integer value
static Entry hdi::core::ai::Entry::FromString ( const std::string &  value_)
static

Statically constructs an Entry object from a given string.

Author
GW
Date
08/2013
Parameters
value_UTF-8 string value for the new entry
Returns
An Entry object that contains the provided string value
static Entry hdi::core::ai::Entry::FromUID ( const UID value_)
static

Statically constructs an Entry object from a given UID object.

Author
GW
Date
08/2013
Parameters
value_UID value for the new entry
Returns
An Entry object that contains the provided UID object
virtual bool hdi::core::ai::Entry::isEmpty ( ) const
virtual

Gets whether the target Entry object is empty (constructed with the default ctor)

Author
GW
Date
08/2013
Returns
true if the target Entry object is empty, false otherwise
virtual bool hdi::core::ai::Entry::operator!= ( const Entry rhs_) const
virtual

Tests whether a given Entry object is not the same as another.

Author
GW
Date
08/2013
Parameters
rhs_Entry to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different entries, false otherwise
virtual Entry& hdi::core::ai::Entry::operator= ( const Entry rhs_)
virtual

Overloaded assignment operator for Entry objects.

Author
GW
Date
08/2013
Parameters
rhs_Righthand side of the assignment operator; existing Entry object that the target should reference instead
Returns
The lefthand side of the assignment operator, but now referencing the same entry data as the righthand side
virtual bool hdi::core::ai::Entry::operator== ( const Entry rhs_) const
virtual

Tests whether a given Entry object is the same as another.

Author
GW
Date
08/2013
Parameters
rhs_Entry to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same entry, false otherwise