GCpp general purpose C++ library
version 1.0
|
#include <GItem.hh>
Public Member Functions | |
template<class Q > | |
bool | IsInstanceOf () const |
template<class Q > | |
bool | IsInstanceOf () |
virtual GItem * | Clone () const |
virtual const char * | ClassName () const |
GItem (const string &s, void *ptr=NULL, const int n=0) | |
GItem (const GItem &original) | |
virtual | ~GItem () |
GItem & | operator= (const GItem &original) |
bool | operator== (const GItem &item) |
int | GetId () const |
void | SetId (const int n) |
void * | GetUserData () const |
void | SetUserData (void *ptr) |
virtual string | GetInfo () const |
virtual void | SetInfo (const string &info) |
void | Select (const bool b=true) |
bool | IsSelected () const |
![]() | |
template<class Q > | |
bool | IsInstanceOf () const |
template<class Q > | |
bool | IsInstanceOf () |
GNamed (const string &object_name="") | |
GNamed (const GNamed &object) | |
virtual | ~GNamed () |
GNamed & | operator= (const GNamed &object) |
virtual const string & | Name () const |
virtual string & | Name () |
virtual string | GetName () const |
virtual void | SetName (const string &object_name) |
int | Compare (const GNamed &object) const |
int | CompareDict (const GNamed &object) const |
bool | operator== (const GNamed &object) const |
bool | operator!= (const GNamed &object) const |
bool | operator< (const GNamed &object) const |
bool | operator> (const GNamed &object) const |
bool | operator<= (const GNamed &object) const |
bool | operator>= (const GNamed &object) const |
Static Public Member Functions | |
static const char * | StaticClassName () |
![]() | |
static const char * | StaticClassName () |
Protected Attributes | |
bool | selected |
Indicates if the element is selected. | |
int | id |
Identification number (for ROOT widgets) | |
void * | user_data |
Pointer on user data. | |
string | data_info |
More detailed information (if required) | |
![]() | |
string | name |
Object name. | |
This class defines base elements for collections of pointer on objects of any type.
This class is used to generate objects lists for graphical interfaces.
A name is associated to each element (pointer), and an identification number.
GItem::GItem | ( | const string & | s, |
void * | ptr = NULL , |
||
const int | n = 0 |
||
) |
GItem::GItem | ( | const GItem & | original | ) |
|
inlinevirtual |
Destructor.
|
inline |
Return the data identification number.
|
inlinevirtual |
Return the detailed information to the object reference if it is set, else return the item name.
Reimplemented from GNamed.
References data_info, and GNamed::GetName().
|
inline |
|
inline |
Macro from GCpp library that defines the following functions:
|
inline |
Return the selection flag.
References selected.
Affectation operator.
original | item to copy |
References data_info, G_AFFECT_MOTHER, id, selected, and user_data.
|
inline |
Comparison operator: it compares the name and the data pointer.
item | element to compare |
References GNamed::GetName(), GetUserData(), GNamed::name, and user_data.
|
inline |
|
inline |
Set the identification number.
n | new number |
|
inlinevirtual |
Associate an detailed information to the object reference.
info | information text |
References data_info.
Referenced by GTreeNodeT< T >::CreateItemList(), and GTreeLeafT< T >::CreateItemTree().
|
inline |