Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 30, 2008, 5:38:03 AM (16 years ago)
Author:
landauf
Message:
  • added set and tset functions to the ConfigValueContainer to (temporary) set a config-value to a new value
  • ConfigValueContainer uses now the functions of MultiTypeMath to convert and assign values
  • added some errorhandling to the CommandExecutor in case there are not enough parameters when executing the command
  • added updateConfigValues function to Identifier
  • added addTime and removeTime functions to the Timer
  • some changes in Executor to allow adding description and default-values when using the ConsoleCommand macro
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core2/src/orxonox/core/Identifier.h

    r947 r957  
    109109            bool isDirectParentOf(const Identifier* identifier) const;
    110110
     111            virtual const ObjectList<BaseObject>* getObjectList() const = 0;
     112
     113            virtual void updateConfigValues() const = 0;
     114
    111115            /** @brief Removes all objects of the corresponding class. */
    112116            virtual void removeObjects() const = 0;
     
    304308            void removeObjects() const;
    305309            void setName(const std::string& name);
     310            /** @brief Returns the list of all existing objects of this class. @return The list */
    306311            inline const ObjectList<T>* getObjects() const { return this->objects_; }
     312            /** @brief Returns a list of all existing objects of this class. @return The list */
     313            inline const ObjectList<BaseObject>* getObjectList() const { return (ObjectList<BaseObject>*)this->objects_; }
     314
     315            void updateConfigValues() const;
    307316
    308317            XMLPortParamContainer* getXMLPortParamContainer(const std::string& paramname);
     
    395404        for (Iterator<T> it = this->objects_->start(); it;)
    396405            delete *(it++);
     406    }
     407
     408    /**
     409        @brief Updates the config-values of all existing objects of this class by calling their setConfigValues() function.
     410    */
     411    template <class T>
     412    void ClassIdentifier<T>::updateConfigValues() const
     413    {
     414        for (Iterator<T> it = this->objects_->start(); it; ++it)
     415            ((T*)*it)->setConfigValues();
    397416    }
    398417
Note: See TracChangeset for help on using the changeset viewer.