[Orxonox-commit 4920] r9589 - in code/branches/core6/src: libraries/core libraries/core/command libraries/core/input libraries/network libraries/tools/interfaces modules/weapons/projectiles orxonox/chat orxonox/graphics orxonox/overlays orxonox/worldentities orxonox/worldentities/pawns
landauf at orxonox.net
landauf at orxonox.net
Tue Mar 26 23:43:44 CET 2013
Author: landauf
Date: 2013-03-26 23:43:43 +0100 (Tue, 26 Mar 2013)
New Revision: 9589
Modified:
code/branches/core6/src/libraries/core/Core.h
code/branches/core6/src/libraries/core/ViewportEventListener.h
code/branches/core6/src/libraries/core/WindowEventListener.h
code/branches/core6/src/libraries/core/XMLNameListener.h
code/branches/core6/src/libraries/core/command/IOConsolePOSIX.cc
code/branches/core6/src/libraries/core/command/IOConsoleWindows.cc
code/branches/core6/src/libraries/core/input/InputManager.cc
code/branches/core6/src/libraries/core/input/JoyStickQuantityListener.h
code/branches/core6/src/libraries/network/ClientConnectionListener.h
code/branches/core6/src/libraries/network/NetworkChatListener.h
code/branches/core6/src/libraries/network/NetworkFunction.cc
code/branches/core6/src/libraries/network/NetworkFunction.h
code/branches/core6/src/libraries/tools/interfaces/TimeFactorListener.h
code/branches/core6/src/modules/weapons/projectiles/ParticleProjectile.cc
code/branches/core6/src/orxonox/chat/ChatListener.h
code/branches/core6/src/orxonox/graphics/ParticleEmitter.cc
code/branches/core6/src/orxonox/overlays/InGameConsole.cc
code/branches/core6/src/orxonox/worldentities/BigExplosion.cc
code/branches/core6/src/orxonox/worldentities/ExplosionChunk.cc
code/branches/core6/src/orxonox/worldentities/pawns/SpaceShip.cc
Log:
interfaces which are part of the framework and only rely on the object list for calling all instances may inherit from Listable
Modified: code/branches/core6/src/libraries/core/Core.h
===================================================================
--- code/branches/core6/src/libraries/core/Core.h 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/libraries/core/Core.h 2013-03-26 22:43:43 UTC (rev 9589)
@@ -46,12 +46,12 @@
#include <string>
#include "util/DestructionHelper.h"
#include "util/Singleton.h"
-#include "class/OrxonoxClass.h"
+#include "config/Configurable.h"
namespace orxonox
{
//! Informs about changes in the Development Mode.
- class DevModeListener : virtual public OrxonoxClass
+ class DevModeListener : virtual public Listable
{
public:
DevModeListener();
Modified: code/branches/core6/src/libraries/core/ViewportEventListener.h
===================================================================
--- code/branches/core6/src/libraries/core/ViewportEventListener.h 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/libraries/core/ViewportEventListener.h 2013-03-26 22:43:43 UTC (rev 9589)
@@ -32,11 +32,11 @@
#include "CorePrereqs.h"
#include "util/OgreForwardRefs.h"
-#include "class/OrxonoxClass.h"
+#include "object/Listable.h"
namespace orxonox
{
- class _CoreExport ViewportEventListener : virtual public OrxonoxClass
+ class _CoreExport ViewportEventListener : virtual public Listable
{
public:
virtual void cameraChanged(Ogre::Viewport* viewport, Ogre::Camera* oldCamera) {}
Modified: code/branches/core6/src/libraries/core/WindowEventListener.h
===================================================================
--- code/branches/core6/src/libraries/core/WindowEventListener.h 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/libraries/core/WindowEventListener.h 2013-03-26 22:43:43 UTC (rev 9589)
@@ -35,12 +35,12 @@
#define _WindowEventListener_H__
#include "CorePrereqs.h"
-#include "class/OrxonoxClass.h"
+#include "object/Listable.h"
namespace orxonox
{
//! Interface for receiving window events like resize, moved and focusChanged
- class _CoreExport WindowEventListener : virtual public OrxonoxClass
+ class _CoreExport WindowEventListener : virtual public Listable
{
friend class OgreWindowEventListener;
Modified: code/branches/core6/src/libraries/core/XMLNameListener.h
===================================================================
--- code/branches/core6/src/libraries/core/XMLNameListener.h 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/libraries/core/XMLNameListener.h 2013-03-26 22:43:43 UTC (rev 9589)
@@ -35,11 +35,11 @@
#define _XMLNameListener_H__
#include "CorePrereqs.h"
-#include "class/OrxonoxClass.h"
+#include "object/Listable.h"
namespace orxonox
{
- class _CoreExport XMLNameListener : virtual public OrxonoxClass
+ class _CoreExport XMLNameListener : virtual public Listable
{
public:
XMLNameListener();
Modified: code/branches/core6/src/libraries/core/command/IOConsolePOSIX.cc
===================================================================
--- code/branches/core6/src/libraries/core/command/IOConsolePOSIX.cc 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/libraries/core/command/IOConsolePOSIX.cc 2013-03-26 22:43:43 UTC (rev 9589)
@@ -98,7 +98,7 @@
this->cout_ << "\033[" << this->statusLineWidths_.size() << 'T';
resetTerminalMode();
- this->shell_->destroy();
+ delete this->shell_;
// Restore this->cout_ redirection
std::cout.rdbuf(this->cout_.rdbuf());
Modified: code/branches/core6/src/libraries/core/command/IOConsoleWindows.cc
===================================================================
--- code/branches/core6/src/libraries/core/command/IOConsoleWindows.cc 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/libraries/core/command/IOConsoleWindows.cc 2013-03-26 22:43:43 UTC (rev 9589)
@@ -112,7 +112,7 @@
OutputManager::getInstance().getConsoleWriter()->enable();
resetTerminalMode();
- this->shell_->destroy();
+ delete this->shell_;
}
//! Processes the pending input key strokes, refreshes the status lines and handles std::cout (redirected)
Modified: code/branches/core6/src/libraries/core/input/InputManager.cc
===================================================================
--- code/branches/core6/src/libraries/core/input/InputManager.cc 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/libraries/core/input/InputManager.cc 2013-03-26 22:43:43 UTC (rev 9589)
@@ -641,7 +641,7 @@
{
assert(state && this->activeStates_.find(state->getPriority()) == this->activeStates_.end());
statesByName_.erase(state->getName());
- state->destroy();
+ delete state;
}
bool InputManager::setMouseExclusive(const std::string& name, tribool value)
Modified: code/branches/core6/src/libraries/core/input/JoyStickQuantityListener.h
===================================================================
--- code/branches/core6/src/libraries/core/input/JoyStickQuantityListener.h 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/libraries/core/input/JoyStickQuantityListener.h 2013-03-26 22:43:43 UTC (rev 9589)
@@ -37,12 +37,12 @@
#include "InputPrereqs.h"
#include <vector>
-#include "core/class/OrxonoxClass.h"
+#include "core/object/Listable.h"
namespace orxonox
{
//! Derive from this class to get informed when joy sticks get added/removed
- class _CoreExport JoyStickQuantityListener : virtual public OrxonoxClass
+ class _CoreExport JoyStickQuantityListener : virtual public Listable
{
friend class InputManager;
protected:
Modified: code/branches/core6/src/libraries/network/ClientConnectionListener.h
===================================================================
--- code/branches/core6/src/libraries/network/ClientConnectionListener.h 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/libraries/network/ClientConnectionListener.h 2013-03-26 22:43:43 UTC (rev 9589)
@@ -30,11 +30,11 @@
#define _ClientConnectionListener_H__
#include "NetworkPrereqs.h"
-#include "core/class/OrxonoxClass.h"
+#include "core/object/Listable.h"
namespace orxonox
{
- class _NetworkExport ClientConnectionListener : virtual public OrxonoxClass
+ class _NetworkExport ClientConnectionListener : virtual public Listable
{
public:
ClientConnectionListener();
Modified: code/branches/core6/src/libraries/network/NetworkChatListener.h
===================================================================
--- code/branches/core6/src/libraries/network/NetworkChatListener.h 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/libraries/network/NetworkChatListener.h 2013-03-26 22:43:43 UTC (rev 9589)
@@ -31,7 +31,7 @@
#include "NetworkPrereqs.h"
-#include "core/class/OrxonoxClass.h"
+#include "core/object/Listable.h"
namespace orxonox
{
@@ -42,7 +42,7 @@
This interface exists mostly to resolve circular dependencies between the chat functions
in Host and ChatManager. ChatManager is the main derivative of this interface.
*/
- class _NetworkExport NetworkChatListener : virtual public OrxonoxClass
+ class _NetworkExport NetworkChatListener : virtual public Listable
{
friend class Host;
Modified: code/branches/core6/src/libraries/network/NetworkFunction.cc
===================================================================
--- code/branches/core6/src/libraries/network/NetworkFunction.cc 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/libraries/network/NetworkFunction.cc 2013-03-26 22:43:43 UTC (rev 9589)
@@ -56,7 +56,7 @@
std::map<std::string, NetworkFunctionBase*>& map = NetworkFunctionBase::getNameMap();
std::map<std::string, NetworkFunctionBase*>::iterator it;
for( it=map.begin(); it!=map.end(); ++it )
- it->second->destroy();
+ delete it->second;
}
Modified: code/branches/core6/src/libraries/network/NetworkFunction.h
===================================================================
--- code/branches/core6/src/libraries/network/NetworkFunction.h 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/libraries/network/NetworkFunction.h 2013-03-26 22:43:43 UTC (rev 9589)
@@ -38,6 +38,7 @@
#include <boost/preprocessor/cat.hpp>
#include <boost/static_assert.hpp>
+#include "core/object/Listable.h"
#include "core/class/Identifier.h"
#include "core/command/Functor.h"
#include "FunctionCallManager.h"
@@ -69,7 +70,7 @@
-class _NetworkExport NetworkFunctionBase: virtual public OrxonoxClass {
+class _NetworkExport NetworkFunctionBase: virtual public Listable {
public:
NetworkFunctionBase(const std::string& name);
~NetworkFunctionBase();
Modified: code/branches/core6/src/libraries/tools/interfaces/TimeFactorListener.h
===================================================================
--- code/branches/core6/src/libraries/tools/interfaces/TimeFactorListener.h 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/libraries/tools/interfaces/TimeFactorListener.h 2013-03-26 22:43:43 UTC (rev 9589)
@@ -30,11 +30,11 @@
#define _TimeFactorListener_H__
#include "tools/ToolsPrereqs.h"
-#include "core/class/OrxonoxClass.h"
+#include "core/object/Listable.h"
namespace orxonox
{
- class _ToolsExport TimeFactorListener : virtual public OrxonoxClass
+ class _ToolsExport TimeFactorListener : virtual public Listable
{
public:
TimeFactorListener();
Modified: code/branches/core6/src/modules/weapons/projectiles/ParticleProjectile.cc
===================================================================
--- code/branches/core6/src/modules/weapons/projectiles/ParticleProjectile.cc 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/modules/weapons/projectiles/ParticleProjectile.cc 2013-03-26 22:43:43 UTC (rev 9589)
@@ -64,7 +64,7 @@
if (this->isInitialized() && this->particles_)
{
this->detachOgreObject(this->particles_->getParticleSystem());
- this->particles_->destroy();
+ delete this->particles_;
}
}
Modified: code/branches/core6/src/orxonox/chat/ChatListener.h
===================================================================
--- code/branches/core6/src/orxonox/chat/ChatListener.h 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/orxonox/chat/ChatListener.h 2013-03-26 22:43:43 UTC (rev 9589)
@@ -31,7 +31,7 @@
#include "OrxonoxPrereqs.h"
-#include "core/class/OrxonoxClass.h"
+#include "core/object/Listable.h"
namespace orxonox
{
@@ -39,7 +39,7 @@
@brief Classes inheriting from this interface get a notification whenever a chat
message was sent through ChatManager.
*/
- class _OrxonoxExport ChatListener : virtual public OrxonoxClass
+ class _OrxonoxExport ChatListener : virtual public Listable
{
friend class ChatManager;
Modified: code/branches/core6/src/orxonox/graphics/ParticleEmitter.cc
===================================================================
--- code/branches/core6/src/orxonox/graphics/ParticleEmitter.cc 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/orxonox/graphics/ParticleEmitter.cc 2013-03-26 22:43:43 UTC (rev 9589)
@@ -62,7 +62,7 @@
if (this->isInitialized() && this->particles_)
{
this->detachOgreObject(this->particles_->getParticleSystem());
- this->particles_->destroy();
+ delete this->particles_;
}
}
@@ -100,7 +100,7 @@
{
if (this->particles_)
{
- this->particles_->destroy();
+ delete this->particles_;
this->particles_ = 0;
}
Modified: code/branches/core6/src/orxonox/overlays/InGameConsole.cc
===================================================================
--- code/branches/core6/src/orxonox/overlays/InGameConsole.cc 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/orxonox/overlays/InGameConsole.cc 2013-03-26 22:43:43 UTC (rev 9589)
@@ -109,7 +109,7 @@
InputManager::getInstance().destroyState("console");
// destroy the underlaying shell
- this->shell_->destroy();
+ delete this->shell_;
Ogre::OverlayManager* ovMan = Ogre::OverlayManager::getSingletonPtr();
if (ovMan)
Modified: code/branches/core6/src/orxonox/worldentities/BigExplosion.cc
===================================================================
--- code/branches/core6/src/orxonox/worldentities/BigExplosion.cc 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/orxonox/worldentities/BigExplosion.cc 2013-03-26 22:43:43 UTC (rev 9589)
@@ -224,45 +224,45 @@
if (this->debrisFire1_)
{
this->debris1_->detachOgreObject(this->debrisFire1_->getParticleSystem());
- this->debrisFire1_->destroy();
+ delete this->debrisFire1_;
}
if (this->debrisSmoke1_)
{
this->debris1_->detachOgreObject(this->debrisSmoke1_->getParticleSystem());
- this->debrisSmoke1_->destroy();
+ delete this->debrisSmoke1_;
}
if (this->debrisFire2_)
{
this->debris2_->detachOgreObject(this->debrisFire2_->getParticleSystem());
- this->debrisFire2_->destroy();
+ delete this->debrisFire2_;
}
if (this->debrisSmoke2_)
{
this->debris2_->detachOgreObject(this->debrisSmoke2_->getParticleSystem());
- this->debrisSmoke2_->destroy();
+ delete this->debrisSmoke2_;
}
if (this->debrisFire3_)
{
this->debris3_->detachOgreObject(this->debrisFire3_->getParticleSystem());
- this->debrisFire3_->destroy();
+ delete this->debrisFire3_;
}
if (this->debrisSmoke3_)
{
this->debris3_->detachOgreObject(this->debrisSmoke3_->getParticleSystem());
- this->debrisSmoke3_->destroy();
+ delete this->debrisSmoke3_;
}
if (this->debrisFire4_)
{
this->debris4_->detachOgreObject(this->debrisFire4_->getParticleSystem());
- this->debrisFire4_->destroy();
+ delete this->debrisFire4_;
}
if (this->debrisSmoke4_)
{
this->debris4_->detachOgreObject(this->debrisSmoke4_->getParticleSystem());
- this->debrisSmoke4_->destroy();
+ delete this->debrisSmoke4_;
}
}
}
Modified: code/branches/core6/src/orxonox/worldentities/ExplosionChunk.cc
===================================================================
--- code/branches/core6/src/orxonox/worldentities/ExplosionChunk.cc 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/orxonox/worldentities/ExplosionChunk.cc 2013-03-26 22:43:43 UTC (rev 9589)
@@ -91,12 +91,12 @@
if (this->fire_)
{
this->detachOgreObject(this->fire_->getParticleSystem());
- this->fire_->destroy();
+ delete this->fire_;
}
if (this->smoke_)
{
this->detachOgreObject(this->smoke_->getParticleSystem());
- this->smoke_->destroy();
+ delete this->smoke_;
}
}
}
Modified: code/branches/core6/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/core6/src/orxonox/worldentities/pawns/SpaceShip.cc 2013-03-26 22:40:05 UTC (rev 9588)
+++ code/branches/core6/src/orxonox/worldentities/pawns/SpaceShip.cc 2013-03-26 22:43:43 UTC (rev 9589)
@@ -95,7 +95,7 @@
this->removeAllEngines();
if (this->boostBlur_)
- this->boostBlur_->destroy();
+ delete this->boostBlur_;
}
}
@@ -446,7 +446,7 @@
{
if (!this->bEnableMotionBlur_ && this->boostBlur_ != NULL)
{
- this->boostBlur_->destroy();
+ delete this->boostBlur_;
this->boostBlur_ = NULL;
}
}
More information about the Orxonox-commit
mailing list