[Orxonox-commit 2791] r7494 - in code/trunk/src: modules/pickup orxonox/interfaces orxonox/pickup
dafrick at orxonox.net
dafrick at orxonox.net
Tue Sep 28 17:32:00 CEST 2010
Author: dafrick
Date: 2010-09-28 17:31:59 +0200 (Tue, 28 Sep 2010)
New Revision: 7494
Added:
code/trunk/src/orxonox/interfaces/PickupCarrier.cc
Modified:
code/trunk/src/modules/pickup/CollectiblePickup.cc
code/trunk/src/modules/pickup/CollectiblePickup.h
code/trunk/src/modules/pickup/DroppedPickup.cc
code/trunk/src/modules/pickup/Pickup.cc
code/trunk/src/modules/pickup/Pickup.h
code/trunk/src/modules/pickup/PickupCollection.cc
code/trunk/src/modules/pickup/PickupCollection.h
code/trunk/src/modules/pickup/PickupCollectionIdentifier.cc
code/trunk/src/modules/pickup/PickupCollectionIdentifier.h
code/trunk/src/modules/pickup/PickupManager.cc
code/trunk/src/modules/pickup/PickupSpawner.h
code/trunk/src/orxonox/interfaces/CMakeLists.txt
code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc
code/trunk/src/orxonox/interfaces/PickupCarrier.h
code/trunk/src/orxonox/interfaces/Pickupable.cc
code/trunk/src/orxonox/interfaces/Pickupable.h
code/trunk/src/orxonox/pickup/PickupIdentifier.cc
code/trunk/src/orxonox/pickup/PickupIdentifier.h
Log:
Some documenting and cleaning up/re-organization in pickups module.
Modified: code/trunk/src/modules/pickup/CollectiblePickup.cc
===================================================================
--- code/trunk/src/modules/pickup/CollectiblePickup.cc 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/modules/pickup/CollectiblePickup.cc 2010-09-28 15:31:59 UTC (rev 7494)
@@ -34,6 +34,7 @@
#include "CollectiblePickup.h"
#include "core/CoreIncludes.h"
+
#include "PickupCollection.h"
namespace orxonox {
Modified: code/trunk/src/modules/pickup/CollectiblePickup.h
===================================================================
--- code/trunk/src/modules/pickup/CollectiblePickup.h 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/modules/pickup/CollectiblePickup.h 2010-09-28 15:31:59 UTC (rev 7494)
@@ -45,7 +45,7 @@
@brief
The CollectiblePickup class encompasses all @ref orxonox::Pickupable "Pickupables" that can be added to a @ref orxonox::PickupCollection "PickupCollection" and thus be part of such.
- All you need to do to make your @ref orxonox:.Pickupable "Pickupable" a CollectiblePickup is to, in some way, inherit from it. (The @ref orxonox::Pickup Pickup class, for example, is already a CollectiblePickup).
+ All you need to do to make your @ref orxonox::Pickupable "Pickupable" a CollectiblePickup is to, in some way, inherit from it. (The @ref orxonox::Pickup "Pickup" class, for example, is already a CollectiblePickup).
@author
Damian 'Mozork' Frick
@@ -62,11 +62,11 @@
/**
@brief Check whether the given CollectiblePickup is par of a PickupCollection.
- @return Returns true if the ColelctiblePickup is part of a PickupCollection.
+ @return Returns true if the CollectiblePickup is part of a PickupCollection.
*/
bool isInCollection(void)
{ return this->isInCollection_; }
-
+
bool addToCollection(PickupCollection* collection); //!< Adds this CollectiblePickup to the input PickupCollection.
bool removeFromCollection(void); //!< Removes this CollectiblePickup from its PickupCollection.
@@ -74,7 +74,7 @@
protected:
virtual void preDestroy(void); //!< Is called by OrxonoxClass::destroy() before the object is actually destroyed.
- virtual void destroyPickup(void); //!< //!< Destroys a Pickupable.
+ virtual void destroyPickup(void); //!< Destroys a Pickupable.
private:
bool isInCollection_; //!< True if the CollectiblePickup is in a PickupCollection.
Modified: code/trunk/src/modules/pickup/DroppedPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/DroppedPickup.cc 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/modules/pickup/DroppedPickup.cc 2010-09-28 15:31:59 UTC (rev 7494)
@@ -34,9 +34,9 @@
#include "DroppedPickup.h"
#include "core/CoreIncludes.h"
+
#include "interfaces/Pickupable.h"
#include "interfaces/PickupCarrier.h"
-#include "graphics/Model.h"
namespace orxonox
{
Modified: code/trunk/src/modules/pickup/Pickup.cc
===================================================================
--- code/trunk/src/modules/pickup/Pickup.cc 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/modules/pickup/Pickup.cc 2010-09-28 15:31:59 UTC (rev 7494)
@@ -35,11 +35,11 @@
#include "core/CoreIncludes.h"
#include "util/StringUtils.h"
+
#include "pickup/PickupIdentifier.h"
+
#include "DroppedPickup.h"
-#include "tools/Timer.h"
-
namespace orxonox
{
@@ -50,6 +50,12 @@
CreateUnloadableFactory(Pickup);
+ /**
+ @brief
+ Constructor. Registers and initializes the object.
+ @param creator
+ The objects creator.
+ */
Pickup::Pickup(BaseObject* creator) : BaseObject(creator)
{
RegisterObject(Pickup);
@@ -57,6 +63,10 @@
this->initialize();
}
+ /**
+ @brief
+ Destructor.
+ */
Pickup::~Pickup()
{
@@ -157,7 +167,7 @@
}
else
{
- COUT(1) << "Invalid activationType in pickup." << std::endl;
+ COUT(1) << "Invalid activationType '" << type << "' in pickup." << std::endl;
}
}
@@ -179,7 +189,7 @@
}
else
{
- COUT(1) << "Invalid durationType in pickup." << std::endl;
+ COUT(1) << "Invalid durationType '" << type << "' in pickup." << std::endl;
}
}
@@ -192,18 +202,16 @@
{
SUPER(Pickup, changedPickedUp);
- //! Sets the Pickup to used if the Pickup has activation type 'immediate' and gets picked up.
+ // Sets the Pickup to used if the Pickup has activation type 'immediate' and gets picked up.
if(this->isPickedUp() && this->isImmediate())
- {
this->setUsed(true);
- }
}
/**
@brief
- Creates a duplicate of the Pickup.
- @return
- Returns the clone of this pickup as a pointer to a Pickupable.
+ Creates a duplicate of the OrxonoxClass.
+ @param item
+ A reference to the pointer of the item that we're duplicating.
*/
void Pickup::clone(OrxonoxClass*& item)
{
Modified: code/trunk/src/modules/pickup/Pickup.h
===================================================================
--- code/trunk/src/modules/pickup/Pickup.h 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/modules/pickup/Pickup.h 2010-09-28 15:31:59 UTC (rev 7494)
@@ -47,30 +47,40 @@
namespace orxonox
{
- //! Enum for the activation type.
+ //! Enum for the @ref orxonox::Pickup "Pickup" activation type.
namespace pickupActivationType
{
enum Value
{
- immediate,
- onUse,
+ immediate, //!< Means that the @ref orxonox::Pickup "Pickup" will be used immediately after pickup.
+ onUse, //!< Means that the @ref orxonox::Pickup "Pickup" will be used at a later point trough some external influence.
};
}
- //! Enum for the duration tyoe.
+ //! Enum for the @ref orxonox::Pickup "Pickup" duration type.
namespace pickupDurationType
{
enum Value
{
- once,
- continuous,
+ once, //!< Means that the @ref orxonox::Pickup "Pickup" will be used only once at a singular time instant.
+ continuous, //!< Means that the @ref orxonox::Pickup "Pickup" will be used over a continuous timespan.
};
}
/**
@brief
- Pickup class. Offers base functionality for a wide range of pickups.
- Pickups ingeriting from this class cann choose an activation type and a duration type.
+ The Pickup class offers (useful) base functionality for a wide range of pickups.
+
+ Pickups ingeriting from this class can choose an activation type and a duration type.
+ - The <b>activation type</b> deals with what happens to the Pickup as soon as it is picked up. It can either be set to <em>immediate</em>, which means that the Pickup is activated/used immediately upon being picked up. Or to <em>onUse</em>, which means, that the Pickup will be activated/used if some outside entity (most commonly the player through the PickupInventory) decides to use it.
+ - The <b>duration type</b> deals with whether the Pickup has a continuous effect or whether its effect is focused on a singular instant. It can either be set to <em>once</em>, which means, that the Pickup just has an effect (at a singular instant in time) and is done once that effect has been applied. Or to <em>continuous</em>, which means that the effect of the Pickup unfolds over some timespan.
+
+ If it were not an abstract class it could for example be used as follows in XML.
+ @code
+ <Pickup activationType="onUse" durationType="continuous" />
+ @endcode
+ In reality you can (naturally) use the parameters <b>activation type</b> and <b>duration type</b> in any pickup inheriting from Pickup, unless the pickup already specifies one (or both) of the parameters.
+
@author
Damian 'Mozork' Frick
*/
@@ -84,20 +94,20 @@
virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
/**
- @brief Get the activation type of the pickup.
- @return Returns the activation type of the pickup.
+ @brief Get the activation type of the Pickup.
+ @return Returns the activation type of the Pickup.
*/
inline pickupActivationType::Value getActivationTypeDirect(void)
{ return this->activationType_; }
/**
- @brief Get the duration type of the pickup.
- @return Returns the duration type of the pickup.
+ @brief Get the duration type of the Pickup.
+ @return Returns the duration type of the Pickup.
*/
inline pickupDurationType::Value getDurationTypeDirect(void)
{ return this->durationType_; }
- const std::string& getActivationType(void); //!< Get the activation type of the pickup.
- const std::string& getDurationType(void); //!< Get the duration type of the pickup.
+ const std::string& getActivationType(void); //!< Get the activation type of the Pickup.
+ const std::string& getDurationType(void); //!< Get the duration type of the Pickup.
/**
@brief Get whether the activation type is 'immediate'.
@@ -126,7 +136,7 @@
virtual void changedPickedUp(void); //!< Should be called when the pickup has transited from picked up to dropped or the other way around.
- virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the Pickup.
+ virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the OrxonoxClass.
protected:
void initializeIdentifier(void);
@@ -134,26 +144,26 @@
virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
/**
- @brief Set the activation type of the pickup.
- @param type The activation type of the pickup.
+ @brief Set the activation type of the Pickup.
+ @param type The activation type of the Pickup.
*/
inline void setActivationTypeDirect(pickupActivationType::Value type)
{ this->activationType_ = type; }
/**
- @brief Set the duration type of the pickup.
- @param type The duration type of the pickup.
+ @brief Set the duration type of the Pickup.
+ @param type The duration type of the Pickup.
*/
inline void setDurationTypeDirect(pickupDurationType::Value type)
{ this->durationType_ = type; }
- void setActivationType(const std::string& type); //!< Set the activation type of the pickup.
- void setDurationType(const std::string& type); //!< Set the duration type of the pickup
+ void setActivationType(const std::string& type); //!< Set the activation type of the Pickup.
+ void setDurationType(const std::string& type); //!< Set the duration type of the Pickup.
private:
void initialize(void); //!< Initializes the member variables.
pickupActivationType::Value activationType_; //!< The activation type of the Pickup.
- pickupDurationType::Value durationType_; //!< The duration type of the pickup.
+ pickupDurationType::Value durationType_; //!< The duration type of the Pickup.
//! Strings for the activation and duration types.
static const std::string activationTypeImmediate_s;
Modified: code/trunk/src/modules/pickup/PickupCollection.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupCollection.cc 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/modules/pickup/PickupCollection.cc 2010-09-28 15:31:59 UTC (rev 7494)
@@ -33,7 +33,9 @@
#include "core/CoreIncludes.h"
#include "core/XMLPort.h"
+
#include "interfaces/PickupCarrier.h"
+
#include "CollectiblePickup.h"
#include "DroppedPickup.h"
#include "PickupCollectionIdentifier.h"
@@ -48,6 +50,8 @@
/**
@brief
Default Constructor.
+ @param creator
+ The creator of the object.
*/
PickupCollection::PickupCollection(BaseObject* creator) : BaseObject(creator)
{
@@ -200,7 +204,7 @@
/**
@brief
- Creates a duplicate of the input OrxonoxClass.
+ Creates a duplicate of the input Pickupable.
This method needs to be implemented by any Class inheriting from Pickupable.
@param item
A reference to a pointer to the OrxonoxClass that is to be duplicated.
Modified: code/trunk/src/modules/pickup/PickupCollection.h
===================================================================
--- code/trunk/src/modules/pickup/PickupCollection.h 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/modules/pickup/PickupCollection.h 2010-09-28 15:31:59 UTC (rev 7494)
@@ -47,7 +47,21 @@
/**
@brief
- The PickupCollection combines different Pickupables to a coherent, single pickup and makes them seem (from the outside looking in) just as if they were just one Pickupable.
+ The PickupCollection combines different @ref orxonox::Pickupable "Pickupables" (more precisely @ref orxonox::CollectiblePickup "CollectiblePickups") to a coherent, single pickup and makes them seem (from the outside looking in) just as if they were just one @ref orxonox::Pickupable "Pickupable".
+
+ To differentiate between different types of @ref orxonox::PickupCollection "PickupCollections" (just as we differentiate between different types of @ref orxonox::Pickupable "Pickupables") we define a new identifyer called the @ref orxonox::PickupCollectionIdentifier "PickupCollectionIdentifier" which has pretty much the same properties as the @ref orxonox::PickupIdentifier "PickupIdentifier" but extende to @ref orxonox::PickupCollection "PickupCollections".
+
+ A PickupCollection can be created in XML as follows:
+ @code
+ <PickupCollection>
+ <pickupables>
+ <CollectiblePickup ... />
+ ...
+ <CollectiblePickup ... />
+ </pickupables>
+ </PickupCollection>
+ @endcode
+
@author
Damian 'Mozork' Frick
*/
@@ -64,7 +78,7 @@
virtual void changedCarrier(void); //!< Is called when the pickup has changed its PickupCarrier.
virtual void changedPickedUp(void); //!< Is called when the pickup has transited from picked up to dropped or the other way around.
- virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
+ virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input pickup.
virtual bool isTarget(PickupCarrier* carrier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this PickupCollection.
@@ -87,7 +101,7 @@
private:
void changedUsedAction(void); //!< Helper method.
void changedPickedUpAction(void); //!< Helper method.
-
+
std::vector<CollectiblePickup*> pickups_; //!< The list of the pointers of all the Pickupables this PickupCollection consists of. They are weak pointers to facilitate testing, whether the pointers are still valid.
unsigned int usedCounter_; //!< Keeps track of the number of pickups of this PickupCollection, that are in use.
Modified: code/trunk/src/modules/pickup/PickupCollectionIdentifier.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupCollectionIdentifier.cc 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/modules/pickup/PickupCollectionIdentifier.cc 2010-09-28 15:31:59 UTC (rev 7494)
@@ -66,9 +66,11 @@
*/
int PickupCollectionIdentifier::compare(const PickupIdentifier* identifier) const
{
+ assert(identifier);
+
// Slight un-niceity to cast the PickupIdentifier to a PickupCollectionIdentifier.
PickupIdentifier* temp = const_cast<PickupIdentifier*>(identifier);
- const PickupCollectionIdentifier* collectionIdentifier = dynamic_cast<PickupCollectionIdentifier*>(temp);
+ const PickupCollectionIdentifier* collectionIdentifier = orxonox_cast<PickupCollectionIdentifier*>(temp);
// If the input PickupIdentifier 'identifier' is no PickupCollectionIdentifier then just the two PickupIdentifiers are compared.
if(collectionIdentifier == NULL)
@@ -91,7 +93,7 @@
return 1;
}
- //! Means they are equal.
+ // Means they are equal.
return 0;
}
Modified: code/trunk/src/modules/pickup/PickupCollectionIdentifier.h
===================================================================
--- code/trunk/src/modules/pickup/PickupCollectionIdentifier.h 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/modules/pickup/PickupCollectionIdentifier.h 2010-09-28 15:31:59 UTC (rev 7494)
@@ -37,18 +37,19 @@
#include "PickupPrereqs.h"
+#include <set>
+
#include "pickup/PickupIdentifier.h"
-#include <set>
-
namespace orxonox
{
/**
@brief
- The PickupCollectionIdentifier is the specialization of the PickupIdentifier for the PickupCollection class.
- It identifies PickupCollections based on the different Pickupables they consist of.
- Pickupables can be added to the PickupCollectionIdentifier via the addPickup method.
+ The PickupCollectionIdentifier is the specialization of the PickupIdentifier for the @ref orxonox::PickupCollection "PickupCollection" class.
+ It identifies @ref orxonox::PickupCollection "PickupCollections" based on the different @ref orxonox::CollectiblePickup "CollectiblePickups" they consist of.
+
+ @ref orxonox::Pickupable "Pickupables" (resp. @ref orxonox::CollectiblePickup "CollectiblePickups") can be added to the PickupCollectionIdentifier via the addPickup method.
@author
Damian 'Mozork' Frick
*/
@@ -61,10 +62,10 @@
virtual int compare(const PickupIdentifier* identifier) const; //!< Compares a PickupCollectionIdentifier with a PickupIdentifier.
- void addPickup(const PickupIdentifier* identifier); //!< Add a Pickupable to the PickupCollectionIdentifier.
+ void addPickup(const PickupIdentifier* identifier); //!< Add a @ref orxonox::Pickupable "Pickupable" to the PickupCollectionIdentifier.
private:
- std::set<const PickupIdentifier*, PickupIdentifierCompare> identifiers_; //!< The set of PickupIdentifiers of the Pickupables the PickupCollection with this PickupCollectionIdentifier consists of, ordered by the rule set by PickupIdentifierCompare.
+ std::set<const PickupIdentifier*, PickupIdentifierCompare> identifiers_; //!< The set of PickupIdentifiers of the @ref orxonox::Pickupable "Pickupables", the @ref orxonox::PickupCollection "PickupCollection" with this PickupCollectionIdentifier consists of, ordered by the rule set by @ref orxonox::PickupIdentifierCompare "PickupIdentifierCompare".
};
Modified: code/trunk/src/modules/pickup/PickupManager.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupManager.cc 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/modules/pickup/PickupManager.cc 2010-09-28 15:31:59 UTC (rev 7494)
@@ -20,7 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Author:
- * ...
+ * Damian 'Mozork' Frick
* Co-authors:
* ...
*
@@ -99,12 +99,15 @@
*/
bool PickupManager::registerRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation)
{
- if(identifier == NULL || representation == NULL || this->representations_.find(identifier) != this->representations_.end()) //!< If the Pickupable already has a Representation registered.
+ assert(identifier);
+ assert(representation);
+
+ if(this->representations_.find(identifier) != this->representations_.end()) // If the Pickupable already has a Representation registered.
return false;
this->representations_[identifier] = representation;
- COUT(4) << "PickupRepresentation " << representation << " registered with the PickupManager." << std::endl;
+ COUT(4) << "PickupRepresentation &" << representation << " registered with the PickupManager." << std::endl;
return true;
}
@@ -120,8 +123,8 @@
*/
bool PickupManager::unregisterRepresentation(const PickupIdentifier* identifier, PickupRepresentation* representation)
{
- if(identifier == NULL || representation == NULL)
- return false;
+ assert(identifier);
+ assert(representation);
std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare>::iterator it = this->representations_.find(identifier);
if(it == this->representations_.end()) //!< If the Pickupable is not registered in the first place.
@@ -129,7 +132,7 @@
this->representations_.erase(it);
- COUT(4) << "PickupRepresentation " << representation << " unregistered with the PickupManager." << std::endl;
+ COUT(4) << "PickupRepresentation &" << representation << " unregistered with the PickupManager." << std::endl;
return true;
}
@@ -166,7 +169,7 @@
{
if(pickup != NULL)
return this->getRepresentation(pickup->getPickupIdentifier());
-
+
return NULL;
}
@@ -267,7 +270,7 @@
{
if(pickup == NULL)
return;
-
+
std::map<Pickupable*, WeakPtr<Pickupable> >::iterator it = this->pickupsList_.find(pickup); // Get the WeakPointer of the Pickupable.
// If either the input Pickupable is not in the PickupManagers list or it no longer exists, the method returns.
if(it == this->pickupsList_.end() || it->second.get() == NULL)
Modified: code/trunk/src/modules/pickup/PickupSpawner.h
===================================================================
--- code/trunk/src/modules/pickup/PickupSpawner.h 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/modules/pickup/PickupSpawner.h 2010-09-28 15:31:59 UTC (rev 7494)
@@ -50,8 +50,10 @@
@brief
The PickupSpawner class is responsible for spawning pickups of a specific type.
Forthermore it can be specified how long the time interval between spawning two items is and how many pickups are spawned at maximum, amongst other things.
+
@author
Daniel 'Huty' Haggenmueller
+ @author
Damian 'Mozork' Frick
*/
class _PickupExport PickupSpawner : public StaticEntity, public Tickable
Modified: code/trunk/src/orxonox/interfaces/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/interfaces/CMakeLists.txt 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/orxonox/interfaces/CMakeLists.txt 2010-09-28 15:31:59 UTC (rev 7494)
@@ -1,5 +1,6 @@
ADD_SOURCE_FILES(ORXONOX_SRC_FILES
InterfaceCompilation.cc
Pickupable.cc
+ PickupCarrier.cc
RadarViewable.cc
)
Modified: code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc 2010-09-28 15:31:59 UTC (rev 7494)
@@ -33,7 +33,6 @@
*/
#include "GametypeMessageListener.h"
-#include "PickupCarrier.h"
#include "PlayerTrigger.h"
#include "RadarListener.h"
#include "Rewardable.h"
@@ -53,38 +52,6 @@
}
//----------------------------
- // PickupCarrier
- //----------------------------
- PickupCarrier::PickupCarrier()
- {
- RegisterRootObject(PickupCarrier);
- }
-
- PickupCarrier::~PickupCarrier()
- {
-
- }
-
- void PickupCarrier::preDestroy(void)
- {
- std::set<Pickupable*>::iterator it = this->pickups_.begin();
- std::set<Pickupable*>::iterator temp;
- while(it != this->pickups_.end())
- {
- (*it)->carrierDestroyed();
- temp = it;
- it = this->pickups_.begin();
- if(it == temp) // Infinite loop avoidance, in case the pickup wasn't removed from the carrier somewhere in the carrierDestroy() procedure.
- {
- COUT(2) << "Oops. In a PickupCarrier, while cleaning up, a Pickupable (&" << (*temp) << ") didn't unregister itself as it should have." << std::endl;;
- it++;
- }
- }
-
- this->pickups_.clear();
- }
-
- //----------------------------
// PlayerTrigger
//----------------------------
PlayerTrigger::PlayerTrigger()
Added: code/trunk/src/orxonox/interfaces/PickupCarrier.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/PickupCarrier.cc (rev 0)
+++ code/trunk/src/orxonox/interfaces/PickupCarrier.cc 2010-09-28 15:31:59 UTC (rev 7494)
@@ -0,0 +1,168 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Damian 'Mozork' Frick
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file PickupCarrier.cc
+ @brief Implementation of the PickupCarrier class.
+*/
+
+#include "PickupCarrier.h"
+
+#include "core/CoreIncludes.h"
+#include "core/Identifier.h"
+#include "Pickupable.h"
+
+namespace orxonox {
+
+ /**
+ @brief
+ Constructor. Registers the object.
+ */
+ PickupCarrier::PickupCarrier()
+ {
+ RegisterRootObject(PickupCarrier);
+ }
+
+ /**
+ @brief
+ Destructor.
+ */
+ PickupCarrier::~PickupCarrier()
+ {
+
+ }
+
+ /**
+ @brief
+ Is called before the PickupCarrier is effectively destroyed.
+ */
+ void PickupCarrier::preDestroy(void)
+ {
+ std::set<Pickupable*>::iterator it = this->pickups_.begin();
+ std::set<Pickupable*>::iterator temp;
+ while(it != this->pickups_.end())
+ {
+ (*it)->carrierDestroyed();
+ temp = it;
+ it = this->pickups_.begin();
+ if(it == temp) // Infinite loop avoidance, in case the pickup wasn't removed from the carrier somewhere in the carrierDestroy() procedure.
+ {
+ COUT(2) << "Oops. In a PickupCarrier, while cleaning up, a Pickupable (&" << (*temp) << ") didn't unregister itself as it should have." << std::endl;;
+ it++;
+ }
+ }
+
+ this->pickups_.clear();
+ }
+
+ /**
+ @brief
+ Can be used to check whether the PickupCarrier or a child of his is a target ot the input Pickupable.
+ @param pickup
+ A pointer to the Pickupable.
+ @return
+ Returns true if the PickupCarrier or one of its children is a target, false if not.
+ */
+ bool PickupCarrier::isTarget(const Pickupable* pickup)
+ {
+ if(pickup->isTarget(this)) // If the PickupCarrier itself is a target.
+ return true;
+
+ // Go recursively through all children to check whether they are a target.
+ std::vector<PickupCarrier*>* children = this->getCarrierChildren();
+ for(std::vector<PickupCarrier*>::const_iterator it = children->begin(); it != children->end(); it++)
+ {
+ if((*it)->isTarget(pickup))
+ return true;
+ }
+
+ children->clear();
+ delete children;
+
+ return false;
+ }
+
+ /**
+ @brief
+ Get the carrier that is both a child of the PickupCarrier (or the PickupCarrier itself) and a target of the input Pickupable.
+ @param pickup
+ A pounter to the Pickupable.
+ @return
+ Returns a pointer to the PickupCarrier that is the target of the input Pickupable.
+ */
+ PickupCarrier* PickupCarrier::getTarget(const Pickupable* pickup)
+ {
+ if(!this->isTarget(pickup))
+ return NULL;
+
+ if(pickup->isTarget(this)) // If the PickupCarrier itself is a target.
+ return this;
+
+ // Go recursively through all children to check whether they are the target.
+ std::vector<PickupCarrier*>* children = this->getCarrierChildren();
+ for(std::vector<PickupCarrier*>::iterator it = children->begin(); it != children->end(); it++)
+ {
+ if(pickup->isTarget(*it))
+ return *it;
+ }
+
+ children->clear();
+ delete children;
+
+ return NULL;
+ }
+
+ /**
+ @brief
+ Adds a Pickupable to the list of pickups that are carried by this PickupCarrier.
+ @param pickup
+ A pointer to the pickup to be added.
+ @return
+ Returns true if successfull, false if the Pickupable was already present.
+ */
+ bool PickupCarrier::addPickup(Pickupable* pickup)
+ {
+ COUT(4) << "Adding Pickupable (&" << pickup << ") to PickupCarrier (&" << this << ")" << std::endl;
+ return this->pickups_.insert(pickup).second;
+ }
+
+ /**
+ @brief
+ Removes a Pickupable from the list of pickups that are carried by this PickupCarrier.
+ @param pickup
+ A pointer to the pickup to be removed.
+ @return
+ Returns true if successfull, false if the Pickupable was not present in the list.
+ */
+ bool PickupCarrier::removePickup(Pickupable* pickup)
+ {
+ COUT(4) << "Removing Pickupable (&" << pickup << ") from PickupCarrier (&" << this << ")" << std::endl;
+ return this->pickups_.erase(pickup) == 1;
+ }
+
+}
Modified: code/trunk/src/orxonox/interfaces/PickupCarrier.h
===================================================================
--- code/trunk/src/orxonox/interfaces/PickupCarrier.h 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/orxonox/interfaces/PickupCarrier.h 2010-09-28 15:31:59 UTC (rev 7494)
@@ -37,18 +37,15 @@
#include "OrxonoxPrereqs.h"
-#include <list>
#include <set>
-#include "Pickupable.h"
-#include "core/Identifier.h"
-#include "core/WeakPtr.h"
+#include <vector>
#include "core/OrxonoxClass.h"
namespace orxonox
{
- //! Forward-declarations.
+ // Forward-declarations.
class PickupManager;
class Pickup;
class HealthPickup;
@@ -59,16 +56,25 @@
/**
@brief
- The PickupCarrier interface provides the means, for any class implementing it, to possess Pickupables.
+ The PickupCarrier interface provides the means, for any class implementing it, to possess @ref orxonox::Pickupable "Pickupables".
+
+ For a class to use the PickupCarrier interface it must implement the follwing three methods:
+ - <b>getCarrierPosition()</b> The getCarrierPosition() method returns the absolute position (in space) of the PickupCarrier.
+
+ Different PickupCarriers are structured hierarchically, a pickup can be picked up by a PickupCarrier that can't really carry that particular pickup but one of its children (or one of their children) can, and thus it gets "handed down" until it is at the right place.
+ But this structure has to be established first.
+ - <b>getCarrierChildren()</b> To this end a PickupCarrier needs to implement getCarrierChildren() which returns a list of its direct PickupCarrier children. If you need an example, have a look at @ref orxonox::Pawn "Pawn" and @ref orxonx::Engine "Engine".
+ - <b>getCarrierParent()</b> This is the method in the other direction. It returns the parent of this PickupCarrier, or NULL if the PickupCarrier is a root node in this hierarchy.
+
@author
Damian 'Mozork' Frick
*/
class _OrxonoxExport PickupCarrier : virtual public OrxonoxClass
{
- //! So that the different Pickupables have full access to their PickupCarrier.
+ // So that the different Pickupables have full access to their PickupCarrier.
friend class Pickupable;
friend class PickupManager;
- //! Friends.
+ // Friends.
friend class Pickup;
friend class HealthPickup;
friend class InvisiblePickup;
@@ -79,60 +85,12 @@
public:
PickupCarrier(); //!< Constructor.
virtual ~PickupCarrier(); //!< Destructor.
- void preDestroy(void);
+ void preDestroy(void); //!< Is called before the PickupCarrier is effectively destroyed.
- /**
- @brief Can be used to check whether the PickupCarrier or a child of his is a target ot the input Pickupable.
- @param pickup A pointer to the Pickupable.
- @return Returns true if the PickupCarrier or one of its children is a target, false if not.
- */
- bool isTarget(const Pickupable* pickup)
- {
- if(pickup->isTarget(this)) //!< If the PickupCarrier itself is a target.
- return true;
+ bool isTarget(const Pickupable* pickup); //!< Can be used to check whether the PickupCarrier or a child of his is a target ot the input Pickupable.
+ PickupCarrier* getTarget(const Pickupable* pickup); //!< Get the carrier that is both a child of the PickupCarrier (or the PickupCarrier itself) and a target of the input Pickupable.
- //! Go recursively through all children to check whether they are a target.
- std::vector<PickupCarrier*>* children = this->getCarrierChildren();
- for(std::vector<PickupCarrier*>::const_iterator it = children->begin(); it != children->end(); it++)
- {
- if((*it)->isTarget(pickup))
- return true;
- }
-
- children->clear();
- delete children;
-
- return false;
- }
-
/**
- @brief Get the carrier that is both a child of the PickupCarrier (or the PickupCarrier itself) and a target of the input Pickupable.
- @param pickup A pounter to the Pickupable.
- @return Returns a pointer to the PickupCarrier that is the target of the input Pickupable.
- */
- PickupCarrier* getTarget(const Pickupable* pickup)
- {
- if(!this->isTarget(pickup))
- return NULL;
-
- if(pickup->isTarget(this)) //!< If the PickupCarrier itself is a target.
- return this;
-
- //! Go recursively through all children to check whether they are the target.
- std::vector<PickupCarrier*>* children = this->getCarrierChildren();
- for(std::vector<PickupCarrier*>::iterator it = children->begin(); it != children->end(); it++)
- {
- if(pickup->isTarget(*it))
- return *it;
- }
-
- children->clear();
- delete children;
-
- return NULL;
- }
-
- /**
@brief Get the (absolute) position of the PickupCarrier.
This method needs to be implemented by any direct derivative class of PickupCarrier.
@return Returns the position as a Vector3.
@@ -148,7 +106,7 @@
*/
virtual std::vector<PickupCarrier*>* getCarrierChildren(void) = 0;
/**
- @brief Get the parent of this PickupSpawner
+ @brief Get the parent of this PickupSpawner.
This method needs to be implemented by any direct derivative class of PickupCarrier.
@return Returns a pointer to the parent.
*/
@@ -164,28 +122,9 @@
private:
std::set<Pickupable*> pickups_; //!< The list of Pickupables carried by this PickupCarrier.
- /**
- @brief Adds a Pickupable to the list of pickups that are carried by this PickupCarrier.
- @param pickup A pointer to the pickup to be added.
- @return Returns true if successfull, false if the Pickupable was already present.
- */
- bool addPickup(Pickupable* pickup)
- {
- COUT(4) << "Adding Pickupable (&" << pickup << ") to PickupCarrier (&" << this << ")" << std::endl;
- return this->pickups_.insert(pickup).second;
- }
+ bool addPickup(Pickupable* pickup); //!< Adds a Pickupable to the list of pickups that are carried by this PickupCarrier.
+ bool removePickup(Pickupable* pickup); //!< Removes a Pickupable from the list of pickups that are carried by this PickupCarrier.
- /**
- @brief Removes a Pickupable from the list of pickups that are carried by thsi PickupCarrier.
- @param pickup A pointer to the pickup to be removed.
- @return Returns true if successfull, false if the Pickupable was not present in the list.
- */
- bool removePickup(Pickupable* pickup)
- {
- COUT(4) << "Removing Pickupable (&" << pickup << ") from PickupCarrier (&" << this << ")" << std::endl;
- return this->pickups_.erase(pickup) == 1;
- }
-
};
}
Modified: code/trunk/src/orxonox/interfaces/Pickupable.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/Pickupable.cc 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/orxonox/interfaces/Pickupable.cc 2010-09-28 15:31:59 UTC (rev 7494)
@@ -38,9 +38,11 @@
#include "core/Identifier.h"
#include "core/CoreIncludes.h"
#include "util/Convert.h"
+
#include "infos/PlayerInfo.h"
#include "pickup/PickupIdentifier.h"
#include "worldentities/pawns/Pawn.h"
+
#include "PickupCarrier.h"
namespace orxonox
@@ -129,6 +131,7 @@
this->used_ = used;
this->changedUsed();
+ //TODO: Synchronize & make safe for dedicated server.
GUIManager::getInstance().getLuaState()->doString("PickupInventory.update()");
return true;
}
@@ -276,6 +279,8 @@
if(!pickedUp) // if the Pickupable has been dropped it unregisters itself with its PickupCarrier.
this->getCarrier()->removePickup(this);
this->changedPickedUp();
+
+ //TODO: Synchronize & make safe for dedicated server.
GUIManager::getInstance().getLuaState()->doString("PickupInventory.update()");
return true;
}
@@ -302,7 +307,7 @@
if(!carrier->addPickup(this))
return false;
}
-
+
this->carrier_ = carrier;
this->changedCarrier();
return true;
Modified: code/trunk/src/orxonox/interfaces/Pickupable.h
===================================================================
--- code/trunk/src/orxonox/interfaces/Pickupable.h 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/orxonox/interfaces/Pickupable.h 2010-09-28 15:31:59 UTC (rev 7494)
@@ -49,6 +49,11 @@
/**
@brief
An Interface (or more precisely an abstract class) to model and represent different (all kinds of) pickups.
+
+ Pickups (@ref orxonox:Pickupable "Pickupables") are objects that (quite unsurprisingly) can be picked up. Additionally they can be used and unused (transition from used to not used), and also dropped.
+
+ A class of Pickups can incorporate many different types of pickups (see @ref orxonox::PickupIdentifier "PickupIdentifier"), each type is uniquely defined by a @ref orxonox::PickupIdentifier "PickupIdentifier". Each pickup has such an identifier identiying its type. This means that two pickups of the same type have identifiers which are equal.
+
@author
Damian 'Mozork' Frick
*/
@@ -62,24 +67,24 @@
virtual ~Pickupable(); //!< Default destructor.
/**
- @brief Get whether the pickup is currently in use or not.
- @return Returns true if the pickup is currently in use.
+ @brief Get whether the Pickupable is currently in use or not.
+ @return Returns true if the Pickupable is currently in use.
*/
inline bool isUsed(void) { return this->used_; } // tolua_export
/**
- @brief Should be called when the pickup has transited from used to unused or the other way around.
+ @brief Should be called when the Pickupable has transited from used to unused or the other way around.
Any Class overwriting this method must call its SUPER function by adding SUPER(Classname, changedUsed); to their changdeUsed method.
*/
virtual void changedUsed(void) {}
/**
- @brief Get the carrier of the pickup.
- @return Returns a pointer to the carrier of the pickup.
+ @brief Get the carrier of the Pickupable.
+ @return Returns a pointer to the carrier of the Pickupable.
*/
inline PickupCarrier* getCarrier(void)
{ return this->carrier_; }
/**
- @brief Should be called when the pickup has changed its PickupCarrier.
+ @brief Should be called when the Pickupable has changed its PickupCarrier.
Any Class overwriting this method must call its SUPER function by adding SUPER(Classname, changedCarrier); to their changedCarrier method.
*/
virtual void changedCarrier(void) {}
@@ -90,7 +95,7 @@
*/
inline bool isPickedUp(void) { return this->pickedUp_; } // tolua_export
/**
- @brief Should be called when the pickup has transited from picked up to dropped or the other way around.
+ @brief Should be called when the Pickupable has transited from picked up to dropped or the other way around.
Any Class overwriting this method must call its SUPER function by adding SUPER(Classname, changedPickedUp); to their changedPickedUp method.
*/
virtual void changedPickedUp(void) {}
@@ -118,10 +123,10 @@
bool pickup(PickupCarrier* carrier); //!< Can be called to pick up a Pickupable.
bool drop(bool createSpawner = true); //!< Can be called to drop a Pickupable.
- virtual bool isTarget(PickupCarrier* carrier) const; //!< Get whether the given PickupCarrier is a target of this pickup.
+ virtual bool isTarget(PickupCarrier* carrier) const; //!< Get whether the given PickupCarrier is a target of this Pickupable.
bool isTarget(const Identifier* identifier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this Pickupable.
- bool addTarget(PickupCarrier* target); //!< Add a PickupCarrier as target of this pickup.
- bool addTarget(Identifier* identifier); //!< Add a class, representetd by the input Identifier, as target of this pickup.
+ bool addTarget(PickupCarrier* target); //!< Add a PickupCarrier as target of this Pickupable.
+ bool addTarget(Identifier* identifier); //!< Add a class, representetd by the input Identifier, as target of this Pickupable.
Pickupable* clone(void); //!< Creates a duplicate of the Pickupable.
virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
@@ -136,12 +141,12 @@
bool setUsed(bool used); //!< Sets the Pickupable to used or unused, depending on the input.
bool setPickedUp(bool pickedUp); //!< Helper method to set the Pickupable to either picked up or not picked up.
//TODO: private?
- bool setCarrier(PickupCarrier* carrier, bool tell = true); //!< Sets the carrier of the pickup.
+ bool setCarrier(PickupCarrier* carrier, bool tell = true); //!< Sets the carrier of the Pickupable.
//TODO: private?
virtual void carrierDestroyed(void); //!< Is called by the PickupCarrier when it is being destroyed.
- void destroy(void); //!< Is called internally within the pickup module to destroy pickups.
+ void destroy(void); //!< Is called internally within the Pickupable module to destroy pickups.
protected:
/**
@@ -186,6 +191,7 @@
}; // tolua_export
+ //! SUPER functions.
SUPER_FUNCTION(10, Pickupable, changedUsed, false);
SUPER_FUNCTION(12, Pickupable, changedCarrier, false);
SUPER_FUNCTION(13, Pickupable, changedPickedUp, false);
Modified: code/trunk/src/orxonox/pickup/PickupIdentifier.cc
===================================================================
--- code/trunk/src/orxonox/pickup/PickupIdentifier.cc 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/orxonox/pickup/PickupIdentifier.cc 2010-09-28 15:31:59 UTC (rev 7494)
@@ -34,6 +34,8 @@
#include "PickupIdentifier.h"
#include "core/CoreIncludes.h"
+#include "core/Identifier.h"
+
#include "interfaces/Pickupable.h"
namespace orxonox
@@ -68,46 +70,26 @@
*/
int PickupIdentifier::compare(const PickupIdentifier* identifier) const
{
- if(identifier == NULL)
- {
- return 1;
- COUT(1) << "Error in PickupIdentifier::compare: Input Identifier is NULL." << std::endl;
- }
+ assert(identifier);
+ assert(identifier->pickup_);
+ assert(this->pickup_);
- if(identifier->pickup_ == NULL && this->pickup_ == NULL)
- {
- return 0;
- COUT(1) << "Error in PickupIdentifier::compare: Pickup stored by Identifier is NULL." << std::endl;
- }
-
- if(identifier->pickup_ == NULL)
- {
- return 1;
- COUT(1) << "Error in PickupIdentifier::compare: Pickup stored by Identifier is NULL." << std::endl;
- }
-
- if(this->pickup_ == NULL)
- {
- return -1;
- COUT(1) << "Error in PickupIdentifier::compare: Pickup stored by Identifier is NULL." << std::endl;
- }
-
- //! If the classIdentifiers are not the same (meaning the PickupIdentifiers identify different classes), the obviously the two Pickupables identified by the PickupIdentifiers cannot be the same. An ordering is established through the alphabetical ordering of the respective classnames.
+ // If the classIdentifiers are not the same (meaning the PickupIdentifiers identify different classes), the obviously the two Pickupables identified by the PickupIdentifiers cannot be the same. An ordering is established through the alphabetical ordering of the respective classnames.
if(!identifier->pickup_->getIdentifier()->isExactlyA(this->pickup_->getIdentifier()))
return this->pickup_->getIdentifier()->getName().compare(identifier->pickup_->getIdentifier()->getName());
- //! If the class is the same for both PickupIdentifiers we go on to check the parameters of the class.
- //! If the two have a different number of parameters then obviusly something is very wrong.
+ // If the class is the same for both PickupIdentifiers we go on to check the parameters of the class.
+ // If the two have a different number of parameters then obviously something is very wrong.
if(!(this->parameters_.size() == identifier->parameters_.size()))
{
COUT(1) << "Something went wrong in PickupIdentifier!" << std::endl;
return this->parameters_.size()-identifier->parameters_.size();
}
- //! We iterate through all parameters and compare their values (which are strings). The first parameter is the most significant. The ordering is once again established by the alphabetical comparison of the two value strings.
+ // We iterate through all parameters and compare their values (which are strings). The first parameter is the most significant. The ordering is once again established by the alphabetical comparison of the two value strings.
for(std::map<std::string, std::string>::const_iterator it = this->parameters_.begin(); it != this->parameters_.end(); it++)
{
- //!< If a parameter present in one of the identifiers is not found in the other, once again, something is very wrong.
+ // If a parameter present in one of the identifiers is not found in the other, once again, something is very wrong.
if(identifier->parameters_.find(it->first) == identifier->parameters_.end())
{
COUT(1) << "Something went wrong in PickupIdentifier!" << std::endl;
Modified: code/trunk/src/orxonox/pickup/PickupIdentifier.h
===================================================================
--- code/trunk/src/orxonox/pickup/PickupIdentifier.h 2010-09-27 17:53:30 UTC (rev 7493)
+++ code/trunk/src/orxonox/pickup/PickupIdentifier.h 2010-09-28 15:31:59 UTC (rev 7494)
@@ -39,7 +39,6 @@
#include <map>
#include <string>
-#include "core/Identifier.h"
#include "core/OrxonoxClass.h"
@@ -48,10 +47,15 @@
/**
@brief
- The purpose of the PickupIdentifier class is to identify different types of pickups allthough they are of the same class.
- This allows for more generic classes (or pickups in this case) that can be a number of different pickup types and can be identified as such without the need for a lot of different classes. An example is the HealthPickup class that encompasses a wide variety of different types of health pickups, e.g a HealthPickup that adds 10 health every second for 10 seconds or a HealthPickup that adds 100 health as soon as it is picked up, a.s.o.
- To that purpose this class provides functionality to compare two PickupIdentifier (and since all Pickupables have an Identifier through that Pickupables can be compared). It als provides functionality to add parameters that distinguish between different types of pickups in the same pickup class.
- Lastly a struct is provided that can be used in stl containers to establish a strictly lesser ordering between PickupIdentifiers (and thus Pickupables).
+ The purpose of the PickupIdentifier class is to identify (or differentiate between) different types of pickups although they are of the same class.
+
+ This allows for more generic classes (or pickups in this case) that can be a number of different pickup types and can be identified as such without the need for a lot of different classes.
+
+ An example is the @ref orxonox::HealthPickup "HealthPickup" class that encompasses a wide variety of different types of health pickups, e.g a @ref orxonox::HealthPickup "HealthPickup" that adds 10 health every second for 10 seconds or a @ref orxonox::HealthPickup "HealthPickup" that adds 100 health as soon as it is picked up, a.s.o.
+
+ To that purpose this class provides functionality to compare two @ref orxonox::PickupIdentifier "PickupIdentifiers" (and since all @ref orxonox::Pickupable "Pickupables" have an identifier, we can use it to compare pickups). It als provides functionality to add parameters that distinguish between different types of pickups in the same pickup class.
+
+ Lastly a struct (@ref orxonox::PickupIdentifierCompare "PickupIdentifierCompare") is provided that can be used in stl containers to establish a strictly lesser ordering between @ref orxonox::PickupIdentifier "PickupIdentifiers" (and thus @ref orxonox::Pickupable "Pickupables").
@author
Damian 'Mozork' Frick
*/
@@ -74,7 +78,7 @@
/**
@brief
- Struct that overloads the compare operation between two PickupIdentifier pointers.
+ Struct that overloads the compare operation between two @ref orxonox::PickupIdentifier "PickupIdentifier" pointers.
*/
struct PickupIdentifierCompare
{
More information about the Orxonox-commit
mailing list