Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/objects/Script.h

    r9667 r11071  
    5151    @brief The mode a specific @ref orxonox::Script "Script" is in.
    5252    */
    53     namespace ScriptMode
     53    enum class ScriptMode
    5454    {
    55         enum Value
    56         {
    57             normal, //!< The @ref orxonox::Script "Scripts'" code is executed through the @ref orxonox::CommandExecutor "CommandExecutor".
    58             lua //!< The @ref orxonox::Script "Scripts'" code is executed through lua.
    59         };
    60     }
     55        normal, //!< The @ref orxonox::Script "Scripts'" code is executed through the @ref orxonox::CommandExecutor "CommandExecutor".
     56        lua //!< The @ref orxonox::Script "Scripts'" code is executed through lua.
     57    };
    6158
    6259    /**
     
    9895            virtual ~Script();
    9996
    100             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Script object through XML.
    101             virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a port that can be used to channel events and react to them.
     97            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a Script object through XML.
     98            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Creates a port that can be used to channel events and react to them.
    10299
    103100            bool trigger(bool triggered, BaseObject* trigger); //!< Is called when an event comes in trough the event port.
     
    168165                { return this->forAll_; }
    169166
    170             virtual void clientConnected(unsigned int clientId); //!< Callback that is called when a new client has connected.
    171             virtual void clientDisconnected(unsigned int clientid) {}
     167            virtual void clientConnected(unsigned int clientId) override; //!< Callback that is called when a new client has connected.
     168            virtual void clientDisconnected(unsigned int clientid) override {}
    172169
    173170        private:
     
    178175
    179176            std::string code_; //!< The code that is executed by this Script.
    180             ScriptMode::Value mode_; //!< The mode the Script is in. Determines whether the code is executed the normal way or in lua.
     177            ScriptMode mode_; //!< The mode the Script is in. Determines whether the code is executed the normal way or in lua.
    181178            std::string modeStr_; //!< The mode the Script is in, as a string. Is used for networking purposes.
    182179            bool onLoad_; //!< Whether the Scripts code is executed upon loading (creation) of this Script.
     
    193190            @param mode The mode of the Script.
    194191            */
    195             inline void setMode(ScriptMode::Value mode)
     192            inline void setMode(ScriptMode mode)
    196193                { this->mode_ = mode; }
    197194    };
Note: See TracChangeset for help on using the changeset viewer.