Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
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.
 
 ClipboardData (const ClipboardData &data_)
 ClipboardData copy constructor to set the new object to have the same values as an existing object.
 
 ClipboardData (const std::string &str_)
 Constructs a new ClipboardData object from a string value.
 
virtual ~ClipboardData ()
 Destructs an existing ClipboardData object.
 
ClipboardDataoperator= (const ClipboardData &rhs_)
 Assigns one ClipboardData object to another.
 
bool operator== (const ClipboardData &rhs_) const
 Tests whether a given ClipboardData object is the same as another.
 
bool operator!= (const ClipboardData &rhs_) const
 Tests whether a given ClipboardData object is not the same as another.
 
DataType dataType () const
 Gets the type of data held in the target.
 
std::string stringData () const
 Gets the string data contained in the target object, if the type is DataTypeString.
 
void setStringData (const std::string &str_)
 Sets the string data contained in the target object, converting the type to DataTypeString.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ClipboardData() [1/3]

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

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

Author
GW
Date
02/2015

◆ ClipboardData() [2/3]

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

◆ ClipboardData() [3/3]

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

◆ ~ClipboardData()

virtual hdi::core::ClipboardData::~ClipboardData ( )
virtual

Destructs an existing ClipboardData object.

Author
GW
Date
02/2015

Member Function Documentation

◆ dataType()

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

◆ operator!=()

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

◆ operator=()

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

◆ operator==()

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

◆ setStringData()

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

◆ stringData()

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