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

Used to contain data when writing/reading to/from the clipboard. More...

#include <hdicoreRuntime.h>

Public Types

enum  DataType { DataTypeUnknown = 0, DataTypeString = 10, DataTypeImage = 20 }
 Describes the type of data contained in a ClipboardData object.
 

Public Member Functions

 ClipboardData ()
 Default ClipboardData constructor, setting the object to have default values. More...
 
 ClipboardData (const ClipboardData &data_)
 ClipboardData copy constructor to set the new object to have the same values as an existing object. More...
 
 ClipboardData (const std::string &str_)
 Constructs a new ClipboardData object from a string value. More...
 
virtual ~ClipboardData ()
 Destructs an existing ClipboardData object. More...
 
ClipboardDataoperator= (const ClipboardData &rhs_)
 Assigns one ClipboardData object to another. More...
 
bool operator== (const ClipboardData &rhs_) const
 Tests whether a given ClipboardData object is the same as another. More...
 
bool operator!= (const ClipboardData &rhs_) const
 Tests whether a given ClipboardData object is not the same as another. More...
 
DataType dataType () const
 Gets the type of data held in the target. More...
 
std::string stringData () const
 Gets the string data contained in the target object, if the type is DataTypeString. More...
 
void setStringData (const std::string &str_)
 Sets the string data contained in the target object, converting the type to DataTypeString. More...
 

Detailed Description

Used to contain data when writing/reading to/from the clipboard.

Constructor & Destructor Documentation

hdi::core::ClipboardData::ClipboardData ( )

Default ClipboardData constructor, setting the object to have default values.

Author
GW
Date
02/2015
hdi::core::ClipboardData::ClipboardData ( const ClipboardData data_)

ClipboardData copy constructor to set the new object to have the same values as an existing object.

Author
GW
Date
02/2015
Parameters
data_Existing ClipboardData object
hdi::core::ClipboardData::ClipboardData ( const std::string &  str_)

Constructs a new ClipboardData object from a string value.

Author
GW
Date
02/2015
Parameters
str_String value that the ClipboardData object should hold, as UTF-8
virtual hdi::core::ClipboardData::~ClipboardData ( )
virtual

Destructs an existing ClipboardData object.

Author
GW
Date
02/2015

Member Function Documentation

DataType hdi::core::ClipboardData::dataType ( ) const

Gets the type of data held in the target.

Author
GW
Date
02/2015
Returns
The type of the contained data, or DataTypeUnknown if the default ctor was used
bool hdi::core::ClipboardData::operator!= ( const ClipboardData rhs_) const

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

Author
GW
Date
02/2015
Parameters
rhs_ClipboardData to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different clipboard data, false otherwise
ClipboardData& hdi::core::ClipboardData::operator= ( const ClipboardData rhs_)

Assigns one ClipboardData object to another.

Author
GW
Date
02/2015
Parameters
rhs_Existing ClipboardData object to copy values from
Returns
The target ClipboardData object, but with its values updated to match that of the rhs_ argument
bool hdi::core::ClipboardData::operator== ( const ClipboardData rhs_) const

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

Author
GW
Date
02/2015
Parameters
rhs_ClipboardData to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same clipboard data, false otherwise
void hdi::core::ClipboardData::setStringData ( const std::string &  str_)

Sets the string data contained in the target object, converting the type to DataTypeString.

Author
GW
Date
02/2015
Parameters
str_New string value to hold in the target, as UTF-8
std::string hdi::core::ClipboardData::stringData ( ) const

Gets the string data contained in the target object, if the type is DataTypeString.

Author
GW
Date
02/2015
Returns
The string value held in the target (as UTF-8), or "" if the type is not DataTypeString