Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 30, 2008, 12:12:18 AM (16 years ago)
Author:
landauf
Message:
  • added input buffer: this class captures key-input (at the moment it's using OIS directly, later it will use the InputHandler) and writes it into a string - other classes can listen to changes and can read and modify the string.
  • fixed some bugs in CommandExecutor
  • fixed a small bug (or changed a questionable feature) in Functor
File:
1 edited

Legend:

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

    r947 r955  
    5252#define CreateTypeToStringTemplate(type) \
    5353    template <> \
    54     inline std::string typeToString<type>() { return #type; }
     54    inline std::string typeToString<type>() { return #type; } \
     55    template <> \
     56    inline std::string typeToString<type&>() { return #type; } \
     57    template <> \
     58    inline std::string typeToString<const type>() { return #type; } \
     59    template <> \
     60    inline std::string typeToString<const type&>() { return #type; }
    5561
    5662    CreateTypeToStringTemplate(int);
     
    6672    CreateTypeToStringTemplate(long double);
    6773    CreateTypeToStringTemplate(bool);
    68     CreateTypeToStringTemplate(std::string);
    69     CreateTypeToStringTemplate(orxonox::Vector2);
    70     CreateTypeToStringTemplate(orxonox::Vector3);
    71     CreateTypeToStringTemplate(orxonox::Quaternion);
    72     CreateTypeToStringTemplate(orxonox::ColourValue);
    73     CreateTypeToStringTemplate(orxonox::Radian);
    74     CreateTypeToStringTemplate(orxonox::Degree);
    75 
     74    CreateTypeToStringTemplate(Vector2);
     75    CreateTypeToStringTemplate(Vector3);
     76    CreateTypeToStringTemplate(Quaternion);
     77    CreateTypeToStringTemplate(ColourValue);
     78    CreateTypeToStringTemplate(Radian);
     79    CreateTypeToStringTemplate(Degree);
     80
     81    template <> \
     82    inline std::string typeToString<std::string>() { return "string"; } \
     83    template <> \
     84    inline std::string typeToString<std::string&>() { return "string"; } \
     85    template <> \
     86    inline std::string typeToString<const std::string>() { return "string"; } \
     87    template <> \
     88    inline std::string typeToString<const std::string&>() { return "string"; }
    7689
    7790    class _CoreExport Functor
     
    88101            inline MultiTypeMath getReturnvalue() const { return this->returnedValue_; }
    89102
    90             std::string getTypenameParam(unsigned int param) const { return (param > 0 && param <= 5) ? this->typeParam_[param-1] : ""; }
     103            std::string getTypenameParam(unsigned int param) const { return (param >= 0 && param < 5) ? this->typeParam_[param] : ""; }
    91104            std::string getTypenameReturnvalue() const { return this->typeReturnvalue_; }
    92105
Note: See TracChangeset for help on using the changeset viewer.