Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 19, 2010, 2:14:54 AM (14 years ago)
Author:
landauf
Message:

Moved ability to possess descriptions from Executor to ConsoleCommand, since no other executors use this feature. Also simplified this code a little by introducing a new shortcut in Language.h. XMLPort has to use a temporary solution for descriptions without Language support atm.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/core/XMLPort.h

    r7163 r7186  
    317317                { return this->paramname_; }
    318318
    319             virtual XMLPortParamContainer& description(const std::string& description) = 0;
    320             virtual const std::string& getDescription() = 0;
     319            inline XMLPortParamContainer& description(const std::string& description)
     320                { this->description_ = description; return *this; }
     321            inline const std::string& getDescription() const
     322                { return this->description_; }
    321323
    322324            virtual XMLPortParamContainer& defaultValue(unsigned int index, const MultiType& param) = 0;
     
    332334            Identifier* identifier_;
    333335            BaseObject* owner_;
     336            std::string description_;
    334337    };
    335338
     
    436439            }
    437440
    438             virtual XMLPortParamContainer& description(const std::string& description)
    439                 { this->loadexecutor_->setDescription(description); return (*this); }
    440             virtual const std::string& getDescription()
    441                 { return this->loadexecutor_->getDescription(); }
    442 
    443441            virtual XMLPortParamContainer& defaultValue(unsigned int index, const MultiType& param)
    444442            {
     
    502500                { return this->sectionname_; }
    503501
    504             virtual XMLPortObjectContainer& description(const std::string& description) = 0;
    505             virtual const std::string& getDescription() = 0;
     502            inline XMLPortObjectContainer& description(const std::string& description)
     503                { this->description_ = description; return *this; }
     504            const std::string& getDescription() const
     505                { return this->description_; }
    506506
    507507            bool identifierIsIncludedInLoaderMask(const Identifier* identifier);
     
    513513            Identifier* identifier_;
    514514            Identifier* objectIdentifier_;
     515            std::string description_;
    515516    };
    516517
     
    548549                (*this->loadexecutor_)(castedObject, castedNewObject);
    549550            }
    550 
    551             virtual XMLPortObjectContainer& description(const std::string& description)
    552                 { this->loadexecutor_->setDescription(description); return (*this); }
    553             virtual const std::string& getDescription()
    554                 { return this->loadexecutor_->getDescription(); }
    555551
    556552        private:
Note: See TracChangeset for help on using the changeset viewer.