Qt 4.8
Classes | Public Functions | Public Variables | List of all members
QDeclarativeParser::Object Class Reference

#include <qdeclarativeparser_p.h>

Inheritance diagram for QDeclarativeParser::Object:
QDeclarativeRefCount

Classes

struct  DynamicProperty
 
struct  DynamicSignal
 
struct  DynamicSlot
 
struct  ScriptBlock
 

Public Functions

void addAttachedProperty (Property *)
 
void addGroupedProperty (Property *)
 
void addScriptStringProperty (Property *, int=0)
 
void addSignalProperty (Property *)
 
void addValueProperty (Property *)
 
void addValueTypeProperty (Property *)
 
PropertygetDefaultProperty ()
 
PropertygetProperty (const QByteArray &name, bool create=true)
 
const QMetaObjectmetaObject () const
 
 Object ()
 
void setBindingBit (int)
 
virtual ~Object ()
 
- Public Functions inherited from QDeclarativeRefCount
void addref ()
 
 QDeclarativeRefCount ()
 
void release ()
 
virtual ~QDeclarativeRefCount ()
 

Public Variables

QList< Property * > attachedProperties
 
QByteArray bindingBitmask
 
QByteArray className
 
QByteArray custom
 
PropertydefaultProperty
 
QList< DynamicPropertydynamicProperties
 
QList< DynamicSignaldynamicSignals
 
QList< DynamicSlotdynamicSlots
 
QAbstractDynamicMetaObject extObject
 
QList< Property * > groupedProperties
 
QString id
 
int idIndex
 
LocationSpan location
 
int majorVersion
 
QByteArray metadata
 
const QMetaObjectmetatype
 
int minorVersion
 
int parserStatusCast
 
QHash< QByteArray, Property * > properties
 
QList< QPair< Property *, int > > scriptStringProperties
 
QList< Property * > signalProperties
 
QDeclarativePropertyCachesynthCache
 
QByteArray synthdata
 
int type
 
QByteArray typeName
 
QUrl url
 
QList< Property * > valueProperties
 
QList< Property * > valueTypeProperties
 

Detailed Description

Definition at line 117 of file qdeclarativeparser_p.h.

Constructors and Destructors

◆ Object()

QDeclarativeParser::Object::Object ( )

Definition at line 68 of file qdeclarativeparser.cpp.

70 {
71  // initialize the members in the meta object
72  extObject.d.superdata = 0;
74  extObject.d.data = 0;
75  extObject.d.extradata = 0;
76 }
const void * extradata
Definition: qobjectdefs.h:472
const char * stringdata
Definition: qobjectdefs.h:470
QAbstractDynamicMetaObject extObject
QDeclarativePropertyCache * synthCache
const uint * data
Definition: qobjectdefs.h:471
const QMetaObject * superdata
Definition: qobjectdefs.h:469
struct QMetaObject::@38 d

◆ ~Object()

QDeclarativeParser::Object::~Object ( )
virtual

Definition at line 78 of file qdeclarativeparser.cpp.

79 {
82  foreach(Property *prop, properties)
83  prop->release();
84  foreach(Property *prop, valueProperties)
85  prop->release();
86  foreach(Property *prop, signalProperties)
87  prop->release();
88  foreach(Property *prop, attachedProperties)
89  prop->release();
90  foreach(Property *prop, groupedProperties)
91  prop->release();
92  foreach(Property *prop, valueTypeProperties)
93  prop->release();
94  typedef QPair<Property *, int> PropPair;
95  foreach(const PropPair &prop, scriptStringProperties)
96  prop.first->release();
97  foreach(const DynamicProperty &prop, dynamicProperties)
98  if (prop.defaultValue) prop.defaultValue->release();
99 }
QList< Property * > attachedProperties
T1 first
Definition: qpair.h:65
QList< Property * > valueProperties
QDeclarativePropertyCache * synthCache
QList< DynamicProperty > dynamicProperties
QList< QPair< Property *, int > > scriptStringProperties
QList< Property * > signalProperties
QList< Property * > groupedProperties
QList< Property * > valueTypeProperties
QHash< QByteArray, Property * > properties

Functions

◆ addAttachedProperty()

void QDeclarativeParser::Object::addAttachedProperty ( Property p)

Definition at line 139 of file qdeclarativeparser.cpp.

Referenced by QDeclarativeCompiler::buildAttachedProperty().

140 {
141  p->addref();
142  attachedProperties << p;
143 }
QList< Property * > attachedProperties

◆ addGroupedProperty()

void QDeclarativeParser::Object::addGroupedProperty ( Property p)

Definition at line 145 of file qdeclarativeparser.cpp.

Referenced by QDeclarativeCompiler::buildGroupedProperty().

146 {
147  p->addref();
148  groupedProperties << p;
149 }
QList< Property * > groupedProperties

◆ addScriptStringProperty()

void QDeclarativeParser::Object::addScriptStringProperty ( Property p,
int  stack = 0 
)

Definition at line 157 of file qdeclarativeparser.cpp.

Referenced by QDeclarativeCompiler::buildScriptStringProperty().

