Qt 4.8
Public Functions | Public Variables | List of all members
QDeclarativeGuardImpl Class Reference

#include <qdeclarativeguard_p.h>

Inheritance diagram for QDeclarativeGuardImpl:
QDeclarativeGuard< T > QDeclarativeGuard< QAbstractItemModel > QDeclarativeGuard< QDeclarativeAbstractAnimation > QDeclarativeGuard< QDeclarativeContext > QDeclarativeGuard< QDeclarativeExpression > QDeclarativeGuard< QDeclarativeGridView > QDeclarativeGuard< QDeclarativeItem > QDeclarativeGuard< QDeclarativeListView > QDeclarativeGuard< QDeclarativeStateOperation > QDeclarativeGuard< QDeclarativeTransition > QDeclarativeGuard< QDeclarativeVisualDataModel > QDeclarativeGuard< QDeclarativeVisualModel > QDeclarativeGuard< QGraphicsObject > QDeclarativeGuard< QGraphicsWidget > QDeclarativeGuard< QListModelInterface > QDeclarativeGuard< QNetworkReply > QDeclarativeGuard< QObject >

Public Functions

void addGuard ()
 
 QDeclarativeGuardImpl ()
 
 QDeclarativeGuardImpl (QObject *)
 
 QDeclarativeGuardImpl (const QDeclarativeGuardImpl &)
 
void remGuard ()
 
 ~QDeclarativeGuardImpl ()
 

Public Variables

QDeclarativeGuardImplnext
 
QObjecto
 
QDeclarativeGuardImpl ** prev
 

Detailed Description

Definition at line 62 of file qdeclarativeguard_p.h.

Constructors and Destructors

◆ QDeclarativeGuardImpl() [1/3]

QDeclarativeGuardImpl::QDeclarativeGuardImpl ( )
inline

Definition at line 111 of file qdeclarativeguard_p.h.

112 : o(0), next(0), prev(0)
113 {
114 }
QDeclarativeGuardImpl ** prev
QDeclarativeGuardImpl * next

◆ QDeclarativeGuardImpl() [2/3]

QDeclarativeGuardImpl::QDeclarativeGuardImpl ( QObject g)
inline

Definition at line 116 of file qdeclarativeguard_p.h.

117 : o(g), next(0), prev(0)
118 {
119  if (o) addGuard();
120 }
QDeclarativeGuardImpl ** prev
QDeclarativeGuardImpl * next

◆ QDeclarativeGuardImpl() [3/3]

QDeclarativeGuardImpl::QDeclarativeGuardImpl ( const QDeclarativeGuardImpl g)
inline

Definition at line 122 of file qdeclarativeguard_p.h.

123 : o(g.o), next(0), prev(0)
124 {
125  if (o) addGuard();
126 }
QDeclarativeGuardImpl ** prev
QDeclarativeGuardImpl * next

◆ ~QDeclarativeGuardImpl()

QDeclarativeGuardImpl::~QDeclarativeGuardImpl ( )
inline

Definition at line 128 of file qdeclarativeguard_p.h.

129 {
130  if (prev) remGuard();
131  o = 0;
132 }
QDeclarativeGuardImpl ** prev

Functions

◆ addGuard()

void QDeclarativeGuardImpl::addGuard ( )
inline

Definition at line 134 of file qdeclarativeguard_p.h.

Referenced by QDeclarativeGuardImpl(), and QDeclarativeGuard< QDeclarativeTransition >::setObject().

135 {
136  Q_ASSERT(!prev);
137 
138  if (QObjectPrivate::get(o)->wasDeleted)
139  return;
140 
142  next = data->guards;
143  if (next) next->prev = &next;
144  data->guards = this;
145  prev = &data->guards;
146 }
static QDeclarativeData * get(const QObject *object, bool create=false)
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
static QObjectPrivate * get(QObject *o)
Definition: qobject_p.h:177
QDeclarativeGuardImpl ** prev
static const char * data(const QByteArray &arr)
QDeclarativeGuardImpl * next
QDeclarativeGuardImpl * guards

◆ remGuard()

void QDeclarativeGuardImpl::remGuard ( )
inline

Definition at line 148 of file qdeclarativeguard_p.h.

Referenced by QDeclarativeGuard< QDeclarativeTransition >::setObject(), and ~QDeclarativeGuardImpl().

149 {
150  Q_ASSERT(prev);
151 
152  if (next) next->prev = prev;
153  *prev = next;
154  next = 0;
155  prev = 0;
156 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QDeclarativeGuardImpl ** prev
QDeclarativeGuardImpl * next

Properties

◆ next

QDeclarativeGuardImpl* QDeclarativeGuardImpl::next

Definition at line 71 of file qdeclarativeguard_p.h.

Referenced by addGuard(), and remGuard().

◆ o

QObject* QDeclarativeGuardImpl::o

◆ prev

QDeclarativeGuardImpl** QDeclarativeGuardImpl::prev

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