Commit [r655] Maximize Restore History

minor fixes to file names (lower case) and file style.

thegusty999 2014-06-17

added /branches/gus/guslib/guslib/guslib/system/processrunner.cpp
changed /branches/gus/CMakeLists.txt
changed /branches/gus/tools/veraremovetrailingspc.bat
changed /branches/gus/guslib/guslib/guslib/util/filehelper.h
changed /branches/gus/src/impl/MenuState.h
changed /branches/gus/src/app/serpentsengine.h
changed /branches/gus/guslib/guslib/CMakeLists.txt
changed /branches/gus/src/impl/workbenchstate.cpp
changed /branches/gus/src/impl/workbenchstate.h
changed /branches/gus/src/app/serpentsframelistener.cpp
changed /branches/gus/env_setup/copyReleaseDLLs.bat.in
copied /branches/gus/src/engine/GusCamera.cpp -> /branches/gus/src/engine/serpentscamera.cpp
copied /branches/gus/src/engine/HealthWidget.cpp -> /branches/gus/src/engine/serpentscamera.h
copied /branches/gus/src/engine/GusCamera.h -> /branches/gus/src/app/serpentsstate.h
copied /branches/gus/src/app/SerpState.cpp -> /branches/gus/src/app/serpentsstate.cpp
copied /branches/gus/src/app/SerpState.h -> /branches/gus/guslib/guslib/guslib/system/processrunner.h
/branches/gus/guslib/guslib/guslib/system/processrunner.cpp Diff Switch to side-by-side view
Loading...
/branches/gus/CMakeLists.txt Diff Switch to side-by-side view
Loading...
/branches/gus/tools/veraremovetrailingspc.bat Diff Switch to side-by-side view
Loading...
/branches/gus/guslib/guslib/guslib/util/filehelper.h Diff Switch to side-by-side view
Loading...
/branches/gus/src/impl/MenuState.h Diff Switch to side-by-side view
Loading...
/branches/gus/src/app/serpentsengine.h Diff Switch to side-by-side view
Loading...
/branches/gus/guslib/guslib/CMakeLists.txt Diff Switch to side-by-side view
Loading...
/branches/gus/src/impl/workbenchstate.cpp Diff Switch to side-by-side view
Loading...
/branches/gus/src/impl/workbenchstate.h Diff Switch to side-by-side view
Loading...
/branches/gus/src/app/serpentsframelistener.cpp Diff Switch to side-by-side view
Loading...
/branches/gus/env_setup/copyReleaseDLLs.bat.in Diff Switch to side-by-side view
Loading...
/branches/gus/src/engine/GusCamera.cpp to /branches/gus/src/engine/serpentscamera.cpp
--- a/branches/gus/src/engine/GusCamera.cpp
+++ b/branches/gus/src/engine/serpentscamera.cpp
@@ -22,11 +22,11 @@
 //
 // Own header.
 //
-#include "engine/guscamera.h"
+#include "engine/serpentscamera.h"
 
 namespace Serpents
 {
-  GusCamera::GusCamera(Ogre::Camera * aCamera)
+  SerpentsCamera::SerpentsCamera(Ogre::Camera * aCamera)
     : camera(aCamera),
       zoomLevel(0),  //  0 = no zoom; 1 = max zoom
       zoomStep(0.1),
@@ -37,12 +37,12 @@
   }
 
 
-  GusCamera::~GusCamera(void)
+  SerpentsCamera::~SerpentsCamera(void)
   {
   }
 
 
