Changeset 794 for code/branches/core/src
- Timestamp:
- Feb 10, 2008, 1:05:27 AM (17 years ago)
- Location:
- code/branches/core/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/src/orxonox/core/ConfigValueContainer.cc
r792 r794 231 231 int temp; 232 232 bool success = ConvertValue(&temp, input, defvalue); 233 ((MultiTypePrimitive)this->value_).setValue(temp);233 this->value_.setValue(temp); 234 234 return success; 235 235 } … … 245 245 unsigned int temp; 246 246 bool success = ConvertValue(&temp, input, defvalue); 247 ((MultiTypePrimitive)this->value_).setValue(temp);247 this->value_.setValue(temp); 248 248 return success; 249 249 } … … 260 260 int temp; 261 261 bool success = ConvertValue(&temp, input, (int)defvalue); 262 ((MultiTypePrimitive)this->value_).setValue((char)temp);262 this->value_.setValue((char)temp); 263 263 return success; 264 264 } … … 275 275 unsigned int temp; 276 276 bool success = ConvertValue(&temp, input, (unsigned int)defvalue); 277 ((MultiTypePrimitive)this->value_).setValue((unsigned char)temp);277 this->value_.setValue((unsigned char)temp); 278 278 return success; 279 279 } … … 289 289 short temp; 290 290 bool success = ConvertValue(&temp, input, defvalue); 291 ((MultiTypePrimitive)this->value_).setValue(temp);291 this->value_.setValue(temp); 292 292 return success; 293 293 } … … 303 303 unsigned short temp; 304 304 bool success = ConvertValue(&temp, input, defvalue); 305 ((MultiTypePrimitive)this->value_).setValue(temp);305 this->value_.setValue(temp); 306 306 return success; 307 307 } … … 317 317 long temp; 318 318 bool success = ConvertValue(&temp, input, defvalue); 319 ((MultiTypePrimitive)this->value_).setValue(temp);319 this->value_.setValue(temp); 320 320 return success; 321 321 } … … 331 331 unsigned long temp; 332 332 bool success = ConvertValue(&temp, input, defvalue); 333 ((MultiTypePrimitive)this->value_).setValue(temp);333 this->value_.setValue(temp); 334 334 return success; 335 335 } … … 345 345 float temp; 346 346 bool success = ConvertValue(&temp, input, defvalue); 347 ((MultiTypePrimitive)this->value_).setValue(temp);347 this->value_.setValue(temp); 348 348 return success; 349 349 } … … 359 359 double temp; 360 360 bool success = ConvertValue(&temp, input, defvalue); 361 ((MultiTypePrimitive)this->value_).setValue(temp);361 this->value_.setValue(temp); 362 362 return success; 363 363 } … … 373 373 long double temp; 374 374 bool success = ConvertValue(&temp, input, defvalue); 375 ((MultiTypePrimitive)this->value_).setValue(temp);375 this->value_.setValue(temp); 376 376 return success; 377 377 } … … 390 390 || input.find("yes") < input.size() 391 391 || input.find("Yes") < input.size()) 392 ((MultiTypePrimitive)this->value_).setValue(true);392 this->value_.setValue(true); 393 393 else if (input.find("false") < input.size() 394 394 || input.find("False") < input.size() 395 395 || input.find("no") < input.size() 396 396 || input.find("No") < input.size()) 397 ((MultiTypePrimitive)this->value_).setValue(false);397 this->value_.setValue(false); 398 398 else 399 399 { … … 401 401 bool temp; 402 402 bool success = ConvertValue(&temp, input, defvalue); 403 ((MultiTypePrimitive)this->value_).setValue(temp);403 this->value_.setValue(temp); 404 404 return success; 405 405 } -
code/branches/core/src/orxonox/core/ConfigValueContainer.h
r792 r794 79 79 inline ConfigValueContainer& getValue(T& value) { this->value_.getValue(value); return *this; } 80 80 */ 81 inline ConfigValueContainer& getValue(int* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }82 inline ConfigValueContainer& getValue(unsigned int* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }83 inline ConfigValueContainer& getValue(char* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }84 inline ConfigValueContainer& getValue(unsigned char* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }85 inline ConfigValueContainer& getValue(short* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }86 inline ConfigValueContainer& getValue(unsigned short* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }87 inline ConfigValueContainer& getValue(long* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }88 inline ConfigValueContainer& getValue(unsigned long* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }89 inline ConfigValueContainer& getValue(float* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }90 inline ConfigValueContainer& getValue(double* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }91 inline ConfigValueContainer& getValue(long double* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }92 inline ConfigValueContainer& getValue(bool* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }93 inline ConfigValueContainer& getValue(std::string* value) { ((MultiTypeString)this->value_).getValue(value); return *this; }81 inline ConfigValueContainer& getValue(int* value) { this->value_.getValue(value); return *this; } 82 inline ConfigValueContainer& getValue(unsigned int* value) { this->value_.getValue(value); return *this; } 83 inline ConfigValueContainer& getValue(char* value) { this->value_.getValue(value); return *this; } 84 inline ConfigValueContainer& getValue(unsigned char* value) { this->value_.getValue(value); return *this; } 85 inline ConfigValueContainer& getValue(short* value) { this->value_.getValue(value); return *this; } 86 inline ConfigValueContainer& getValue(unsigned short* value) { this->value_.getValue(value); return *this; } 87 inline ConfigValueContainer& getValue(long* value) { this->value_.getValue(value); return *this; } 88 inline ConfigValueContainer& getValue(unsigned long* value) { this->value_.getValue(value); return *this; } 89 inline ConfigValueContainer& getValue(float* value) { this->value_.getValue(value); return *this; } 90 inline ConfigValueContainer& getValue(double* value) { this->value_.getValue(value); return *this; } 91 inline ConfigValueContainer& getValue(long double* value) { this->value_.getValue(value); return *this; } 92 inline ConfigValueContainer& getValue(bool* value) { this->value_.getValue(value); return *this; } 93 inline ConfigValueContainer& getValue(std::string* value) { this->value_.getValue(value); return *this; } 94 94 inline ConfigValueContainer& getValue(Vector2* value) { this->value_.getValue(value); return *this; } 95 95 inline ConfigValueContainer& getValue(Vector3* value) { this->value_.getValue(value); return *this; } -
code/branches/core/src/util/MultiTypeMath.cc
r792 r794 45 45 } 46 46 47 MultiTypeMath::MultiTypeMath(const MultiTypeMath& mtm) 47 MultiTypeMath::MultiTypeMath(const MultiTypeMath& mtm) : MultiTypeString(mtm) 48 48 { 49 49 this->type_ = mtm.type_; -
code/branches/core/src/util/MultiTypeMath.h
r792 r794 39 39 public: 40 40 MultiTypeMath(MultiType type = MT_null); 41 MultiTypeMath(int value) : MultiTypeString(value) {}42 MultiTypeMath(unsigned int value) : MultiTypeString(value) {}43 MultiTypeMath(char value) : MultiTypeString(value) {}44 MultiTypeMath(unsigned char value) : MultiTypeString(value) {}45 MultiTypeMath(short value) : MultiTypeString(value) {}46 MultiTypeMath(unsigned short value) : MultiTypeString(value) {}47 MultiTypeMath(long value) : MultiTypeString(value) {}48 MultiTypeMath(unsigned long value) : MultiTypeString(value) {}49 MultiTypeMath(float value) : MultiTypeString(value) {}50 MultiTypeMath(double value) : MultiTypeString(value) {}51 MultiTypeMath(long double value) : MultiTypeString(value) {}52 MultiTypeMath(bool value) : MultiTypeString(value) {}53 MultiTypeMath(const char* value) : MultiTypeString(value) {}54 MultiTypeMath(const std::string& value) : MultiTypeString(value) {}55 MultiTypeMath(const orxonox::Vector2& value) { this->setValue(value); }56 MultiTypeMath(const orxonox::Vector3& value) { this->setValue(value); }57 MultiTypeMath(const orxonox::ColourValue& value) { this->setValue(value); }58 MultiTypeMath(const orxonox::Quaternion& value) { this->setValue(value); }59 MultiTypeMath(const orxonox::Radian& value) { this->setValue(value); }60 MultiTypeMath(const orxonox::Degree& value) { this->setValue(value); }41 inline MultiTypeMath(int value) : MultiTypeString(value) {} 42 inline MultiTypeMath(unsigned int value) : MultiTypeString(value) {} 43 inline MultiTypeMath(char value) : MultiTypeString(value) {} 44 inline MultiTypeMath(unsigned char value) : MultiTypeString(value) {} 45 inline MultiTypeMath(short value) : MultiTypeString(value) {} 46 inline MultiTypeMath(unsigned short value) : MultiTypeString(value) {} 47 inline MultiTypeMath(long value) : MultiTypeString(value) {} 48 inline MultiTypeMath(unsigned long value) : MultiTypeString(value) {} 49 inline MultiTypeMath(float value) : MultiTypeString(value) {} 50 inline MultiTypeMath(double value) : MultiTypeString(value) {} 51 inline MultiTypeMath(long double value) : MultiTypeString(value) {} 52 inline MultiTypeMath(bool value) : MultiTypeString(value) {} 53 inline MultiTypeMath(const char* value) : MultiTypeString(value) {} 54 inline MultiTypeMath(const std::string& value) : MultiTypeString(value) {} 55 inline MultiTypeMath(const orxonox::Vector2& value) { this->setValue(value); } 56 inline MultiTypeMath(const orxonox::Vector3& value) { this->setValue(value); } 57 inline MultiTypeMath(const orxonox::ColourValue& value) { this->setValue(value); } 58 inline MultiTypeMath(const orxonox::Quaternion& value) { this->setValue(value); } 59 inline MultiTypeMath(const orxonox::Radian& value) { this->setValue(value); } 60 inline MultiTypeMath(const orxonox::Degree& value) { this->setValue(value); } 61 61 MultiTypeMath(const MultiTypeMath& mtm); 62 62 63 MultiTypeMath& operator=(const orxonox::Vector2& value) { this->setValue(value); return *this; } 64 MultiTypeMath& operator=(const orxonox::Vector3& value) { this->setValue(value); return *this; } 65 MultiTypeMath& operator=(const orxonox::ColourValue& value) { this->setValue(value); return *this; } 66 MultiTypeMath& operator=(const orxonox::Quaternion& value) { this->setValue(value); return *this; } 67 MultiTypeMath& operator=(const orxonox::Radian& value) { this->setValue(value); return *this; } 68 MultiTypeMath& operator=(const orxonox::Degree& value) { this->setValue(value); return *this; } 63 using MultiTypeString::operator=; 64 inline MultiTypeMath& operator=(const orxonox::Vector2& value) { this->setValue(value); return *this; } 65 inline MultiTypeMath& operator=(const orxonox::Vector3& value) { this->setValue(value); return *this; } 66 inline MultiTypeMath& operator=(const orxonox::ColourValue& value) { this->setValue(value); return *this; } 67 inline MultiTypeMath& operator=(const orxonox::Quaternion& value) { this->setValue(value); return *this; } 68 inline MultiTypeMath& operator=(const orxonox::Radian& value) { this->setValue(value); return *this; } 69 inline MultiTypeMath& operator=(const orxonox::Degree& value) { this->setValue(value); return *this; } 69 70 MultiTypeMath& operator=(const MultiTypeMath& mtm); 70 71 71 bool operator==(const orxonox::Vector2& value) const { return (this->vector2_ == value); } 72 bool operator==(const orxonox::Vector3& value) const { return (this->vector3_ == value); } 73 bool operator==(const orxonox::ColourValue& value) const { return (this->colourvalue_ == value); } 74 bool operator==(const orxonox::Quaternion& value) const { return (this->quaternion_ == value); } 75 bool operator==(const orxonox::Radian& value) const { return (this->radian_ == value); } 76 bool operator==(const orxonox::Degree& value) const { return (this->degree_ == value); } 72 using MultiTypeString::operator==; 73 inline bool operator==(const orxonox::Vector2& value) const { return (this->vector2_ == value); } 74 inline bool operator==(const orxonox::Vector3& value) const { return (this->vector3_ == value); } 75 inline bool operator==(const orxonox::ColourValue& value) const { return (this->colourvalue_ == value); } 76 inline bool operator==(const orxonox::Quaternion& value) const { return (this->quaternion_ == value); } 77 inline bool operator==(const orxonox::Radian& value) const { return (this->radian_ == value); } 78 inline bool operator==(const orxonox::Degree& value) const { return (this->degree_ == value); } 77 79 bool operator==(const MultiTypeMath& mtm) const; 78 80 79 bool operator!=(const orxonox::Vector2& value) const { return (this->vector2_ != value); } 80 bool operator!=(const orxonox::Vector3& value) const { return (this->vector3_ != value); } 81 bool operator!=(const orxonox::ColourValue& value) const { return (this->colourvalue_ != value); } 82 bool operator!=(const orxonox::Quaternion& value) const { return (this->quaternion_ != value); } 83 bool operator!=(const orxonox::Radian& value) const { return (this->radian_ != value); } 84 bool operator!=(const orxonox::Degree& value) const { return (this->degree_ != value); } 81 using MultiTypeString::operator!=; 82 inline bool operator!=(const orxonox::Vector2& value) const { return (this->vector2_ != value); } 83 inline bool operator!=(const orxonox::Vector3& value) const { return (this->vector3_ != value); } 84 inline bool operator!=(const orxonox::ColourValue& value) const { return (this->colourvalue_ != value); } 85 inline bool operator!=(const orxonox::Quaternion& value) const { return (this->quaternion_ != value); } 86 inline bool operator!=(const orxonox::Radian& value) const { return (this->radian_ != value); } 87 inline bool operator!=(const orxonox::Degree& value) const { return (this->degree_ != value); } 85 88 bool operator!=(const MultiTypeMath& mtm) const; 86 89 90 using MultiTypeString::setValue; 87 91 inline void setValue(const orxonox::Vector2& value) { this->type_ = MT_vector2; this->vector2_ = value; } 88 92 inline void setValue(const orxonox::Vector3& value) { this->type_ = MT_vector3; this->vector3_ = value; } … … 100 104 inline orxonox::Degree& getDegree() { return this->degree_; } 101 105 106 using MultiTypeString::getValue; 102 107 inline void getValue(orxonox::Vector2* variable) const { (*variable) = orxonox::Vector2 (this->vector2_); } 103 108 inline void getValue(orxonox::Vector3* variable) const { (*variable) = orxonox::Vector3 (this->vector3_); } -
code/branches/core/src/util/MultiTypePrimitive.h
r792 r794 38 38 public: 39 39 MultiTypePrimitive(MultiType type = MT_null); 40 MultiTypePrimitive(int value) { this->setValue(value); }41 MultiTypePrimitive(unsigned int value) { this->setValue(value); }42 MultiTypePrimitive(char value) { this->setValue(value); }43 MultiTypePrimitive(unsigned char value) { this->setValue(value); }44 MultiTypePrimitive(short value) { this->setValue(value); }45 MultiTypePrimitive(unsigned short value) { this->setValue(value); }46 MultiTypePrimitive(long value) { this->setValue(value); }47 MultiTypePrimitive(unsigned long value) { this->setValue(value); }48 MultiTypePrimitive(float value) { this->setValue(value); }49 MultiTypePrimitive(double value) { this->setValue(value); }50 MultiTypePrimitive(long double value) { this->setValue(value); }51 MultiTypePrimitive(bool value) { this->setValue(value); }40 inline MultiTypePrimitive(int value) { this->setValue(value); } 41 inline MultiTypePrimitive(unsigned int value) { this->setValue(value); } 42 inline MultiTypePrimitive(char value) { this->setValue(value); } 43 inline MultiTypePrimitive(unsigned char value) { this->setValue(value); } 44 inline MultiTypePrimitive(short value) { this->setValue(value); } 45 inline MultiTypePrimitive(unsigned short value) { this->setValue(value); } 46 inline MultiTypePrimitive(long value) { this->setValue(value); } 47 inline MultiTypePrimitive(unsigned long value) { this->setValue(value); } 48 inline MultiTypePrimitive(float value) { this->setValue(value); } 49 inline MultiTypePrimitive(double value) { this->setValue(value); } 50 inline MultiTypePrimitive(long double value) { this->setValue(value); } 51 inline MultiTypePrimitive(bool value) { this->setValue(value); } 52 52 MultiTypePrimitive(const MultiTypePrimitive& mtp); 53 53 54 MultiTypePrimitive& operator=(int value) { this->setValue(value); return *this; }55 MultiTypePrimitive& operator=(unsigned int value) { this->setValue(value); return *this; }56 MultiTypePrimitive& operator=(char value) { this->setValue(value); return *this; }57 MultiTypePrimitive& operator=(unsigned char value) { this->setValue(value); return *this; }58 MultiTypePrimitive& operator=(short value) { this->setValue(value); return *this; }59 MultiTypePrimitive& operator=(unsigned short value) { this->setValue(value); return *this; }60 MultiTypePrimitive& operator=(long value) { this->setValue(value); return *this; }61 MultiTypePrimitive& operator=(unsigned long value) { this->setValue(value); return *this; }62 MultiTypePrimitive& operator=(float value) { this->setValue(value); return *this; }63 MultiTypePrimitive& operator=(double value) { this->setValue(value); return *this; }64 MultiTypePrimitive& operator=(long double value) { this->setValue(value); return *this; }65 MultiTypePrimitive& operator=(bool value) { this->setValue(value); return *this; }54 inline MultiTypePrimitive& operator=(int value) { this->setValue(value); return *this; } 55 inline MultiTypePrimitive& operator=(unsigned int value) { this->setValue(value); return *this; } 56 inline MultiTypePrimitive& operator=(char value) { this->setValue(value); return *this; } 57 inline MultiTypePrimitive& operator=(unsigned char value) { this->setValue(value); return *this; } 58 inline MultiTypePrimitive& operator=(short value) { this->setValue(value); return *this; } 59 inline MultiTypePrimitive& operator=(unsigned short value) { this->setValue(value); return *this; } 60 inline MultiTypePrimitive& operator=(long value) { this->setValue(value); return *this; } 61 inline MultiTypePrimitive& operator=(unsigned long value) { this->setValue(value); return *this; } 62 inline MultiTypePrimitive& operator=(float value) { this->setValue(value); return *this; } 63 inline MultiTypePrimitive& operator=(double value) { this->setValue(value); return *this; } 64 inline MultiTypePrimitive& operator=(long double value) { this->setValue(value); return *this; } 65 inline MultiTypePrimitive& operator=(bool value) { this->setValue(value); return *this; } 66 66 MultiTypePrimitive& operator=(const MultiTypePrimitive& mtp); 67 67 68 bool operator==(int value) const { return (this->value_.int_ == value); }69 bool operator==(unsigned int value) const { return (this->value_.uint_ == value); }70 bool operator==(char value) const { return (this->value_.char_ == value); }71 bool operator==(unsigned char value) const { return (this->value_.uchar_ == value); }72 bool operator==(short value) const { return (this->value_.short_ == value); }73 bool operator==(unsigned short value) const { return (this->value_.ushort_ == value); }74 bool operator==(long value) const { return (this->value_.long_ == value); }75 bool operator==(unsigned long value) const { return (this->value_.ulong_ == value); }76 bool operator==(float value) const { return (this->value_.float_ == value); }77 bool operator==(double value) const { return (this->value_.double_ == value); }78 bool operator==(long double value) const { return (this->value_.longdouble_ == value); }79 bool operator==(bool value) const { return (this->value_.bool_ == value); }68 inline bool operator==(int value) const { return (this->value_.int_ == value); } 69 inline bool operator==(unsigned int value) const { return (this->value_.uint_ == value); } 70 inline bool operator==(char value) const { return (this->value_.char_ == value); } 71 inline bool operator==(unsigned char value) const { return (this->value_.uchar_ == value); } 72 inline bool operator==(short value) const { return (this->value_.short_ == value); } 73 inline bool operator==(unsigned short value) const { return (this->value_.ushort_ == value); } 74 inline bool operator==(long value) const { return (this->value_.long_ == value); } 75 inline bool operator==(unsigned long value) const { return (this->value_.ulong_ == value); } 76 inline bool operator==(float value) const { return (this->value_.float_ == value); } 77 inline bool operator==(double value) const { return (this->value_.double_ == value); } 78 inline bool operator==(long double value) const { return (this->value_.longdouble_ == value); } 79 inline bool operator==(bool value) const { return (this->value_.bool_ == value); } 80 80 bool operator==(const MultiTypePrimitive& mtp) const; 81 81 82 bool operator!=(int value) const { return (this->value_.int_ != value); }83 bool operator!=(unsigned int value) const { return (this->value_.uint_ != value); }84 bool operator!=(char value) const { return (this->value_.char_ != value); }85 bool operator!=(unsigned char value) const { return (this->value_.uchar_ != value); }86 bool operator!=(short value) const { return (this->value_.short_ != value); }87 bool operator!=(unsigned short value) const { return (this->value_.ushort_ != value); }88 bool operator!=(long value) const { return (this->value_.long_ != value); }89 bool operator!=(unsigned long value) const { return (this->value_.ulong_ != value); }90 bool operator!=(float value) const { return (this->value_.float_ != value); }91 bool operator!=(double value) const { return (this->value_.double_ != value); }92 bool operator!=(long double value) const { return (this->value_.longdouble_ != value); }93 bool operator!=(bool value) const { return (this->value_.bool_ != value); }82 inline bool operator!=(int value) const { return (this->value_.int_ != value); } 83 inline bool operator!=(unsigned int value) const { return (this->value_.uint_ != value); } 84 inline bool operator!=(char value) const { return (this->value_.char_ != value); } 85 inline bool operator!=(unsigned char value) const { return (this->value_.uchar_ != value); } 86 inline bool operator!=(short value) const { return (this->value_.short_ != value); } 87 inline bool operator!=(unsigned short value) const { return (this->value_.ushort_ != value); } 88 inline bool operator!=(long value) const { return (this->value_.long_ != value); } 89 inline bool operator!=(unsigned long value) const { return (this->value_.ulong_ != value); } 90 inline bool operator!=(float value) const { return (this->value_.float_ != value); } 91 inline bool operator!=(double value) const { return (this->value_.double_ != value); } 92 inline bool operator!=(long double value) const { return (this->value_.longdouble_ != value); } 93 inline bool operator!=(bool value) const { return (this->value_.bool_ != value); } 94 94 bool operator!=(const MultiTypePrimitive& mtp) const; 95 95 -
code/branches/core/src/util/MultiTypeString.cc
r792 r794 37 37 } 38 38 39 MultiTypeString::MultiTypeString(const MultiTypeString& mts) 39 MultiTypeString::MultiTypeString(const MultiTypeString& mts) : MultiTypePrimitive(mts) 40 40 { 41 41 this->type_ = mts.type_; -
code/branches/core/src/util/MultiTypeString.h
r792 r794 40 40 public: 41 41 MultiTypeString(MultiType type = MT_null); 42 MultiTypeString(int value) : MultiTypePrimitive(value) {}43 MultiTypeString(unsigned int value) : MultiTypePrimitive(value) {}44 MultiTypeString(char value) : MultiTypePrimitive(value) {}45 MultiTypeString(unsigned char value) : MultiTypePrimitive(value) {}46 MultiTypeString(short value) : MultiTypePrimitive(value) {}47 MultiTypeString(unsigned short value) : MultiTypePrimitive(value) {}48 MultiTypeString(long value) : MultiTypePrimitive(value) {}49 MultiTypeString(unsigned long value) : MultiTypePrimitive(value) {}50 MultiTypeString(float value) : MultiTypePrimitive(value) {}51 MultiTypeString(double value) : MultiTypePrimitive(value) {}52 MultiTypeString(long double value) : MultiTypePrimitive(value) {}53 MultiTypeString(bool value) : MultiTypePrimitive(value) {}54 MultiTypeString(const char* value) { this->setValue(value); }55 MultiTypeString(const std::string& value) { this->setValue(value); }42 inline MultiTypeString(int value) : MultiTypePrimitive(value) {} 43 inline MultiTypeString(unsigned int value) : MultiTypePrimitive(value) {} 44 inline MultiTypeString(char value) : MultiTypePrimitive(value) {} 45 inline MultiTypeString(unsigned char value) : MultiTypePrimitive(value) {} 46 inline MultiTypeString(short value) : MultiTypePrimitive(value) {} 47 inline MultiTypeString(unsigned short value) : MultiTypePrimitive(value) {} 48 inline MultiTypeString(long value) : MultiTypePrimitive(value) {} 49 inline MultiTypeString(unsigned long value) : MultiTypePrimitive(value) {} 50 inline MultiTypeString(float value) : MultiTypePrimitive(value) {} 51 inline MultiTypeString(double value) : MultiTypePrimitive(value) {} 52 inline MultiTypeString(long double value) : MultiTypePrimitive(value) {} 53 inline MultiTypeString(bool value) : MultiTypePrimitive(value) {} 54 inline MultiTypeString(const char* value) { this->setValue(value); } 55 inline MultiTypeString(const std::string& value) { this->setValue(value); } 56 56 MultiTypeString(const MultiTypeString& mtp); 57 57 58 MultiTypeString& operator=(const char* value) { this->setValue(value); return *this; } 59 MultiTypeString& operator=(const std::string& value) { this->setValue(value); return *this; } 58 using MultiTypePrimitive::operator=; 59 inline MultiTypeString& operator=(const char* value) { this->setValue(value); return *this; } 60 inline MultiTypeString& operator=(const std::string& value) { this->setValue(value); return *this; } 60 61 MultiTypeString& operator=(const MultiTypeString& mtp); 61 62 62 bool operator==(const char* value) const { return (this->string_ == std::string(value)); } 63 bool operator==(const std::string& value) const { return (this->string_ == value); } 63 using MultiTypePrimitive::operator==; 64 inline bool operator==(const char* value) const { return (this->string_ == std::string(value)); } 65 inline bool operator==(const std::string& value) const { return (this->string_ == value); } 64 66 bool operator==(const MultiTypeString& mtp) const; 65 67 66 bool operator!=(const char* value) const { return (this->string_ != std::string(value)); } 67 bool operator!=(const std::string& value) const { return (this->string_ != value); } 68 using MultiTypePrimitive::operator!=; 69 inline bool operator!=(const char* value) const { return (this->string_ != std::string(value)); } 70 inline bool operator!=(const std::string& value) const { return (this->string_ != value); } 68 71 bool operator!=(const MultiTypeString& mtp) const; 69 72 73 using MultiTypePrimitive::setValue; 70 74 inline void setValue(const char* value) { this->type_ = MT_string; this->string_ = std::string(value); } 71 75 inline void setValue(const std::string& value) { this->type_ = MT_string; this->string_ = value; } … … 74 78 inline std::string& getString() { return this->string_; } 75 79 80 using MultiTypePrimitive::getValue; 76 81 inline void getValue(std::string* variable) const { (*variable) = std::string(this->string_); } 77 82
Note: See TracChangeset
for help on using the changeset viewer.