Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 21, 2012, 3:51:06 PM (12 years ago)
Author:
landauf
Message:

removed Pickupable::clone() because it is not needed anymore

Location:
code/branches/presentation2012merge/src/modules/pickup/items
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.cc

    r9318 r9320  
    169169    /**
    170170    @brief
    171         Creates a duplicate of the input OrxonoxClass.
    172     @param item
    173         A pointer to the Orxonox class.
    174     */
    175     void DamageBoostPickup::clone(OrxonoxClass*& item)
    176     {
    177         if(item == NULL)
    178             item = new DamageBoostPickup(this);
    179 
    180         SUPER(DamageBoostPickup, clone, item);
    181 
    182         DamageBoostPickup* pickup = orxonox_cast<DamageBoostPickup*>(item);
    183         pickup->setDuration(this->getDuration());
    184         pickup->setDamageMultiplier(this->getDamageMultiplier());
    185     }
    186 
    187     /**
    188     @brief
    189171        Sets the duration for which the DamageBoostPickup stays active.
    190172    @param duration
  • code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.h

    r9318 r9320  
    5555
    5656            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    57             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    5857
    5958            /**
  • code/branches/presentation2012merge/src/modules/pickup/items/DronePickup.cc

    r9318 r9320  
    170170        return pawn;
    171171    }
    172 
    173     /**
    174     @brief
    175         Creates a duplicate of the input OrxonoxClass.
    176     @param item
    177         A pointer to the Orxonox class.
    178     */
    179     void DronePickup::clone(OrxonoxClass*& item)
    180     {
    181         if(item == NULL)
    182             item = new DronePickup(this);
    183 
    184         SUPER(DronePickup, clone, item);
    185 
    186         DronePickup* pickup = orxonox_cast<DronePickup*>(item);
    187         pickup->setDroneTemplate(this->getDroneTemplate());
    188     }
    189172}
  • code/branches/presentation2012merge/src/modules/pickup/items/DronePickup.h

    r9318 r9320  
    7070
    7171            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    72             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    7372
    7473            const std::string& getDroneTemplate() const; //!< Get the name of the droneTemplate.
  • code/branches/presentation2012merge/src/modules/pickup/items/HealthPickup.cc

    r9318 r9320  
    248248    /**
    249249    @brief
    250         Creates a duplicate of the input OrxonoxClass.
    251     @param item
    252         A pointer to the Orxonox class.
    253     */
    254     void HealthPickup::clone(OrxonoxClass*& item)
    255     {
    256         if(item == NULL)
    257             item = new HealthPickup(this);
    258 
    259         SUPER(HealthPickup, clone, item);
    260 
    261         HealthPickup* pickup = orxonox_cast<HealthPickup*>(item);
    262         pickup->setHealth(this->getHealth());
    263         pickup->setHealthRate(this->getHealthRate());
    264         pickup->setHealthType(this->getHealthType());
    265     }
    266 
    267     /**
    268     @brief
    269250        Get the health type of this pickup.
    270251    @return
  • code/branches/presentation2012merge/src/modules/pickup/items/HealthPickup.h

    r9318 r9320  
    9797
    9898            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    99             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    10099
    101100            /**
  • code/branches/presentation2012merge/src/modules/pickup/items/InvisiblePickup.cc

    r9318 r9320  
    132132    /**
    133133    @brief
    134         Creates a duplicate of the input OrxonoxClass.
    135     @param item
    136         A pointer to the Orxonox class.
    137     */
    138     void InvisiblePickup::clone(OrxonoxClass*& item)
    139     {
    140         if(item == NULL)
    141             item = new InvisiblePickup(this);
    142 
    143         SUPER(InvisiblePickup, clone, item);
    144 
    145         InvisiblePickup* pickup = orxonox_cast<InvisiblePickup*>(item);
    146         pickup->setDuration(this->getDuration());
    147     }
    148 
    149     /**
    150     @brief
    151134        Sets the invisibility.
    152135    @param invisibility
  • code/branches/presentation2012merge/src/modules/pickup/items/InvisiblePickup.h

    r9318 r9320  
    7575            virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a HealthPickup object through XML.
    7676            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    77             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    7877
    7978            /**
  • code/branches/presentation2012merge/src/modules/pickup/items/MetaPickup.cc

    r9318 r9320  
    147147    /**
    148148    @brief
    149         Creates a duplicate of the input OrxonoxClass.
    150     @param item
    151         A pointer to the Orxonox class.
    152     */
    153     void MetaPickup::clone(OrxonoxClass*& item)
    154     {
    155         if(item == NULL)
    156             item = new MetaPickup(this);
    157 
    158         SUPER(MetaPickup, clone, item);
    159 
    160         MetaPickup* pickup = orxonox_cast<MetaPickup*>(item);
    161         pickup->setMetaType(this->getMetaType());
    162     }
    163 
    164     /**
    165     @brief
    166149        Get the meta type of this MetaPickup.
    167150    @return
  • code/branches/presentation2012merge/src/modules/pickup/items/MetaPickup.h

    r9318 r9320  
    9595
    9696            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    97             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    9897
    9998            /**
  • code/branches/presentation2012merge/src/modules/pickup/items/ShieldPickup.cc

    r9318 r9320  
    159159    /**
    160160    @brief
    161         Creates a duplicate of the input OrxonoxClass.
    162     @param item
    163         A pointer to the Orxonox class.
    164     */
    165     void ShieldPickup::clone(OrxonoxClass*& item)
    166     {
    167         if(item == NULL)
    168             item = new ShieldPickup(this);
    169 
    170         SUPER(ShieldPickup, clone, item);
    171 
    172         ShieldPickup* pickup = orxonox_cast<ShieldPickup*>(item);
    173         pickup->setDuration(this->getDuration());
    174         pickup->setShieldAbsorption(this->getShieldAbsorption());
    175         pickup->setShieldHealth(this->getShieldHealth());
    176     }
    177 
    178     /**
    179     @brief
    180161        Sets the duration.
    181162    @param duration
  • code/branches/presentation2012merge/src/modules/pickup/items/ShieldPickup.h

    r9318 r9320  
    8282
    8383            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    84             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    8584
    8685            /**
  • code/branches/presentation2012merge/src/modules/pickup/items/ShrinkPickup.cc

    r9318 r9320  
    294294        return pawn;
    295295    }
    296 
    297     /**
    298     @brief
    299         Creates a duplicate of the input OrxonoxClass.
    300     @param item
    301         A pointer to the Orxonox class.
    302     */
    303     void ShrinkPickup::clone(OrxonoxClass*& item)
    304     {
    305         if(item == NULL)
    306             item = new ShrinkPickup(this);
    307 
    308         SUPER(ShrinkPickup, clone, item);
    309         ShrinkPickup* pickup = orxonox_cast<ShrinkPickup*>(item);
    310         pickup->setShrinkFactor(this->getShrinkFactor());
    311         pickup->setDuration(this->getDuration());
    312         pickup->setShrinkDuration(this->getShrinkDuration());
    313     }
    314296}
  • code/branches/presentation2012merge/src/modules/pickup/items/ShrinkPickup.h

    r9318 r9320  
    8080            virtual void changedUsed(void); // Is called when the pickup has transited from used to unused or the other way around.
    8181            virtual void changedPickedUp(void);
    82             virtual void clone(OrxonoxClass*& item); // Creates a duplicate of the input OrxonoxClass.
    8382
    8483            /**
  • code/branches/presentation2012merge/src/modules/pickup/items/SpeedPickup.cc

    r9318 r9320  
    160160    /**
    161161    @brief
    162         Creates a duplicate of the input OrxonoxClass.
    163     @param item
    164         A pointer to the Orxonox class.
    165     */
    166     void SpeedPickup::clone(OrxonoxClass*& item)
    167     {
    168         if(item == NULL)
    169             item = new SpeedPickup(this);
    170 
    171         SUPER(SpeedPickup, clone, item);
    172 
    173         SpeedPickup* pickup = orxonox_cast<SpeedPickup*>(item);
    174         pickup->setDuration(this->getDuration());
    175         pickup->setSpeedAdd(this->getSpeedAdd());
    176         pickup->setSpeedMultiply(this->getSpeedMultiply());
    177     }
    178 
    179     /**
    180     @brief
    181162        Sets the duration for which the SpeedPickup stays active.
    182163    @param duration
  • code/branches/presentation2012merge/src/modules/pickup/items/SpeedPickup.h

    r9318 r9320  
    8181
    8282            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    83             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    8483
    8584            /**
Note: See TracChangeset for help on using the changeset viewer.