Changeset 834 for code/branches/core/src/util/MultiTypeString.h
- Timestamp:
- Feb 21, 2008, 10:05:05 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/src/util/MultiTypeString.h
r797 r834 63 63 using MultiTypePrimitive::operator==; 64 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); }65 inline bool operator==(const std::string& value) const { return (this->string_ == value); } 66 66 bool operator==(const MultiTypeString& mtp) const; 67 67 68 68 using MultiTypePrimitive::operator!=; 69 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); }70 inline bool operator!=(const std::string& value) const { return (this->string_ != value); } 71 71 bool operator!=(const MultiTypeString& mtp) const; 72 73 inline operator std::string() const { return this->string_; } 74 inline operator const char*() const { return this->string_.c_str(); } 72 75 73 76 using MultiTypePrimitive::setValue; 74 77 inline void setValue(const char* value) { this->type_ = MT_string; this->string_ = std::string(value); } 75 inline void setValue(const std::string& value) { this->type_ = MT_string; this->string_ = value; }78 inline void setValue(const std::string& value) { this->type_ = MT_string; this->string_ = value; } 76 79 void setValue(const MultiTypeString& mtp); 77 80 78 inline std::string& getString() { return this->string_; }81 inline std::string& getString() { return this->string_; } 79 82 inline const char* getConstChar() { return this->string_.c_str(); } 80 83 81 84 using MultiTypePrimitive::getValue; 82 inline void getValue(std::string* variable) const { (*variable) = this->string_; }85 inline void getValue(std::string* variable) const { (*variable) = this->string_; } 83 86 inline void getValue(const char** variable) const { (*variable) = this->string_.c_str(); } 84 87
Note: See TracChangeset
for help on using the changeset viewer.