Skip to content

Commit

Permalink
Revert "Refactor: DENG2_PRIVATE requires the use of DENG2_PIMPL"
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Mar 6, 2013
1 parent aa4c9e8 commit cdac8d8
Show file tree
Hide file tree
Showing 155 changed files with 540 additions and 50 deletions.
2 changes: 2 additions & 0 deletions doomsday/client/include/clientapp.h
Expand Up @@ -30,6 +30,8 @@ class ClientApp : public de::GuiApp
public:
ClientApp(int &argc, char **argv);

~ClientApp();

/**
* Sets up all the subsystems of the application. Must be called before the
* event loop is started.
Expand Down
1 change: 1 addition & 0 deletions doomsday/client/include/filesys/manifest.h
Expand Up @@ -42,6 +42,7 @@ class ResourceManifest
* @param name An expected name for the associated file.
*/
ResourceManifest(resourceclassid_t rClass, int fFlags, String *name = 0);
~ResourceManifest();

/// @return Class of the associated resource.
resourceclassid_t resourceClass() const;
Expand Down
1 change: 1 addition & 0 deletions doomsday/client/include/network/serverlink.h
Expand Up @@ -39,6 +39,7 @@ class ServerLink : public de::shell::AbstractLink

public:
ServerLink();
~ServerLink();

void clear();

Expand Down
1 change: 1 addition & 0 deletions doomsday/client/include/resource/compositetexture.h
Expand Up @@ -103,6 +103,7 @@ class CompositeTexture
*/
explicit CompositeTexture(String percentEncodedName = "", int logicalWidth = 0,
int logicalHeight = 0, Flags _flags = 0);
~CompositeTexture();

/**
* Construct a composite texture by deserializing an archived id-tech 1
Expand Down
2 changes: 2 additions & 0 deletions doomsday/client/include/resource/material.h
Expand Up @@ -439,6 +439,7 @@ class Material : public de::MapElement
{
private:
Animation(Material &material, MaterialContextId context);
~Animation();

public:
/// Current state of a layer animation.
Expand Down Expand Up @@ -549,6 +550,7 @@ class Material : public de::MapElement
* @param spec Specification used to derive the variant.
*/
Variant(Material &generalCase, VariantSpec const &spec);
~Variant();

public:
/**
Expand Down
2 changes: 2 additions & 0 deletions doomsday/client/include/resource/materialarchive.h
Expand Up @@ -51,6 +51,8 @@ class MaterialArchive
*/
MaterialArchive(int useSegments, bool recordSymbolicMaterials = true);

~MaterialArchive();

/**
* Returns the number of materials in the archive.
*/
Expand Down
1 change: 1 addition & 0 deletions doomsday/client/include/resource/materials.h
Expand Up @@ -95,6 +95,7 @@ class Materials : DENG2_OBSERVES(MaterialScheme, ManifestDefined),
* Construct a new material collection.
*/
Materials();
virtual ~Materials();

/**
* Register the console commands, variables, etc..., of this module.
Expand Down
1 change: 1 addition & 0 deletions doomsday/client/include/resource/materialscheme.h
Expand Up @@ -62,6 +62,7 @@ class MaterialScheme
* have at least @ref min_name_length characters.
*/
explicit MaterialScheme(String symbolicName);
~MaterialScheme();

/// @return Symbolic name of this scheme (e.g., "Flats").
String const &name() const;
Expand Down
2 changes: 2 additions & 0 deletions doomsday/client/include/resource/materialsnapshot.h
Expand Up @@ -77,6 +77,8 @@ class MaterialSnapshot
*/
MaterialSnapshot(MaterialVariant &materialVariant);

~MaterialSnapshot();

/**
* Returns the material variant for the snapshot.
*/
Expand Down
1 change: 1 addition & 0 deletions doomsday/client/include/resource/texture.h
Expand Up @@ -128,6 +128,7 @@ class Texture
* Ownership is NOT given to the Variant.
*/
Variant(Texture &generalCase, texturevariantspecification_t const &spec);
~Variant();

public:
/**
Expand Down
2 changes: 2 additions & 0 deletions doomsday/client/include/resource/textures.h
Expand Up @@ -75,6 +75,8 @@ class Textures : DENG2_OBSERVES(TextureScheme, ManifestDefined),
*/
Textures();

virtual ~Textures();

/// Register the console commands, variables, etc..., of this module.
static void consoleRegister();