-  void GusCamera::lookAt(const Ogre::Vector3 & lookTarget)
+  void SerpentsCamera::lookAt(const Ogre::Vector3 & lookTarget)
   {
     if (NULL == camera)
     {
@@ -58,7 +58,7 @@
     camera->lookAt(actualVector);
   }
 
-  void GusCamera::setZoomLevel(const Ogre::Real & zoom)
+  void SerpentsCamera::setZoomLevel(const Ogre::Real & zoom)
   {
     if (zoom >= 0 && zoom <= 1)
     {
@@ -72,7 +72,7 @@
   }
 
 
-  void GusCamera::setZoomMax(const Ogre::Real & zoom)
+  void SerpentsCamera::setZoomMax(const Ogre::Real & zoom)
   {
     if (zoom >= 0 && zoom <= 1)
     {
@@ -83,7 +83,7 @@
   }
 
 
-  void GusCamera::slideToLocation(Ogre::Vector3 newPosition)
+  void SerpentsCamera::slideToLocation(Ogre::Vector3 newPosition)
   {
     Ogre::Vector3 camPos = this->originalPos;
     Ogre::Vector3 moveVector = newPosition;
@@ -99,7 +99,7 @@
   }
 
 
-  void GusCamera::setFOV(const Ogre::Real & fov)
+  void SerpentsCamera::setFOV(const Ogre::Real & fov)
   {
     if (this->camera != NULL)
     {
/branches/gus/src/engine/HealthWidget.cpp to /branches/gus/src/engine/serpentscamera.h
--- a/branches/gus/src/engine/HealthWidget.cpp
+++ b/branches/gus/src/engine/serpentscamera.h
@@ -1,70 +1,120 @@
-#include "HealthWidget.h"
-#include <Ogre.h>
-#include <OgreTextAreaOverlayElement.h>
-#include <OgreOverlayManager.h>
-#include "GBaseSetting.h"
+#pragma once
 
-#include <guslib/trace/trace.h>
+//    This file is part of Gusty's Serpents
+//    Copyright (C) 2009  Augustin Preda (thegusty999@gmail.com)
+//
+//    Gusty's Serpents is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+//
+// Includes
+//
+
+//
+// C++ system headers
+//
+
+#include <vector>
+
+//
+// This project's headers.
+//
+
+// Forwards the inclusion of ogre.h
+#include "config/serpentsogre.h"
 
 namespace Serpents
 {
-	HealthWidget::HealthWidget( const std::string & textElem, const std::string & graphElem )
-		: textOverlayElement_(textElem)
-		, graphicalOverlayElement_(graphElem)
-		, textValue_(100)
-	{
-	}
+  /// Ogre::Camera container, allowing some additional functionality.
+  /// TODO: use quaternion nlerp/slerp and keep a slower camera movement, so that it's not instant... so not blocky.
+  class SerpentsCamera
+  {
+  private:
+    Ogre::Camera * camera;        //  the Ogre camera to do the actual rendering.
+    Ogre::Vector3 targetPos;
+    Ogre::Quaternion originalOrientation;  // Original orientation
+    Ogre::Vector3 originalPos;    //  original location
+    Ogre::Real zoomLevel;      //  zoom level to use. 0 = no zoom; 1 = max zoom
+    Ogre::Real zoomStep;            // steps between zooms; (units travelled in 1 sec.)
+    Ogre::Real zoomMax;
+  public:
+    //  Ctor.
+    explicit SerpentsCamera(Ogre::Camera * camera);
 
-	HealthWidget::~HealthWidget()
-	{
-	}
+    virtual ~SerpentsCamera(void);
 
+    ///  Setter for the target point of the camera.
+    virtual void setTargetPos(const Ogre::Vector3 &newTarget)
+    {
+      this->targetPos = newTarget;
+    }
 
-	void HealthWidget::render()
-	{
-		if( !messageAccessMutex.try_lock() )
-		{
-			return;
-		}
-		if( textOverlayElement_ != "" )
-		{
-			Ogre::OverlayElement * tempOverlayItem = Ogre::OverlayManager::getSingleton().getOverlayElement(textOverlayElement_);
-			std::stringstream ss;
-			ss<<"Health: "<< textValue_ <<" %";
-			tempOverlayItem->setCaption(ss.str());
-		}
+    /// Getter for the target point of the camera.
+    virtual Ogre::Vector3 getTargetPos() const
+    {
+      return targetPos;
+    }
 
-		if(graphicalOverlayElement_ != "" )
-		{
-			Ogre::OverlayElement * tempOverlayItem = Ogre::OverlayManager::getSingletonPtr()->getOverlayElement(graphicalOverlayElement_);
-			Ogre::ParameterList myList = tempOverlayItem->getMaterial()->getParameters();
-			Ogre::Technique::PassIterator myIt = tempOverlayItem->getTechnique()->getPassIterator();
+    ///  Utility function to allow easier sliding, keeping the same orientation.
+    /// This will be most likely used in classic 3rd person games, where a constant
+    /// position relative to the character should be kept.
+    virtual void slideToLocation(Ogre::Vector3 newPosition);
 
-			while( myIt.hasMoreElements() )
-			{
-				Ogre::Pass::TextureUnitStateIterator secIt = myIt.getNext()->getTextureUnitStateIterator();
-				while( secIt.hasMoreElements() )
-				{
-					double divisor = GBase::GBaseAppSettings::getPtr ()->model.healthIconDivision;
-					if( divisor == 0 ) divisor=1;
-					Ogre::Real v = GBase::GBaseAppSettings::getPtr ()->model.healthIconOffset 
-						+ textValue_*100 / divisor;
+    ///  Getter for the camera
+    virtual Ogre::Camera* getCamera() const
+    {
+      return camera;
+    }
 
-					if( secIt.peekNext()->getName()=="tu_Tex" )
-					{
-						secIt.peekNext()->setTextureScroll(0, v);
-					}
+    /// Same as standard camera lookAt, taking the zoom level in addition.
+    virtual void lookAt(const Ogre::Vector3 & lookTarget);
 
-					secIt.moveNext();
-				}
-			}//endwhile
-		}//endif
-		messageAccessMutex.unlock();
-	}
-	void HealthWidget::setValue(double textValue)
-	{
-		guslib::GScopedLock myLock(messageAccessMutex);
-		textValue_ = textValue;
-		GTRACE(4, "HealthWidget::set"<<textValue_);
-	}
-}+    ///  Reset the camera orientation to its initial value
+    virtual void resetOrientation()
+    {
+      camera->setOrientation(originalOrientation);
+    }
+
+    virtual void setZoomStep(const Ogre::Real &value)
+    {
+      zoomStep = value;
+    }
+
+    virtual Ogre::Real getZoomStep() const
+    {
+      return zoomStep;
+    }
+
+    /// Override the default Field Of View.
+    void setFOV(const Ogre::Real &fov);
+
+    Ogre::Real getZoomMax() const
+    {
+      return zoomMax;
+    }
+
+    void setZoomMax(const Ogre::Real & zoom);
+
+    ///  Set the zoom to have
+    void setZoomLevel(const Ogre::Real & zoom);
+
+    ///  Getter for the zoom level
+    Ogre::Real getZoomLevel() const
+    {
+      return this->zoomLevel;
+    }
+  };
+
+  typedef std::vector<SerpentsCamera> SerpentsCameraList;
+}
/branches/gus/src/engine/GusCamera.h to /branches/gus/src/app/serpentsstate.h
--- a/branches/gus/src/engine/GusCamera.h
+++ b/branches/gus/src/app/serpentsstate.h
@@ -1,21 +1,32 @@
 #pragma once
 
-//    This file is part of Gusty's Serpents
-//    Copyright (C) 2009  Augustin Preda (thegusty999@gmail.com)
-//
-//    Gusty's Serpents is free software: you can redistribute it and/or modify
-//    it under the terms of the GNU General Public License as published by
-//    the Free Software Foundation, either version 3 of the License, or
-//    (at your option) any later version.
-//
-//    This program is distributed in the hope that it will be useful,
-//    but WITHOUT ANY WARRANTY; without even the implied warranty of
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//    GNU General Public License for more details.
-//
-//    You should have received a copy of the GNU General Public License
-//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
+//   This file is part of Gusty's Serpents, licensed under the terms of the MIT License
+//   (further described below).
+//
+//   Copyright (C) 2009-2014  Augustin Preda (thegusty999@gmail.com)
+//
+//   Permission is hereby granted, free of charge, to any person obtaining a copy
+//   of this software and associated documentation files (the "Software"), to deal
+//   in the Software without restriction, including without limitation the rights
+//   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+//   copies of the Software, and to permit persons to whom the Software is
+//   furnished to do so, subject to the following conditions:
+//
+//   The above copyright notice and this permission notice shall be included in
+//   all copies or substantial portions of the Software.
+//
+//   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+//   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+//   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+//   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+//   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+//   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+//   THE SOFTWARE.
+//
+//    Keeps track of the application's states
+//   Last change:  $LastChangedDate$
+//   Revision:    $Revision$
+
 
 //
 // Includes
@@ -25,96 +36,176 @@
 // C++ system headers
 //
 
-#include <vector>
-
-//
-// This project's headers.
-//
-
-// Forwards the inclusion of ogre.h
-#include "config/serpentsogre.h"
-
-namespace Serpents
+#include <map>
+#include <stack>
+#include <string>
+
+//
+// Other libraries' headers
+//
+
+// Input system
+#include "OIS.h"
+
+// using the singleton
+#include "guslib/common/singleton.hpp"
+
+// using the Configuration for the optional parameter send op.
+#include "guslib/util/configuration.h"
+
+
+namespace app
 {
-  /// Ogre::Camera container, allowing some additional functionality.
-  /// TODO: use quaternion nlerp/slerp and keep a slower camera movement, so that it's not instant... so not blocky.
-  class GusCamera
+  // fwd class defs.
+  class SerpEngine;
+
+  /**
+    Parameter class/structure that can be passed to a state.
+  */
+  class SerpStateParams
+  {
+  protected:
+    guslib::Configuration cfg_;
+
+  public:
+    SerpStateParams();
+    explicit SerpStateParams(const guslib::Configuration& rhs);
+    guslib::Configuration& getConfig()
+    {
+      return cfg_;
+    }
+
+    const guslib::Configuration& getConstConfig() const
+    {
+      return cfg_;
+    }
+  };
+
+
+  /**
+    A basic state class. Different application states should specialize extending this state.
+  */
+  class SerpState
+  {
+  protected:
+    std::string name_;
+
+    SerpState(const std::string& name, SerpEngine* ptr = 0)
+      : name_(name),
+        enginePtr_(ptr)
+    {
+    }
+
+    SerpEngine* enginePtr_;
+
+  public:
+    virtual ~SerpState();
+
+    // Handle state initialization.
+    virtual void enter(const SerpStateParams& param) = 0;
+
+    // Handle state control release.
+    virtual void exit() = 0;
+
+    // Suspend the current state. Should most likely be resumed later on.
+    virtual void pause() = 0;
+
+    // Resume a suspended state.
+    virtual void resume() = 0;
+
+    // Handle input
+    virtual void reactToKeyPress(OIS::KeyCode keycode) = 0;
+    virtual void reactToKeyRelease(OIS::KeyCode keycode) = 0;
+
+    virtual void reactToMouseMoved(int x, int y) = 0;
+    virtual void reactToMousePressed(const OIS::MouseButtonID& btn, int x, int y) = 0;
+    virtual void reactToMouseReleased(const OIS::MouseButtonID& btn, int x, int y) = 0;
+
+    //
+    virtual bool handleLogicThreadLoop() = 0;
+
+    // Render the 3D scene.
+    virtual bool renderScene() = 0;
+
+    // Render the GUI.
+    virtual bool renderGUI() = 0;
+
+    virtual void notifyOfShutdown() = 0;
+
+    virtual const std::string& getName() const
+    {
+      return name_;
+    }
+  };
+
+  /**
+    Listener for the state manager
+  */
+  class SerpStateManagerListener
+  {
+  public:
+    virtual void OnStateStackEmpty() = 0;
+    virtual ~SerpStateManagerListener();
+  };
+
+
+  typedef std::map <std::string, SerpState*> SerpStateMap;
+  typedef std::stack <std::string> SerpStateStack;  // this is the state stack
+
+
+  /**
+    Class that handles the game's possible states.
+  */
+  class SerpStateManagerUtil
   {
   private:
-    Ogre::Camera * camera;        //  the Ogre camera to do the actual rendering.
-    Ogre::Vector3 targetPos;
-    Ogre::Quaternion originalOrientation;  // Original orientation
-    Ogre::Vector3 originalPos;    //  original location
-    Ogre::Real zoomLevel;      //  zoom level to use. 0 = no zoom; 1 = max zoom
-    Ogre::Real zoomStep;            // steps between zooms; (units travelled in 1 sec.)
-    Ogre::Real zoomMax;
-  public:
-    //  Ctor.
-    explicit GusCamera(Ogre::Camera * camera);
-
-    virtual ~GusCamera(void);
-
-    ///  Setter for the target point of the camera.
-    virtual void setTargetPos(const Ogre::Vector3 &newTarget)
-    {
-      this->targetPos = newTarget;
-    }
-
-    /// Getter for the target point of the camera.
-    virtual Ogre::Vector3 getTargetPos() const
-    {
-      return targetPos;
-    }
-
-    ///  Utility function to allow easier sliding, keeping the same orientation.
-    /// This will be most likely used in classic 3rd person games, where a constant
-    /// position relative to the character should be kept.
-    virtual void slideToLocation(Ogre::Vector3 newPosition);
-
-    ///  Getter for the camera
-    virtual Ogre::Camera* getCamera() const
-    {
-      return camera;
-    }
-
-    /// Same as standard camera lookAt, taking the zoom level in addition.
-    virtual void lookAt(const Ogre::Vector3 & lookTarget);
-
-    ///  Reset the camera orientation to its initial value
-    virtual void resetOrientation()
-    {
-      camera->setOrientation(originalOrientation);
-    }
-
-    virtual void setZoomStep(const Ogre::Real &value)
-    {
-      zoomStep = value;
-    }
-
-    virtual Ogre::Real getZoomStep() const
-    {
-      return zoomStep;
-    }
-
-    /// Override the default Field Of View.
-    void setFOV(const Ogre::Real &fov);
-
-    Ogre::Real getZoomMax() const
-    {
-      return zoomMax;
-    }
-
-    void setZoomMax(const Ogre::Real & zoom);
-
-    ///  Set the zoom to have
-    void setZoomLevel(const Ogre::Real & zoom);
-
-    ///  Getter for the zoom level
-    Ogre::Real getZoomLevel() const
-    {
-      return this->zoomLevel;
-    }
-  };
-
-  typedef std::vector<GusCamera> GusCameraList;
+    //  the internal states vector. States can changed as well as pushed and popped.
+    SerpStateMap states_;
+    SerpStateStack stateStack_;
+
+    SerpStateManagerListener * listenerPtr_;
+
+    std::string nextSetState_;
+    std::string nextPushState_;
+
+    int nextPopState_;
+    SerpStateParams paramsForNextState_;
+
+    void internalPushState(const std::string& state, const SerpStateParams& params);
+    /**
+      Set the state to use. This is an internal function that doesn't use any locking.
+      Don't call or make available externally.
+    */
+    void internalSetState(const std::string& state, const SerpStateParams& params);
+    void internalPopState();
+  public:
+    SerpStateManagerUtil();
+
+    virtual ~SerpStateManagerUtil();
+
+    virtual bool addState(const SerpState * state);
+
+    virtual void setListener(const SerpStateManagerListener * aListener);
+
+        virtual void setStateNextTick(const std::string& state, const SerpStateParams& params);
+    virtual void pushStateNextTick(const std::string& state, const SerpStateParams& params);
+    virtual void popStateNextTick();
+
+
+    virtual void reactToKeyPress(const OIS::KeyCode& keycode);
+    virtual void reactToKeyRelease(const OIS::KeyCode& keycode);
+
+    virtual void reactToMouseMoved(int x, int y);
+    virtual void reactToMousePressed(const OIS::MouseButtonID& btn, int x, int y);
+    virtual void reactToMouseReleased(const OIS::MouseButtonID& btn, int x, int y);
+
+    virtual bool handleLogicThreadLoop();
+
+    virtual bool renderScene();
+    virtual bool renderGUI();
+
+    virtual void setShutdown();
+  };
+
+  typedef guslib::Singleton<app::SerpStateManagerUtil> SerpStateManager;
 }
/branches/gus/src/app/SerpState.cpp to /branches/gus/src/app/serpentsstate.cpp
--- a/branches/gus/src/app/SerpState.cpp
+++ b/branches/gus/src/app/serpentsstate.cpp
@@ -1,296 +1,336 @@
-#include <app/SerpState.h>
-#include <guslib/trace/Trace.h>
+//   This file is part of Gusty's Serpents, licensed under the terms of the MIT License
+//   (further described below).
+//
+//   Copyright (C) 2009-2014  Augustin Preda (thegusty999@gmail.com)
+//
+//   Permission is hereby granted, free of charge, to any person obtaining a copy
+//   of this software and associated documentation files (the "Software"), to deal
+//   in the Software without restriction, including without limitation the rights
+//   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+//   copies of the Software, and to permit persons to whom the Software is
+//   furnished to do so, subject to the following conditions:
+//
+//   The above copyright notice and this permission notice shall be included in
+//   all copies or substantial portions of the Software.
+//
+//   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+//   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+//   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+//   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+//   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+//   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+//   THE SOFTWARE.
+
+//
+// Includes
+//
+
+//
+// Own header
+//
+#include "app/serpentsstate.h"
+
+
+//
+// C++ system files
+//
+
+#include <string>
+
+//
+// Other libraries' headers
+//
+
+// Add tracing
+#include "guslib/trace/trace.h"
 
 namespace app
 {
-	SerpStateParams::SerpStateParams ()
-		: cfg_ (guslib::Configuration ())
-	{
-	}
-	SerpStateParams::SerpStateParams (guslib::Configuration& rhs)
-		: cfg_ (rhs)
-	{
-	}
-
-	SerpStateManagerUtil::SerpStateManagerUtil ()
-		: listenerPtr_ (0)
-		, nextPopState_ (0)
-		, nextPushState_ ("")
-	{
-		GTRACE (2, "Serpent State Manager (util) created");
-	}
-
-
-	SerpStateManagerUtil::~SerpStateManagerUtil ()
-	{
-		GTRACE (3, "SerpStateManagerUtil destruction");
-		//guslib::GScopedLock myLock(stateChangeMutex);
-
-		// clear the states vector.
-		states_.clear ();
-
-		while (! stateStack_.empty ())
-		{
-			stateStack_.pop ();
-		}
-	}
-
-
-	void SerpStateManagerUtil::setListener (const SerpStateManagerListener * aListener)
-	{
-		listenerPtr_ = const_cast<SerpStateManagerListener*> (aListener);
-	}
-
-
-	bool SerpStateManagerUtil::addState (const SerpState* statePtr)
-	{
-		GTRACE(4, "Adding a state.");
-
-		if (! statePtr)
-			return false;
-
-		//GTRACE (5, "SerpStateManagerUtil::addState getting mutex (stateChangeMutex)");
-		//guslib::GScopedLock myLock(stateChangeMutex);
-		//GTRACE(5, "SerpStateManagerUtil::addState got mutex (stateChangeMutex)");
-
-		SerpStateMap::iterator it = states_.find (statePtr->getName ());
-		if (it != states_.end ())
-		{
-			GTRACE (1, "Tried to add a state named [" << statePtr->getName () << "] but that name is already in use!");
-			return false;
-		}
-
-		states_[statePtr->getName ()] = const_cast<SerpState*>(statePtr);
-		return true;
-	}
-
-
-
-	void SerpStateManagerUtil::internalPopState()
-	{
-		GTRACE (4, "(internal) popping a state.");
-
-		// first remove the current state
-		if (! stateStack_.empty ())
-		{
-			states_[stateStack_.top ()]->exit ();
-			stateStack_.pop ();
-		}
-
-		// also resume the previous state if it was suspended.
-		if (! stateStack_.empty ())
-		{
-			states_[stateStack_.top ()]->resume ();
-		}
-		else
-		{
-			if (listenerPtr_)
-			{
-				listenerPtr_->OnStateStackEmpty ();
-			}
-		}
-	}
-
-
-	void SerpStateManagerUtil::internalSetState (const std::string& state, const SerpStateParams& params)
-	{
-		if (! stateStack_.empty ())
-		{
-			states_[stateStack_.top ()]->exit ();
-			stateStack_.pop();
-		}
-
-		GTRACE (4, "SerpStateManagerUtil::setState popped one state; inserting another one");
-		stateStack_.push (state);
-		states_[stateStack_.top ()]->enter (params);
-	}
-
-
-
-
-	void SerpStateManagerUtil::internalPushState (const std::string& state, const SerpStateParams& params)
-	{
-		// first pause the current state
-
-		if (! stateStack_.empty ())
-		{
-			states_[stateStack_.top ()]->pause ();
-		}
-
-		// now push the new one onto the stack and activate it.
-		stateStack_.push (state);
-		states_[stateStack_.top ()]->enter (params);
-	}
-
-
-	void SerpStateManagerUtil::popStateNextTick()
-	{
-		//guslib::GScopedLock myLock(stateChangeMutex);
-		++ nextPopState_;
-		GTRACE (3, "Number of states to pop at the next tick:" << nextPopState_);
-	}
-
-	void SerpStateManagerUtil::pushStateNextTick (const std::string& state, const SerpStateParams& params)
-	{
-		//guslib::GScopedLock myLock(stateChangeMutex);
-		SerpStateMap::iterator it = states_.find (state);
-		if (it == states_.end ())
-		{
-			GTRACE (2, "Unable to push state [" << state << "]. State doe not exist!");
-			return;
-		}
-		nextPushState_ = state;
-		paramsForNextState_ = params;
-	}
-
-
-	void SerpStateManagerUtil::setStateNextTick (const std::string& state, const SerpStateParams& params)
-	{
-		//guslib::GScopedLock myLock(stateChangeMutex);
-		SerpStateMap::iterator it = states_.find (state);
-		if (it == states_.end ())
-		{
-			GTRACE (2, "Unable to push state [" << state << "]. State doe not exist!");
-			return;
-		}
-		nextSetState_ = state;
-		paramsForNextState_ = params;
-	}
-
-
-
-	void SerpStateManagerUtil::reactToKeyPress (const OIS::KeyCode& keycode)
-	{
-		GTRACE(5, "SerpStateManagerUtil::reactToKeyPress");
-		if (! stateStack_.empty () )
-		{
-			states_[stateStack_.top ()]->reactToKeyPress (keycode);
-		}
-	}
-
-
-	void SerpStateManagerUtil::reactToKeyRelease (const OIS::KeyCode& keycode)
-	{
-		GTRACE(5, "SerpStateManagerUtil::reactToKeyRelease");
-		if (! stateStack_.empty ())
-		{
-			states_[stateStack_.top ()]->reactToKeyRelease (keycode);
-		}
-	}
-
-
-	void SerpStateManagerUtil::reactToMouseMoved (int x, int y)
-	{
-		if (! stateStack_.empty ())
-		{
-			states_[stateStack_.top ()]->reactToMouseMoved (x, y);
-		}
-	}
-
-
-	void SerpStateManagerUtil::reactToMousePressed (const OIS::MouseButtonID& btn, int x, int y)
-	{
-		if (! stateStack_.empty ())
-		{
-			states_[stateStack_.top ()]->reactToMousePressed (btn, x, y);
-		}
-	}
-
-
-	void SerpStateManagerUtil::reactToMouseReleased (const OIS::MouseButtonID& btn, int x, int y)
-	{
-		if (! stateStack_.empty ())
-		{
-			states_[stateStack_.top ()]->reactToMouseReleased (btn, x, y);
-		}
-	}
-
-
-
-	bool SerpStateManagerUtil::handleLogicThreadLoop()
-	{
-		GTRACE (6, "SerpStateManagerUtil: handling logic loop");
-
-		if (nextPushState_ != "")
-		{
-			internalPushState (nextPushState_, paramsForNextState_);
-			nextPushState_ = "";
-		}
-		else if (nextSetState_ != "")
-		{
-			internalSetState (nextSetState_, paramsForNextState_);
-			nextSetState_ = "";
-		}
-
-		// Pop the states...
-		while (nextPopState_ > 0)
-		{
-			GTRACE (3, "Will pop some state(s)");
-			-- nextPopState_;
-			internalPopState ();
-		}
-
-		if (! stateStack_.empty ())
-		{
-			// Take a pointer to the current state and release the mutex, allowing the state to be changed.
-			// Regardless of whether the state was changed or not, call the logic handling function on the
-			// stored state. This is necessary especially in order to prevent deadlocks due to the fact
-			// that the logic thread may block other threads.
-			SerpState * state = states_[stateStack_.top ()];
-			if(state)
-			{
-				bool retVal = state->handleLogicThreadLoop ();
-				return retVal;
-			}
-			else
-			{
-				return false;
-			}
-		}
-
-		return false;
-	}
-
-
-
-	bool SerpStateManagerUtil::renderScene ()
-	{
-		GTRACE (5, "SerpStateManagerUtil::renderScene()");
-		if (! stateStack_.empty ())
-		{
-			// The rendering mutex can be released since the render operation will be called;
-			// (and that operation will also create a lock which will block state changes until the frame
-			// rendering will be finished).
-
-			bool retVal = states_[stateStack_.top ()]->renderScene ();
-
-			return retVal;
-		}
-		GTRACE(6, "SerpStateManagerUtil: renderScene has no states!.");
-
-		return false;
-	}
-
-
-
-	// similar to renderScene; same comments should apply.
-	bool SerpStateManagerUtil::renderGUI()
-	{
-		GTRACE(5, "SerpStateManagerUtil::renderGUI()");
-		if (! stateStack_.empty ())
-		{
-			return states_[stateStack_.top ()]->renderGUI ();
-		}
-		return false;
-	}
-
-
-	void SerpStateManagerUtil::setShutdown()
-	{
-		// set the listener ptr to null.
-		listenerPtr_ = 0;
-	}
-
-
-
-}
+  SerpStateParams::SerpStateParams()
+    : cfg_(guslib::Configuration())
+  {
+  }
+
+  SerpStateParams::SerpStateParams(const guslib::Configuration& rhs)
+    : cfg_(rhs)
+  {
+  }
+
+  SerpState::~SerpState()
+  {
+  }
+
+  SerpStateManagerListener::~SerpStateManagerListener()
+  {
+  }
+
+  SerpStateManagerUtil::SerpStateManagerUtil()
+    : listenerPtr_(0),
+      nextPopState_(0),
+      nextPushState_("")
+  {
+    GTRACE(2, "Serpent State Manager(util) created");
+  }
+
+
+  SerpStateManagerUtil::~SerpStateManagerUtil()
+  {
+    GTRACE(3, "SerpStateManagerUtil destruction");
+
+    // clear the states vector.
+    states_.clear();
+
+    while (false == stateStack_.empty())
+    {
+      stateStack_.pop();
+    }
+  }
+
+
+  void SerpStateManagerUtil::setListener(const SerpStateManagerListener * aListener)
+  {
+    listenerPtr_ = const_cast<SerpStateManagerListener*>(aListener);
+  }
+
+
+  bool SerpStateManagerUtil::addState(const SerpState* statePtr)
+  {
+    GTRACE(4, "Adding a state.");
+
+    if (NULL == statePtr)
+    {
+      return false;
+    }
+
+    SerpStateMap::iterator it = states_.find(statePtr->getName());
+    if (it != states_.end())
+    {
+      GTRACE(1, "Tried to add a state named [" << statePtr->getName() << "] but that name is already in use!");
+      return false;
+    }
+
+    states_[statePtr->getName()] = const_cast<SerpState*>(statePtr);
+    return true;
+  }
+
+
+  void SerpStateManagerUtil::internalPopState()
+  {
+    GTRACE(4, "(internal) popping a state.");
+
+    // first remove the current state
+    if (false == stateStack_.empty())
+    {
+      states_[stateStack_.top()]->exit();
+      stateStack_.pop();
+    }
+
+    // also resume the previous state if it was suspended.
+    if (false == stateStack_.empty())
+    {
+      states_[stateStack_.top()]->resume();
+    }
+    else
+    {
+      if (listenerPtr_)
+      {
+        listenerPtr_->OnStateStackEmpty();
+      }
+    }
+  }
+
+
+  void SerpStateManagerUtil::internalSetState(const std::string& state, const SerpStateParams& params)
+  {
+    if (false == stateStack_.empty())
+    {
+      states_[stateStack_.top()]->exit();
+      stateStack_.pop();
+    }
+
+    GTRACE(4, "SerpStateManagerUtil::setState popped one state; inserting another one");
+    stateStack_.push(state);
+    states_[stateStack_.top()]->enter(params);
+  }
+
+
+  void SerpStateManagerUtil::internalPushState(const std::string& state, const SerpStateParams& params)
+  {
+    // first pause the current state
+
+    if (false == stateStack_.empty())
+    {
+      states_[stateStack_.top()]->pause();
+    }
+
+    // now push the new one onto the stack and activate it.
+    stateStack_.push(state);
+    states_[stateStack_.top()]->enter(params);
+  }
+
+
+  void SerpStateManagerUtil::popStateNextTick()
+  {
+    ++nextPopState_;
+    GTRACE(3, "Number of states to pop at the next tick:" << nextPopState_);
+  }
+
+  void SerpStateManagerUtil::pushStateNextTick(const std::string& state, const SerpStateParams& params)
+  {
+    SerpStateMap::iterator it = states_.find(state);
+    if (it == states_.end())
+    {
+      GTRACE(2, "Unable to push state [" << state << "]. State doe not exist!");
+      return;
+    }
+    nextPushState_ = state;
+    paramsForNextState_ = params;
+  }
+
+
+  void SerpStateManagerUtil::setStateNextTick(const std::string& state, const SerpStateParams& params)
+  {
+    SerpStateMap::iterator it = states_.find(state);
+    if (it == states_.end())
+    {
+      GTRACE(2, "Unable to push state [" << state << "]. State doe not exist!");
+      return;
+    }
+
+    nextSetState_ = state;
+    paramsForNextState_ = params;
+  }
+
+
+  void SerpStateManagerUtil::reactToKeyPress(const OIS::KeyCode& keycode)
+  {
+    GTRACE(5, "SerpStateManagerUtil::reactToKeyPress");
+    if (false == stateStack_.empty() )
+    {
+      states_[stateStack_.top()]->reactToKeyPress(keycode);
+    }
+  }
+
+
+  void SerpStateManagerUtil::reactToKeyRelease(const OIS::KeyCode& keycode)
+  {
+    GTRACE(5, "SerpStateManagerUtil::reactToKeyRelease");
+    if (false == stateStack_.empty())
+    {
+      states_[stateStack_.top()]->reactToKeyRelease(keycode);
+    }
+  }
+
+
+  void SerpStateManagerUtil::reactToMouseMoved(int x, int y)
+  {
+    if (false == stateStack_.empty())
+    {
+      states_[stateStack_.top()]->reactToMouseMoved(x, y);
+    }
+  }
+
+
+  void SerpStateManagerUtil::reactToMousePressed(const OIS::MouseButtonID& btn, int x, int y)
+  {
+    if (false == stateStack_.empty())
+    {
+      states_[stateStack_.top()]->reactToMousePressed(btn, x, y);
+    }
+  }
+
+
+  void SerpStateManagerUtil::reactToMouseReleased(const OIS::MouseButtonID& btn, int x, int y)
+  {
+    if (false == stateStack_.empty())
+    {
+      states_[stateStack_.top()]->reactToMouseReleased(btn, x, y);
+    }
+  }
+
+
+  bool SerpStateManagerUtil::handleLogicThreadLoop()
+  {
+    GTRACE(6, "SerpStateManagerUtil: handling logic loop");
+
+    if (nextPushState_ != "")
+    {
+      internalPushState(nextPushState_, paramsForNextState_);
+      nextPushState_ = "";
+    }
+    else if (nextSetState_ != "")
+    {
+      internalSetState(nextSetState_, paramsForNextState_);
+      nextSetState_ = "";
+    }
+
+    // Pop the states...
+    while (nextPopState_ > 0)
+    {
+      GTRACE(3, "Will pop some state(s)");
+      --nextPopState_;
+      internalPopState();
+    }
+
+    if (false == stateStack_.empty())
+    {
+      // Take a pointer to the current state and release the mutex, allowing the state to be changed.
+      // Regardless of whether the state was changed or not, call the logic handling function on the
+      // stored state. This is necessary especially in order to prevent deadlocks due to the fact
+      // that the logic thread may block other threads.
+      SerpState * state = states_[stateStack_.top()];
+      if (state)
+      {
+        bool retVal = state->handleLogicThreadLoop();
+        return retVal;
+      }
+      else
+      {
+        return false;
+      }
+    }
+
+    return false;
+  }
+
+
+  bool SerpStateManagerUtil::renderScene()
+  {
+    GTRACE(5, "SerpStateManagerUtil::renderScene()");
+    if (false == stateStack_.empty())
+    {
+      // The rendering mutex can be released since the render operation will be called;
+      // (and that operation will also create a lock which will block state changes until the frame
+      // rendering will be finished).
+
+      bool retVal = states_[stateStack_.top()]->renderScene();
+
+      return retVal;
+    }
+
+    GTRACE(6, "SerpStateManagerUtil: renderScene has no states!.");
+
+    return false;
+  }
+
+
+  // similar to renderScene; same comments should apply.
+  bool SerpStateManagerUtil::renderGUI()
+  {
+    GTRACE(5, "SerpStateManagerUtil::renderGUI()");
+    if (false == stateStack_.empty())
+    {
+      return states_[stateStack_.top()]->renderGUI();
+    }
+
+    return false;
+  }
+
+
+  void SerpStateManagerUtil::setShutdown()
+  {
+    // set the listener ptr to null.
+    listenerPtr_ = 0;
+  }
+
+}  // namespace app
/branches/gus/src/app/SerpState.h to /branches/gus/guslib/guslib/guslib/system/processrunner.h
--- a/branches/gus/src/app/SerpState.h
+++ b/branches/gus/guslib/guslib/guslib/system/processrunner.h
@@ -1,10 +1,9 @@
-#ifndef _APP_SERP_STATE_H
-#define _APP_SERP_STATE_H
+#pragma once
 
-//   This file is part of Gusty's Serpents, licensed under the terms of the MIT License
-//   (further described below).
+//   This file is part of the guslib library, licensed under the terms of the MIT License.
 //
-//   Copyright (C) 2009-2012  Augustin Preda (thegusty999@gmail.com)
+//   The MIT License
+//   Copyright (C) 2010-2014  Augustin Preda (thegusty999@gmail.com)
 //
 //   Permission is hereby granted, free of charge, to any person obtaining a copy
 //   of this software and associated documentation files (the "Software"), to deal
@@ -24,167 +23,140 @@
 //   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 //   THE SOFTWARE.
 //
-//    Keeps track of the application's states
-//	 Last change:	$LastChangedDate$
-//	 Revision:		$Revision$
+//   External process handling helper class.
+//
+//   Last change:  $LastChangedDate$
+//   Revision:    $Revision$
 
-// std::string
+//
+// Includes
+//
+
+//
+// Platform specific definitions and overall build options for the library.
+//
+#include <guslib/guslibbuildopts.h>
+
+//
+// C system files
+//
+
+#if GUSLIB_PLATFORM_TYPE == GUSLIB_PLATFORM_TYPE_WINDOWS
+// Add support for reading registry keys
+#  include <windows.h>
+#endif  // GUSLIB_PLATFORM_TYPE == GUSLIB_PLATFORM_TYPE_WINDOWS
+
+//
+// C++ system files
+//
+
+// Allow use of std::string
 #include <string>
-// std::map
-#include <map>
-// std::stack
-#include <stack>
 
-// open input system keys.
-#include <OIS.h>
+namespace guslib
+{
+  ///
+  ///  Helper class to store the names used by WinCC OA
+  ///
+  namespace procrun
+  {
+    /**
+      Execute a process (external application). The output is not captured.
+      @param process_to_execute The external application or command to run.
+      @param maximum_timeout_in_millis The maximum amount of time that the process is allowed to run for.
+             Using "-1" results in an infinite value being used.
+      @return The return code of the external application. (Forwarded).
+    */
+    GUSLIB_EXPORT_SYMBOL int ExecuteProcessAndWait(const std::string& process_to_execute, int maximum_timeout_in_millis);
 
-// using the singleton
-#include <guslib/common/singleton.hpp>
+    /**
+      Execute a process (external application) and capture the outptu. The main goal is to launch
+      external applications or tools that output data to the console. That output is captured and
+      provided to the user.
+      @param process_to_execute The external application or command to run.
+      @param process_visible Specifies whether the launched process is shown to the user or not
+             (if it has a GUI/console)
+      @param retrieve_output Specifies whether the console output of the launched process needs to be captured.
+      @param maximum_timeout_in_millis The maximum amount of time that the process is allowed to run for.
+             Using "-1" results in an infinite value being used.
+      @param[out] output_code The return code of the external application. (Forwarded).
+      @return The captured output (if captured). An empty string is returned if no capturing is taking place.
+    */
+    GUSLIB_EXPORT_SYMBOL std::string ExecuteProcessWithOutputCaptureAndWait(
+        const std::string& process_to_execute,
+        bool process_visible,
+        bool retrieve_output,
+        int maximum_timeout_in_millis,
+        int& output_code);
 
-// using the Configuration for the optional parameter send op.
-#include <guslib/util/Configuration.h>
+    /**
+      Get the host name of the local computer.
+    */
+    GUSLIB_EXPORT_SYMBOL std::string GetLocalHostName();
 
-namespace app
-{
-	// fwd class defs.
-	class SerpEngine;
+#if GUSLIB_PLATFORM_TYPE == GUSLIB_PLATFORM_TYPE_WINDOWS
+    /**
+      Execute a process (external application) and capture the outptu. The main goal is to launch
+      external applications or tools that output data to the console. That output is captured and
+      provided to the user.
+      @param process_to_execute The external application or command to run.
+      @param process_visible Specifies whether the launched process is shown to the user or not
+             (if it has a GUI/console)
+      @param retrieve_output Specifies whether the console output of the launched process needs to be captured.
+      @param maximum_timeout_in_millis The maximum amount of time that the process is allowed to run for.
+             Using "-1" results in an infinite value being used.
+      @param[out] output_code The return code of the external application. (Forwarded).
+      @return The captured output (if captured). An empty string is returned if no capturing is taking place.
+    */
+    GUSLIB_EXPORT_SYMBOL std::string ExecuteProcessWithOutputCaptureAndWaitWindows(
+        const std::string& process_to_execute,
+        bool process_visible,
+        bool retrieve_output,
+        int maximum_timeout_in_millis,
+        int& output_code);
 
-	/**
-		Parameter class/structure that can be passed to a state.
-	*/
-	class SerpStateParams
-	{
-	protected:
-		guslib::Configuration cfg_;
+    /**
+      Wait for a process to be terminated.
+      @param process_handle The HANDLE object to wait for.
+      @param timeout_in_millis The maximum allowed timeout duration. If set to -1, an infinite timeout is considered.
+    */
+    GUSLIB_EXPORT_SYMBOL void WaitForProcessTerminationByHandle(HANDLE process_handle, int timeout_in_millis);
 
-	public:
-		SerpStateParams ();
-		SerpStateParams (guslib::Configuration& rhs);
-		guslib::Configuration& getConfig () { return cfg_; }
-		const guslib::Configuration& getConstConfig () const { return cfg_; }
-	};
+    /**
+      Retrieve the return code of the process.
+      (everything must already be set-up properly by the time you call this function)
+    */
+    GUSLIB_EXPORT_SYMBOL int GetProcessReturnCode(HANDLE process_handle);
 
+    /**
+      Retrieve the content of the pipe, reading from the given handle.
+      (everything must already be set-up properly by the time you call this function)
+      @param process_handle The Handle to the process to read from.
+      @param keep_standard_output If set to TRUE, the pipe content will also be pushed to
+      the standard output (console). If set to FALSE, the pipe content will be completely
+      captured.
+    */
+    GUSLIB_EXPORT_SYMBOL std::string ReadPipeContent(HANDLE process_handle, bool keep_standard_output);
 
-	/**
-		A basic state class. Different application states should specialize extending this state.
-	*/
-	class SerpState
-	{
-	protected:
-		std::string name_;
+    /**
+      Get the machine name of the current host.
+    */
+    GUSLIB_EXPORT_SYMBOL std::string GetLocalHostNameWindows();
 
-		SerpState (const std::string& name, SerpEngine* ptr = 0)
-			: name_ (name)
-			, enginePtr_ (ptr)
-		{ }
+#elif GUSLIB_PLATFORM_TYPE == GUSLIB_PLATFORM_TYPE_LINUX
+    GUSLIB_EXPORT_SYMBOL std::string ExecuteProcessWithOutputCaptureAndWaitLinux(
+        const std::string& process_to_execute,
+        bool retrieve_output,
+        int maximum_timeout_in_millis,
+        int& output_code);
 
-		SerpEngine* enginePtr_;
-	public:
-		// Handle state initialization.
-		virtual void enter (const SerpStateParams& param) = 0;
+    GUSLIB_EXPORT_SYMBOL int ExecuteProcessAndWaitLinux(const std::string& process_to_execute);
 
-		// Handle state control release.
-		virtual void exit () = 0;
+    /**
+      Get the machine name of the current host.
+    */
+    GUSLIB_EXPORT_SYMBOL std::string GetLocalHostNameLinux();
 
-		// Suspend the current state. Should most likely be resumed later on.
-		virtual void pause () = 0;
-
-		// Resume a suspended state.
-		virtual void resume () = 0;
-
-		// Handle input
-		virtual void reactToKeyPress (OIS::KeyCode keycode) = 0;
-		virtual void reactToKeyRelease (OIS::KeyCode keycode) = 0;
-
-		virtual void reactToMouseMoved (int x, int y) = 0;
-		virtual void reactToMousePressed (const OIS::MouseButtonID& btn, int x, int y) = 0;
-		virtual void reactToMouseReleased (const OIS::MouseButtonID& btn, int x, int y) = 0;
-
-		//
-		virtual bool handleLogicThreadLoop () = 0;
-
-		// Render the 3D scene.
-		virtual bool renderScene () = 0;
-
-		// Render the GUI.
-		virtual bool renderGUI () = 0;
-
-		virtual void notifyOfShutdown () = 0;
-
-		virtual const std::string& getName () const { return name_; }
-	};
-
-	/**
-		Listener for the state manager
-	*/
-	class SerpStateManagerListener
-	{
-	public:
-		virtual void OnStateStackEmpty () = 0;
-	};
-
-
-
-	typedef std::map <std::string, SerpState*> SerpStateMap;
-	typedef std::stack <std::string> SerpStateStack; // this is the state stack
-
-
-	/**
-		Class that handles the game's possible states.
-	*/
-	class SerpStateManagerUtil
-	{
-	private:
-		//	the internal states vector. States can changed as well as pushed and popped.
-		SerpStateMap states_;
-		SerpStateStack stateStack_;
-
-		SerpStateManagerListener * listenerPtr_;
-
-		std::string nextSetState_;
-		std::string nextPushState_;
-
-		int nextPopState_;
-		SerpStateParams paramsForNextState_;
-
-		void internalPushState (const std::string& state, const SerpStateParams& params);
-		/**
-			Set the state to use. This is an internal function that doesn't use any locking.
-			Don't call or make available externally.
-		*/
-		void internalSetState (const std::string& state, const SerpStateParams& params);
-		void internalPopState ();
-	public:
-		SerpStateManagerUtil ();
-
-		virtual ~SerpStateManagerUtil ();
-
-		virtual bool addState (const SerpState * state);
-
-		virtual void setListener (const SerpStateManagerListener * aListener);
-
-        virtual void setStateNextTick (const std::string& state, const SerpStateParams& params);
-		virtual void pushStateNextTick (const std::string& state, const SerpStateParams& params);
-		virtual void popStateNextTick ();
-
-
-		virtual void reactToKeyPress (const OIS::KeyCode& keycode);
-		virtual void reactToKeyRelease (const OIS::KeyCode& keycode);
-
-		virtual void reactToMouseMoved (int x, int y);
-		virtual void reactToMousePressed (const OIS::MouseButtonID& btn, int x, int y);
-		virtual void reactToMouseReleased (const OIS::MouseButtonID& btn, int x, int y);
-
-		virtual bool handleLogicThreadLoop();
-
-		virtual bool renderScene();
-		virtual bool renderGUI();
-
-		virtual void setShutdown();
-	};
-
-	typedef guslib::Singleton<app::SerpStateManagerUtil> SerpStateManager;
-
+#endif  // GUSLIB_PLATFORM_TYPE == GUSLIB_PLATFORM_TYPE_LINUX
+  };
 }
-
-#endif