GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Private Attributes | List of all members
GLC_Attributes Class Reference

GLC_Attributes : User attributes of instance and reference. More...

#include <glc_attributes.h>

Public Member Functions

Constructor / Destructor
 GLC_Attributes ()
 Default Constructor.
 
 GLC_Attributes (const GLC_Attributes &)
 Copy Constructor.
 
GLC_Attributesoperator= (const GLC_Attributes &)
 Overload "=" operator.
 
virtual ~GLC_Attributes ()
 Destructor.
 
Get Functions
bool isEmpty () const
 Return true if attributes is empty.
 
int size () const
 Return the size of attributes.
 
bool contains (const QString &name) const
 Return true if the specified attribute exist.
 
QList< QString > names () const
 Return the list of attribute name.
 
QString value (const QString &name) const
 Return the value of the specified attributes.
 
QString name (int at) const
 Return the name of the specified attributes index.
 
Set Functions
void insert (const QString &name, const QString &value)
 Insert an attribute (if the attribute exists, it's updated)
 
void remove (const QString &name)
 Remove an attribute.
 
void clear ()
 Clear the content of this attribute.
 
Operator Overload
bool operator== (const GLC_Attributes &attr) const
 Equal operator overload.
 

Private Attributes

QHash< QString, QString > m_AttributesHash
 Attributes Hash table.
 
QList< QString > m_AttributesList
 the list of attribute name
 

Detailed Description

GLC_Attributes : User attributes of instance and reference.

Definition at line 37 of file glc_attributes.h.

Constructor & Destructor Documentation

GLC_Attributes::GLC_Attributes ( )

Default Constructor.

Definition at line 27 of file glc_attributes.cpp.

GLC_Attributes::GLC_Attributes ( const GLC_Attributes attr)

Copy Constructor.

Definition at line 35 of file glc_attributes.cpp.

GLC_Attributes::~GLC_Attributes ( )
virtual

Destructor.

Definition at line 54 of file glc_attributes.cpp.

Member Function Documentation

void GLC_Attributes::clear ( void  )
inline

Clear the content of this attribute.

Definition at line 113 of file glc_attributes.h.

bool GLC_Attributes::contains ( const QString &  name) const
inline

Return true if the specified attribute exist.

Definition at line 73 of file glc_attributes.h.

void GLC_Attributes::insert ( const QString &  name,
const QString &  value 
)
inline

Insert an attribute (if the attribute exists, it's updated)

Definition at line 98 of file glc_attributes.h.

Referenced by GLC_3dxmlToWorld::loadInstance3D(), and GLC_3dxmlToWorld::loadReference3D().

bool GLC_Attributes::isEmpty ( void  ) const
inline

Return true if attributes is empty.

Definition at line 65 of file glc_attributes.h.

Referenced by GLC_3dxmlToWorld::loadInstance3D(), and GLC_3dxmlToWorld::loadReference3D().

QString GLC_Attributes::name ( int  at) const
inline

Return the name of the specified attributes index.

Return empty String if attribute doesn't exist

Definition at line 87 of file glc_attributes.h.

QList<QString> GLC_Attributes::names ( ) const
inline

Return the list of attribute name.

Definition at line 77 of file glc_attributes.h.

Referenced by GLC_WorldTo3dxml::writeExtensionAttributes().

GLC_Attributes & GLC_Attributes::operator= ( const GLC_Attributes attr)

Overload "=" operator.

Definition at line 43 of file glc_attributes.cpp.

References m_AttributesHash, and m_AttributesList.

bool GLC_Attributes::operator== ( const GLC_Attributes attr) const
inline

Equal operator overload.

Definition at line 128 of file glc_attributes.h.

References m_AttributesHash.

void GLC_Attributes::remove ( const QString &  name)
inline

Remove an attribute.

Definition at line 105 of file glc_attributes.h.

int GLC_Attributes::size ( void  ) const
inline

Return the size of attributes.

Definition at line 69 of file glc_attributes.h.

QString GLC_Attributes::value ( const QString &  name) const
inline

Return the value of the specified attributes.

Return NULL String if attribute doesn't exist

Definition at line 82 of file glc_attributes.h.

Referenced by GLC_WorldTo3dxml::writeExtensionAttributes().

Member Data Documentation

QHash<QString, QString> GLC_Attributes::m_AttributesHash
private

Attributes Hash table.

Definition at line 137 of file glc_attributes.h.

Referenced by operator=(), and operator==().

QList<QString> GLC_Attributes::m_AttributesList
private

the list of attribute name

Definition at line 140 of file glc_attributes.h.

Referenced by operator=().


The documentation for this class was generated from the following files:

©2005-2013 Laurent Ribon