Expand Down
1 change: 1 addition & 0 deletions doomsday/client/include/ui/busywidget.h
Expand Up @@ -28,6 +28,7 @@ class BusyWidget : public GuiWidget
{
public:
BusyWidget(de::String const &name = "");
~BusyWidget();

void update();
void draw();
Expand Down
1 change: 1 addition & 0 deletions doomsday/client/include/ui/canvas.h
Expand Up @@ -56,6 +56,7 @@ class Canvas : public QGLWidget

public:
explicit Canvas(CanvasWindow *parent, QGLWidget* shared = 0);
~Canvas();

/**
* Sets a callback function that will be called when the canvas is ready
Expand Down
1 change: 1 addition & 0 deletions doomsday/client/include/ui/canvaswindow.h
Expand Up @@ -48,6 +48,7 @@ class CanvasWindow : public QMainWindow

public:
explicit CanvasWindow(QWidget *parent = 0);
~CanvasWindow();

de::RootWidget &root();

Expand Down
1 change: 1 addition & 0 deletions doomsday/client/include/ui/guiwidget.h
Expand Up @@ -30,6 +30,7 @@ class GuiWidget : public de::Widget
{
public:
GuiWidget(de::String const &name = "");
~GuiWidget();

/**
* Returns the rule rectangle that defines the placement of the widget on
Expand Down
1 change: 1 addition & 0 deletions doomsday/client/include/ui/legacywidget.h
Expand Up @@ -30,6 +30,7 @@ class LegacyWidget : public GuiWidget
{
public:
LegacyWidget(de::String const &name = "");
~LegacyWidget();

void viewResized();
void update();
Expand Down
2 changes: 2 additions & 0 deletions doomsday/client/include/ui/windowsystem.h
Expand Up @@ -34,6 +34,8 @@ class WindowSystem : public de::System
public:
WindowSystem();

~WindowSystem();

bool processEvent(de::Event const &);

void timeChanged(de::Clock const &);
Expand Down
1 change: 1 addition & 0 deletions doomsday/client/include/updater.h
Expand Up @@ -45,6 +45,7 @@ class Updater : public QObject

public:
explicit Updater(QObject* parent = 0);
~Updater();

void setBackToFullscreen(bool yes);

Expand Down
2 changes: 2 additions & 0 deletions doomsday/client/include/uri.hh
Expand Up @@ -134,6 +134,8 @@ public:
*/
Uri(Uri const &other);

~Uri();

inline Uri &operator = (Uri other) {
std::swap(d, other.d);
return *this;
Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/clientapp.cpp
Expand Up @@ -130,6 +130,11 @@ ClientApp::ClientApp(int &argc, char **argv)
addSystem(d->winSys);
}

ClientApp::~ClientApp()
{
delete d;
}

void ClientApp::initialize()
{
d->legacyCore = LegacyCore_New();
Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/filesys/manifest.cpp
Expand Up @@ -68,6 +68,11 @@ ResourceManifest::ResourceManifest(resourceclassid_t fClass, int fFlags, String
if(name) addName(*name);
}

ResourceManifest::~ResourceManifest()
{
delete d;
}

ResourceManifest &ResourceManifest::addName(String newName, bool *didAdd)
{
// Is this name unique? We don't want duplicates.
Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/network/serverlink.cpp
Expand Up @@ -189,6 +189,11 @@ ServerLink::ServerLink() : d(new Instance(this))
connect(this, SIGNAL(disconnected()), this, SLOT(linkDisconnected()));
}

ServerLink::~ServerLink()
{
delete d;
}

void ServerLink::clear()
{
d->finder.clear();
Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/resource/compositetexture.cpp
Expand Up @@ -83,6 +83,11 @@ CompositeTexture::CompositeTexture(String percentEncodedName,
: d(new Instance(this, percentEncodedName, width, height, flags))
{}

CompositeTexture::~CompositeTexture()
{
delete d;
}

String CompositeTexture::percentEncodedName() const
{
return d->name;
Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/resource/materialanimation.cpp
Expand Up @@ -130,6 +130,11 @@ Material::Animation::Animation(Material &material, MaterialContextId context)
restart();
}

Material::Animation::~Animation()
{
delete d;
}

MaterialContextId Material::Animation::context() const
{
return d->context;
Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/resource/materialarchive.cpp
Expand Up @@ -209,6 +209,11 @@ MaterialArchive::MaterialArchive(int useSegments, bool recordSymbolicMaterials)
}
}

MaterialArchive::~MaterialArchive()
{
delete d;
}

struct findUniqueSerialIdWorker_params {
Records *records;
Material *material;
Expand Down
2 changes: 2 additions & 0 deletions doomsday/client/src/resource/materialmanifest.cpp
Expand Up @@ -48,6 +48,8 @@ MaterialManifest::MaterialManifest(PathTree::NodeArgs const &args)
MaterialManifest::~MaterialManifest()
{
DENG2_FOR_AUDIENCE(Deletion, i) i->manifestBeingDeleted(*this);

delete d;
}

Materials &MaterialManifest::materials()
Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/resource/materials.cpp
Expand Up @@ -214,6 +214,11 @@ void Materials::consoleRegister()
Materials::Materials() : d(new Instance(this))
{}

Materials::~Materials()
{
delete d;
}

MaterialScheme &Materials::scheme(String name) const
{
LOG_AS("Materials::scheme");
Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/resource/materialscheme.cpp
Expand Up @@ -46,6 +46,11 @@ MaterialScheme::MaterialScheme(String symbolicName)
: d(new Instance(this, symbolicName))
{}

MaterialScheme::~MaterialScheme()
{
delete d;
}

void MaterialScheme::clear()
{
d->index.clear();
Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/resource/materialsnapshot.cpp
Expand Up @@ -120,6 +120,11 @@ MaterialSnapshot::MaterialSnapshot(MaterialVariant &materialVariant)
: d(new Instance(this, materialVariant))
{}

MaterialSnapshot::~MaterialSnapshot()
{
delete d;
}

MaterialVariant &MaterialSnapshot::materialVariant() const
{
return *d->variant;
Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/resource/materialvariant.cpp
Expand Up @@ -71,6 +71,11 @@ Material::Variant::Variant(Material &generalCase, MaterialVariantSpec const &spe
: d(new Instance(this, generalCase, spec))
{}

Material::Variant::~Variant()
{
delete d;
}

Material &Material::Variant::generalCase() const
{
return *d->material;
Expand Down
1 change: 1 addition & 0 deletions doomsday/client/src/resource/texturemanifest.cpp
Expand Up @@ -55,6 +55,7 @@ TextureManifest::TextureManifest(PathTree::NodeArgs const &args)
TextureManifest::~TextureManifest()
{
DENG2_FOR_AUDIENCE(Deletion, i) i->manifestBeingDeleted(*this);
delete d;
}

Textures &TextureManifest::textures()
Expand Down
7 changes: 6 additions & 1 deletion doomsday/client/src/resource/textures.cpp
Expand Up @@ -80,7 +80,12 @@ void Textures::consoleRegister()
Textures::Textures() : d(new Instance(this))
{}

TextureScheme &Textures::scheme(String name) const
Textures::~Textures()
{
delete d;
}

Textures::Scheme &Textures::scheme(String name) const
{
LOG_AS("Textures::scheme");
if(!name.isEmpty())
Expand Down
1 change: 1 addition & 0 deletions doomsday/client/src/resource/texturescheme.cpp
Expand Up @@ -156,6 +156,7 @@ TextureScheme::TextureScheme(String symbolicName) : d(new Instance(this, symboli
TextureScheme::~TextureScheme()
{
clear();
delete d;
}

void TextureScheme::clear()
Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/resource/texturevariant.cpp
Expand Up @@ -108,6 +108,11 @@ Texture::Variant::Variant(Texture &generalCase, texturevariantspecification_t co
: d(new Instance(this, generalCase, spec))
{}

Texture::Variant::~Variant()
{
delete d;
}

Texture &Texture::Variant::generalCase() const
{
return d->texture;
Expand Down
8 changes: 7 additions & 1 deletion doomsday/client/src/ui/busywidget.cpp
Expand Up @@ -30,7 +30,13 @@ DENG2_PIMPL(BusyWidget)

BusyWidget::BusyWidget(String const &name)
: GuiWidget(name), d(new Instance(this))
{}
{
}

BusyWidget::~BusyWidget()
{
delete d;
}

void BusyWidget::update()
{
Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/ui/canvas.cpp
Expand Up @@ -181,6 +181,11 @@ Canvas::Canvas(CanvasWindow* parent, QGLWidget* shared)
#endif
}

Canvas::~Canvas()
{
delete d;
}

void Canvas::setInitFunc(void (*canvasInitializeFunc)(Canvas&))
{
d->initCallback = canvasInitializeFunc;
Expand Down
9 changes: 8 additions & 1 deletion doomsday/client/src/ui/canvaswindow.cpp
Expand Up @@ -124,15 +124,22 @@ DENG2_PIMPL(CanvasWindow)
};

CanvasWindow::CanvasWindow(QWidget *parent)
: QMainWindow(parent), d(new Instance(this))
: QMainWindow(parent)
{
d = new Instance(this);

// Create the drawing canvas for this window.
setCentralWidget(d->canvas = new Canvas(this)); // window takes ownership

// All input goes to the canvas.
d->canvas->setFocus();
}

CanvasWindow::~CanvasWindow()
{
delete d;
}

de::RootWidget &CanvasWindow::root()
{
return d->mode == Busy? d->busyRoot : d->root;
Expand Down
5 changes: 5 additions & 0 deletions doomsday/client/src/ui/guiwidget.cpp
Expand Up @@ -32,6 +32,11 @@ DENG2_PIMPL(GuiWidget)
GuiWidget::GuiWidget(String const &name) : Widget(name), d(new Instance(this))
{}

GuiWidget::~GuiWidget()
{
delete d;
}

RuleRectangle &GuiWidget::rule()
{
return d->rule;
Expand Down

0 comments on commit cdac8d8

Please sign in to comment.