summaryrefslogtreecommitdiffstats
path: root/src/modeling/qmodelingobject.cpp
blob: 2ead4b37a802f71f8085d46e189c9121eb369307 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "qmodelingobject.h"
#include "qmodelingobject_p.h"

QModelingObjectPrivate::~QModelingObjectPrivate()
{
}

QModelingObject::QModelingObject(bool create_d_ptr) :
    d_ptr(0)
{
    if (create_d_ptr)
        set_d_ptr(new QModelingObjectPrivate);
}

QModelingObject::~QModelingObject()
{
    delete d_ptr;
}

void QModelingObject::set_d_ptr(QModelingObjectPrivate *d_ptr)
{
    Q_ASSERT_X(!this->d_ptr, "QModelingObject::set_d_ptr", "d_ptr already set !");
    this->d_ptr = d_ptr;
    d_ptr->q_ptr = this;
}