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

Allows for a *Entry class to store either a string value or PNGI image ID for a row/column. More...

#include <hdicoreEntryValue.h>

Classes

struct  ImageIDs
 Stores both a light and dark image PNGI resource ID, such that Illustrator UI brightness changes can be properly handled. More...
 

Public Types

enum  ValueType { UnknownValueType = 0, StringValueType = 10, ImageValueType = 20 }
 Indicates the type of value stored in an EntryValue object.
 

Public Member Functions

 EntryValue (const EntryValue &ev_)
 EntryValue copy constructor. More...
 
 EntryValue (const std::string &str_)
 Constructs an EntryValue object with a string value. More...
 
 EntryValue (const ImageIDs &ids_)
 Constructs an EntryValue object with PNGI image IDs. More...
 
 ~EntryValue ()
 EntryValue destructor. More...
 
EntryValueoperator= (const EntryValue &rhs_)
 Overloaded assignment operator to copy values from one EntryValue object to another. More...
 
bool operator== (const EntryValue &rhs_) const
 Overloaded equality operator to compare two EntryValue objects to one another. More...
 
bool operator!= (const EntryValue &rhs_) const
 Overloaded inequality operator to compare two EntryValue objects to one another. More...
 
ValueType type () const
 Gets the type of value representing by the target object. More...
 
std::string stringValue () const
 Gets the string value for the target object. More...
 
bool setStringValue (const std::string &str_)
 Sets the string value for the target object. More...
 
ImageIDs imageIDs () const
 Gets the image ID values for the target object. More...
 
bool setImageIDs (const ImageIDs &ids_)
 Sets the image ID values for the target object. More...
 

Detailed Description

Allows for a *Entry class to store either a string value or PNGI image ID for a row/column.

Constructor & Destructor Documentation

hdi::core::EntryValue::EntryValue ( const EntryValue ev_)

EntryValue copy constructor.

Author
GW
Date
02/2015
Parameters
ev_Existing EntryValue object to copy values from
hdi::core::EntryValue::EntryValue ( const std::string &  str_)
explicit

Constructs an EntryValue object with a string value.

Author
GW
Date
02/2015
Parameters
str_String value for the entry
hdi::core::EntryValue::EntryValue ( const ImageIDs ids_)

Constructs an EntryValue object with PNGI image IDs.

Author
GW
Date
02/2015
Parameters
ids_Image ID values for the entry
hdi::core::EntryValue::~EntryValue ( )

EntryValue destructor.

Author
GW
Date
02/2015

Member Function Documentation

ImageIDs hdi::core::EntryValue::imageIDs ( ) const

Gets the image ID values for the target object.

Author
GW
Date
02/2015
Returns
The image IDs
Note
The return value should be ignored if the type() method does not return ImageValueType.
bool hdi::core::EntryValue::operator!= ( const EntryValue rhs_) const

Overloaded inequality operator to compare two EntryValue objects to one another.

Author
GW
Date
02/2015
Parameters
rhs_Righthand side of the comparison
Returns
true if the lefthand side and righthand side of the comparison have differing entry values
EntryValue& hdi::core::EntryValue::operator= ( const EntryValue rhs_)

Overloaded assignment operator to copy values from one EntryValue object to another.

Author
GW
Date
02/2015
Parameters
rhs_Righthand side of the assignment
Returns
The lefthand side of the assignment, but with its values updated to match rhs_
bool hdi::core::EntryValue::operator== ( const EntryValue rhs_) const

Overloaded equality operator to compare two EntryValue objects to one another.

Author
GW
Date
02/2015
Parameters
rhs_Righthand side of the comparison
Returns
true if the lefthand side and righthand side of the comparison have the same entry values
bool hdi::core::EntryValue::setImageIDs ( const ImageIDs ids_)

Sets the image ID values for the target object.

Author
GW
Date
02/2015
Parameters
ids_New ID values for the target object
Returns
true if the type is ImageValueType, false otherwise
bool hdi::core::EntryValue::setStringValue ( const std::string &  str_)

Sets the string value for the target object.

Author
GW
Date
02/2015
Parameters
str_New string value for the target object, as UTF-8
Returns
true if the type is StringValueType, false otherwise
std::string hdi::core::EntryValue::stringValue ( ) const

Gets the string value for the target object.

Author
GW
Date
02/2015
Returns
The string value if the type is StringValueType (as UTF-8), "" otherwise
ValueType hdi::core::EntryValue::type ( ) const

Gets the type of value representing by the target object.

Author
GW
Date
02/2015
Returns
The type of value stored within the target