Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 22, 2007, 2:13:18 AM (16 years ago)
Author:
landauf
Message:
  • expanded the String2Number.h file
  • changed the SetConfigValue macro
  • changed the S2N and N2S conversion in the ConfigValueContainer
  • added unsigned int, char, unsigned char, float (additionally to double) and const char* (additionally to std::string) to the ConfigValueContainer
Location:
code/branches/FICN/src/orxonox/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/objects/test3.cc

    r496 r667  
    1616    void Test3::setConfigValues()
    1717    {
    18         SetConfigValue(value_int_, -100);
    19         SetConfigValue(value_double_, 10.555678);
    20         SetConfigValue(value_bool_, true);
    21         SetConfigValue(value_string_, "Dies ist ein Test");
     18        SetConfigValue(value_int_, 1);
     19        SetConfigValue(value_uint_, 1);
     20        SetConfigValue(value_char_, 1);
     21        SetConfigValue(value_uchar_, 1);
     22        SetConfigValue(value_float_, 1);
     23        SetConfigValue(value_double_, 1);
     24        SetConfigValue(value_bool_, 1);
     25        SetConfigValue(value_string_, "This is a test");
     26        SetConfigValue(value_constchar_, "This is another test");
    2227        SetConfigValue(value_vector2_, Vector2(101, 202));
    2328        SetConfigValue(value_vector3_, Vector3(13, 26, 39));
     
    2934    }
    3035
    31         #include <fstream>
    3236    void Test3::configOutput()
    3337    {
    3438        std::cout << this->value_int_ << std::endl;
     39        std::cout << this->value_uint_ << std::endl;
     40        std::cout << (int)this->value_char_ << std::endl;
     41        std::cout << (int)this->value_uchar_ << std::endl;
     42        std::cout << this->value_float_ << std::endl;
    3543        std::cout << this->value_double_ << std::endl;
    3644        std::cout << this->value_bool_ << std::endl;
    3745        std::cout << this->value_string_ << std::endl;
     46        std::cout << this->value_constchar_ << std::endl;
    3847        std::cout << this->value_vector2_ << std::endl;
    3948        std::cout << this->value_vector3_ << std::endl;
     
    4150    }
    4251
    43         #define testandcout(code) \
    44           std::cout << #code << " " << code << "\n"
     52    #define testandcout(code) \
     53      std::cout << #code << " " << code << "\n"
    4554
    4655    void Test3::usefullClassesIsATest(Test1* test1)
  • code/branches/FICN/src/orxonox/objects/test3.h

    r496 r667  
    2424        private:
    2525            int                 value_int_;
     26            unsigned int        value_uint_;
     27            char                value_char_;
     28            unsigned char       value_uchar_;
     29            float               value_float_;
    2630            double              value_double_;
    2731            bool                value_bool_;
    2832            std::string         value_string_;
     33            const char*         value_constchar_;
    2934            Vector2             value_vector2_;
    3035            Vector3             value_vector3_;
Note: See TracChangeset for help on using the changeset viewer.