QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RPropertyTypeId Class Reference

Represents unique property type IDs. More...

#include <RPropertyTypeId.h>

List of all members.

Public Member Functions

void generateId (const std::type_info &classInfo, const QString &groupTitle, const QString &title, bool forceNew=false)
void generateId (const std::type_info &classInfo, const RPropertyTypeId &other)
QString getCustomPropertyName () const
long int getId () const
QString getPropertyGroupTitle () const
QString getPropertyTitle () const
bool isCustom () const
bool isValid () const
bool operator!= (const RPropertyTypeId &other) const
 != operator
bool operator< (const RPropertyTypeId &other) const
 < operator
bool operator== (const RPropertyTypeId &other) const
 == operator
 RPropertyTypeId (const QString &customPropertyName)
 Creates a new unique property type id.
 RPropertyTypeId (const RPropertyTypeId &other)
 RPropertyTypeId (long int id=INVALID_ID)

Static Public Member Functions

static RPropertyTypeId getPropertyTypeId (const QString &groupTitle, const QString &title)
static QSet< RPropertyTypeIdgetPropertyTypeIds (const std::type_info &classInfo)
 Gets all property type IDs that where registered for the given class.
static bool hasPropertyType (const std::type_info &classInfo, RPropertyTypeId propertyTypeId)

Static Public Attributes

static const long int INVALID_ID = -1

Private Attributes

QString customPropertyName
long int id

Static Private Attributes

static long int counter = 0
static QMap< QString, QSet
< RPropertyTypeId > > 
propertyTypeByObjectMap
static QMap< long int, QPair
< QString, QString > > 
titleMap

Detailed Description

Represents unique property type IDs.

Every property type an object can have has such an unique ID.

E.g. all objects of type car may have a property type called brand. This property type is uniquely identified by an instance of this class. All instances of this class are automatically unique.

class Car {
public:
static RPropertyTypeId propertyBrand;
}
RPropertyTypeId Car::propertyBrand(typeid(Car));
Scriptable:
This class is wrapped for script environments.
Copyable:
Script wrappers of this class should pass objects by reference.

Constructor & Destructor Documentation

RPropertyTypeId::RPropertyTypeId ( const QString &  customPropertyName)

Creates a new unique property type id.

\ nonscriptable

Property type IDs are unique across class boundaries (for application scope). The IDs are dynamically generated and only guaranteed to remain the same during one application session. These IDs should never appears in a file format.

Parameters:
classInfoclass info object for the class to which this property belongs, e.g. typeid(ClassName) or typeid(objectName). This is used to remember to which class a property belongs.
RPropertyTypeId::RPropertyTypeId ( const RPropertyTypeId other)
RPropertyTypeId::RPropertyTypeId ( long int  id = INVALID_ID)

Member Function Documentation

void RPropertyTypeId::generateId ( const std::type_info &  classInfo,
const QString &  groupTitle,
const QString &  title,
bool  forceNew = false 
)
   \par Non-Scriptable:

This function is not available in script environments.

void RPropertyTypeId::generateId ( const std::type_info &  classInfo,
const RPropertyTypeId other 
)
   \par Non-Scriptable:

This function is not available in script environments.

QString RPropertyTypeId::getCustomPropertyName ( ) const
Returns:
The name (key) of the custom property.
long int RPropertyTypeId::getId ( ) const
Returns:
The internal ID of this property.
QString RPropertyTypeId::getPropertyGroupTitle ( ) const
Returns:
The property group title of the given property.
QString RPropertyTypeId::getPropertyTitle ( ) const
Returns:
The property title of the given property.
RPropertyTypeId RPropertyTypeId::getPropertyTypeId ( const QString &  groupTitle,
const QString &  title 
)
static
QSet< RPropertyTypeId > RPropertyTypeId::getPropertyTypeIds ( const std::type_info &  classInfo)
static

Gets all property type IDs that where registered for the given class.

   \par Non-Scriptable:

This function is not available in script environments.

Parameters:
classInfoThe class info, e.g. typeid(ObjectA)
Returns:
a set of property type ID pointers or an empty set if the class has no registered property types.
bool RPropertyTypeId::hasPropertyType ( const std::type_info &  classInfo,
RPropertyTypeId  propertyTypeId 
)
static
   \par Non-Scriptable:

This function is not available in script environments.

Return values:
true,:if the given class has the given property
bool RPropertyTypeId::isCustom ( ) const
bool RPropertyTypeId::isValid ( ) const
bool RPropertyTypeId::operator!= ( const RPropertyTypeId other) const

!= operator

bool RPropertyTypeId::operator< ( const RPropertyTypeId other) const

< operator

bool RPropertyTypeId::operator== ( const RPropertyTypeId other) const

== operator


Member Data Documentation

long int RPropertyTypeId::counter = 0
staticprivate
QString RPropertyTypeId::customPropertyName
private
long int RPropertyTypeId::id
private
const long int RPropertyTypeId::INVALID_ID = -1
static
QMap< QString, QSet< RPropertyTypeId > > RPropertyTypeId::propertyTypeByObjectMap
staticprivate
QMap< long int, QPair< QString, QString > > RPropertyTypeId::titleMap
staticprivate

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