158 {
159  p->addref();
160  scriptStringProperties << qMakePair(p, stack);
161 }
QList< QPair< Property *, int > > scriptStringProperties
Q_OUTOFLINE_TEMPLATE QPair< T1, T2 > qMakePair(const T1 &x, const T2 &y)
Definition: qpair.h:102

◆ addSignalProperty()

void QDeclarativeParser::Object::addSignalProperty ( Property p)

Definition at line 133 of file qdeclarativeparser.cpp.

Referenced by QDeclarativeCompiler::buildSignal().

134 {
135  p->addref();
136  signalProperties << p;
137 }
QList< Property * > signalProperties

◆ addValueProperty()

void QDeclarativeParser::Object::addValueProperty ( Property p)

◆ addValueTypeProperty()

void QDeclarativeParser::Object::addValueTypeProperty ( Property p)

Definition at line 151 of file qdeclarativeparser.cpp.

Referenced by QDeclarativeCompiler::buildGroupedProperty().

152 {
153  p->addref();
154  valueTypeProperties << p;
155 }
QList< Property * > valueTypeProperties

◆ getDefaultProperty()

QDeclarativeParser::Property * Object::getDefaultProperty ( )

◆ getProperty()

Property * QDeclarativeParser::Object::getProperty ( const QByteArray name,
bool  create = true 
)

Definition at line 164 of file qdeclarativeparser.cpp.

Referenced by QDeclarativeCompiler::buildObject(), and QDeclarativeCompiler::mergeDynamicMetaProperties().

165 {
166  if (!properties.contains(name)) {
167  if (create) {
168  Property *property = new Property(name);
169  property->parent = this;
170  properties.insert(name, property);
171  } else {
172  return 0;
173  }
174  }
175  return properties[name];
176 }
static Expression::Ptr create(Expression *const expr, const YYLTYPE &sourceLocator, const ParserContext *const parseInfo)
const char * name
const char * property
Definition: qwizard.cpp:138
QHash< QByteArray, Property * > properties

◆ metaObject()

const QMetaObject * Object::metaObject ( ) const

◆ setBindingBit()

void Object::setBindingBit ( int  b)

Definition at line 101 of file qdeclarativeparser.cpp.

Referenced by QDeclarativeCompiler::buildProperty().

102 {
103  while (bindingBitmask.size() < 4 * (1 + b / 32))
104  bindingBitmask.append(char(0));
105 
106  quint32 *bits = (quint32 *)bindingBitmask.data();
107  bits[b / 32] |= (1 << (b % 32));
108 }
char * data()
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:429
QByteArray & append(char c)
Appends the character ch to this byte array.
unsigned int quint32
Definition: qglobal.h:938
int size() const
Returns the number of bytes in this byte array.
Definition: qbytearray.h:402

Properties

◆ attachedProperties

QList<Property *> QDeclarativeParser::Object::attachedProperties

◆ bindingBitmask

QByteArray QDeclarativeParser::Object::bindingBitmask

Definition at line 145 of file qdeclarativeparser_p.h.

Referenced by QDeclarativeCompiler::genObject(), and setBindingBit().

◆ className

QByteArray QDeclarativeParser::Object::className

◆ custom

QByteArray QDeclarativeParser::Object::custom

◆ defaultProperty

Property* QDeclarativeParser::Object::defaultProperty

◆ dynamicProperties

QList<DynamicProperty> QDeclarativeParser::Object::dynamicProperties

◆ dynamicSignals

QList<DynamicSignal> QDeclarativeParser::Object::dynamicSignals

◆ dynamicSlots

QList<DynamicSlot> QDeclarativeParser::Object::dynamicSlots

◆ extObject

QAbstractDynamicMetaObject QDeclarativeParser::Object::extObject

Definition at line 155 of file qdeclarativeparser_p.h.

Referenced by metaObject(), and Object().

◆ groupedProperties

QList<Property *> QDeclarativeParser::Object::groupedProperties

◆ id

QString QDeclarativeParser::Object::id

◆ idIndex

int QDeclarativeParser::Object::idIndex

◆ location

LocationSpan QDeclarativeParser::Object::location

◆ majorVersion

int QDeclarativeParser::Object::majorVersion

◆ metadata

QByteArray QDeclarativeParser::Object::metadata

◆ metatype

const QMetaObject* QDeclarativeParser::Object::metatype

◆ minorVersion

int QDeclarativeParser::Object::minorVersion

◆ parserStatusCast

int QDeclarativeParser::Object::parserStatusCast

◆ properties

QHash<QByteArray, Property *> QDeclarativeParser::Object::properties

◆ scriptStringProperties

QList<QPair<Property *, int> > QDeclarativeParser::Object::scriptStringProperties

◆ signalProperties

QList<Property *> QDeclarativeParser::Object::signalProperties

◆ synthCache

QDeclarativePropertyCache* QDeclarativeParser::Object::synthCache

◆ synthdata

QByteArray QDeclarativeParser::Object::synthdata

◆ type

int QDeclarativeParser::Object::type

◆ typeName

QByteArray QDeclarativeParser::Object::typeName

◆ url

QUrl QDeclarativeParser::Object::url

◆ valueProperties

QList<Property *> QDeclarativeParser::Object::valueProperties

◆ valueTypeProperties

QList<Property *> QDeclarativeParser::Object::valueTypeProperties

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