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

Allows column views to store more data than simply strings and indices. More...

#include <hdicoreColumnEntry.h>

Public Types

typedef std::vector< EntryValueValueVector
 
typedef std::vector< void * > DataVector
 

Public Member Functions

 ColumnEntry ()
 Constructs an empty ColumnEntry object. More...
 
 ColumnEntry (const ColumnEntry &e_)
 Constructs a new ColumnEntry object from an existing ColumnEntry object (copy constructor) More...
 
 ColumnEntry (const std::string &id_, const ValueVector &values_, const DataVector &userData_, const bool enabled_=true)
 Constructs a ColumnEntry object with some custom data. More...
 
virtual ~ColumnEntry ()
 Destructs a ColumnEntry object. More...
 
virtual ColumnEntryoperator= (const ColumnEntry &rhs_)
 Assigns one ColumnEntry object to another. More...
 
virtual bool isEmpty () const
 Gets whether the target ColumnEntry object is empty (constructed with the default ctor) More...
 
virtual std::string entryID () const
 Gets the ID string of an entry. More...
 
virtual void setEntryID (const std::string &id_)
 Sets the ID string of an entry. More...
 
virtual ValueVector values () const
 Gets the value objects of an entry. More...
 
virtual void setValues (const ValueVector &values_)
 Sets the value objects of an entry. More...
 
virtual bool enabled () const
 Gets whether the entry should be enabled (selectable by the user in the list) More...
 
virtual void setEnabled (const bool enabled_)
 Sets whether the entry should be enabled (selectable by the user in the list) More...
 
virtual DataVector userData () const
 Gets the custom data of an entry. More...
 
virtual void setUserData (const DataVector &data_)
 Sets the custom data of an entry. More...
 
virtual bool operator== (const ColumnEntry &rhs_) const
 Tests whether a given ColumnEntry object is the same as another. More...
 
virtual bool operator!= (const ColumnEntry &rhs_) const
 Tests whether a given ColumnEntry object is not the same as another. More...
 

Static Public Attributes

static const char * separatorValue
 When you want a separator in a container widget, create a ColumnEntry object with this as its string value.
 

Friends

plugin::ColumnEntryData * __accessImpl (const ColumnEntry &)
 

Detailed Description

Allows column views to store more data than simply strings and indices.

Constructor & Destructor Documentation

hdi::core::ColumnEntry::ColumnEntry ( )

Constructs an empty ColumnEntry object.

Author
GW
Date
01/2015
Note
To test if a ColumnEntry object is empty, call isEmpty() on it
Empty ColumnEntry objects do not relate to any entry in any widget; they are designed to be "receivers" of some other ColumnEntry object via the overloaded assignment operator. Empty ColumnEntry objects are useless until such time (though it is safe to call any of their methods).
hdi::core::ColumnEntry::ColumnEntry ( const ColumnEntry e_)

Constructs a new ColumnEntry object from an existing ColumnEntry object (copy constructor)

Author
GW
Date
01/2015
Parameters
e_Existing ColumnEntry object
hdi::core::ColumnEntry::ColumnEntry ( const std::string &  id_,
const ValueVector &  values_,
const DataVector &  userData_,
const bool  enabled_ = true 
)

Constructs a ColumnEntry object with some custom data.

Author
GW
Date
01/2015
Parameters
id_Entry ID string, as UTF-8 (must form a unique ID path in the target container)
values_Entry value objects, one for each column
userData_Data to store in each column of the entry
enabled_Whether the entry should be enabled
virtual hdi::core::ColumnEntry::~ColumnEntry ( )
virtual

Destructs a ColumnEntry object.

Author
GW
Date
01/2015

Member Function Documentation

virtual bool hdi::core::ColumnEntry::enabled ( ) const
virtual

Gets whether the entry should be enabled (selectable by the user in the list)

Author
GW
Date
01/2015
Returns
true for enabled, false otherwise
virtual std::string hdi::core::ColumnEntry::entryID ( ) const
virtual

Gets the ID string of an entry.

Author
GW
Date
01/2015
Returns
The unique ID of the entry, as UTF-8
virtual bool hdi::core::ColumnEntry::isEmpty ( ) const
virtual

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

Author
GW
Date
01/2015
Returns
true if the target ColumnEntry object is empty, false otherwise
virtual bool hdi::core::ColumnEntry::operator!= ( const ColumnEntry rhs_) const
virtual

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

Author
GW
Date
01/2015
Parameters
rhs_ColumnEntry to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different entries, false otherwise
virtual ColumnEntry& hdi::core::ColumnEntry::operator= ( const ColumnEntry rhs_)
virtual

Assigns one ColumnEntry object to another.

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

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

Author
GW
Date
01/2015
Parameters
rhs_ColumnEntry to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same entry, false otherwise
virtual void hdi::core::ColumnEntry::setEnabled ( const bool  enabled_)
virtual

Sets whether the entry should be enabled (selectable by the user in the list)

Author
GW
Date
01/2015
Parameters
enabled_true for enabled, false otherwise
virtual void hdi::core::ColumnEntry::setEntryID ( const std::string &  id_)
virtual

Sets the ID string of an entry.

Author
GW
Date
01/2015
Parameters
id_New entry ID string, as UTF-8
Note
It is up to the caller to ensure that the ID path is not in use with other entries within the same container widget.
virtual void hdi::core::ColumnEntry::setUserData ( const DataVector &  data_)
virtual

Sets the custom data of an entry.

Author
GW
Date
01/2015
Parameters
data_New custom data to store
virtual void hdi::core::ColumnEntry::setValues ( const ValueVector &  values_)
virtual

Sets the value objects of an entry.

Author
GW
Date
01/2015
Parameters
values_New entry value objects
virtual DataVector hdi::core::ColumnEntry::userData ( ) const
virtual

Gets the custom data of an entry.

Author
GW
Date
01/2015
Returns
The data stored inside the target entry object
virtual ValueVector hdi::core::ColumnEntry::values ( ) const
virtual

Gets the value objects of an entry.

Author
GW
Date
01/2015
Returns
The entry's value objects