Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 13, 2010, 9:10:57 PM (14 years ago)
Author:
dafrick
Message:

Small adjustments.

Location:
code/branches/releasetodo/src/orxonox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/releasetodo/src/orxonox/LevelInfo.cc

    r7639 r7645  
    7777
    7878    }
    79    
    80     void LevelInfoItem::initializeTags(void)
     79
     80    /**
     81    @brief
     82        Initialize the set of allowed tags.
     83    */
     84    /*static*/ void LevelInfoItem::initializeTags(void)
    8185    {
    8286        if(!LevelInfoItem::initialized_s)
     
    8791            LevelInfoItem::possibleTags_s.insert("showcase");
    8892            LevelInfoItem::possibleTags_s.insert("tutorial");
     93            LevelInfoItem::possibleTags_s.insert("presentation");
    8994        }
    9095    }
  • code/branches/releasetodo/src/orxonox/LevelInfo.h

    r7638 r7645  
    3838#include "OrxonoxPrereqs.h"
    3939
    40 #include <map>
    4140#include <set>
    4241#include <string>
     
    121120        private:
    122121            void tagsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed.
    123            
    124             static std::set<std::string> possibleTags_s;
    125             static const bool initialized_s = false;
    126             void initializeTags(void);
    127             bool validateTag(const std::string& tag)
    128                 { this->initializeTags(); return LevelInfoItem::possibleTags_s.find(tag) != LevelInfoItem::possibleTags_s.end(); }
     122
     123            static void initializeTags(void); //!< Initialize the set of allowed tags.
     124            /**
     125            @brief Check whether an input tag is allowed.
     126            @param tag The tag to check.
     127            @return Returns true if the input tag is allowed, false if not.
     128            */
     129            static bool validateTag(const std::string& tag)
     130                { LevelInfoItem::initializeTags(); return LevelInfoItem::possibleTags_s.find(tag) != LevelInfoItem::possibleTags_s.end(); }
     131
     132            static std::set<std::string> possibleTags_s; //!< The set of allowed tags.
     133            static const bool initialized_s = false; //!< Whether the set of allowed tags has been inizialized.
    129134
    130135            std::string name_; //!< The name of the Level.
     
    140145        - @b name The name of the level.
    141146        - @b description The description of the level.
    142         - @b tags A comma-seperated string of tags.
     147        - @b tags A comma-seperated string of tags. Allowed tags are: <em>test</em>, <em>singleplayer</em>, <em>multiplayer</em>, <em>showcase</em>, <em>tutorial</em>, <em>presentation</em>.
    143148
    144149        An example would be:
Note: See TracChangeset for help on using the changeset viewer.