Changeset 7268 for code/trunk
- Timestamp:
- Aug 30, 2010, 7:34:07 PM (14 years ago)
- Location:
- code/trunk/src/libraries
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/ClassTreeMask.cc
r6417 r7268 526 526 @return A reference to the mask itself 527 527 */ 528 constClassTreeMask& ClassTreeMask::operator=(const ClassTreeMask& other)528 ClassTreeMask& ClassTreeMask::operator=(const ClassTreeMask& other) 529 529 { 530 530 // Make a copy to avoid troubles with self-assignments (like A = A). … … 843 843 @param mask The mask 844 844 */ 845 constClassTreeMaskObjectIterator& ClassTreeMaskObjectIterator::operator=(const ClassTreeMask& mask)845 ClassTreeMaskObjectIterator& ClassTreeMaskObjectIterator::operator=(const ClassTreeMask& mask) 846 846 { 847 847 // Clear everything, use a cleaned copy of the mask -
code/trunk/src/libraries/core/ClassTreeMask.h
r5929 r7268 194 194 inline BaseObject* end() const { return 0; } 195 195 196 constClassTreeMask& operator=(const ClassTreeMask& other);196 ClassTreeMask& operator=(const ClassTreeMask& other); 197 197 198 198 bool operator==(const ClassTreeMask& other) const; … … 260 260 inline ClassTreeMaskObjectIterator(const ClassTreeMask& mask) { (*this) = mask; } 261 261 262 constClassTreeMaskObjectIterator& operator=(const ClassTreeMask& mask);262 ClassTreeMaskObjectIterator& operator=(const ClassTreeMask& mask); 263 263 264 264 const ClassTreeMaskObjectIterator& operator++(); -
code/trunk/src/libraries/core/Iterator.h
r5929 r7268 124 124 @param exp The exported element 125 125 */ 126 inline constIterator<T>& operator=(const ObjectListBase::Export& exp)126 inline Iterator<T>& operator=(const ObjectListBase::Export& exp) 127 127 { 128 128 if (this->list_) … … 140 140 @param other The other Iterator 141 141 */ 142 inline constIterator<T>& operator=(const Iterator<T>& other)142 inline Iterator<T>& operator=(const Iterator<T>& other) 143 143 { 144 144 if (this->list_) … … 157 157 */ 158 158 template <class O> 159 inline constIterator<T>& operator=(ObjectListElement<O>* element)159 inline Iterator<T>& operator=(ObjectListElement<O>* element) 160 160 { 161 161 if (this->list_) … … 174 174 */ 175 175 template <class O> 176 inline constIterator<T>& operator=(const ObjectListIterator<O>& other)176 inline Iterator<T>& operator=(const ObjectListIterator<O>& other) 177 177 { 178 178 if (this->list_) -
code/trunk/src/libraries/core/ObjectListIterator.h
r5929 r7268 101 101 @param element The ObjectListElement 102 102 */ 103 inline constObjectListIterator<T>& operator=(ObjectListElement<T>* element)103 inline ObjectListIterator<T>& operator=(ObjectListElement<T>* element) 104 104 { 105 105 this->element_ = element; … … 111 111 @param element The other ObjectListIterator 112 112 */ 113 inline constObjectListIterator<T>& operator=(const ObjectListIterator<T>& other)113 inline ObjectListIterator<T>& operator=(const ObjectListIterator<T>& other) 114 114 { 115 115 this->element_ = other.element_; -
code/trunk/src/libraries/core/SmartPtr.h
r6417 r7268 36 36 #include <cassert> 37 37 38 #include "Identifier.h" 38 39 #include "OrxonoxClass.h" 39 40 #include "WeakPtr.h" … … 85 86 } 86 87 87 inline constSmartPtr& operator=(int)88 inline SmartPtr& operator=(int) 88 89 { 89 90 SmartPtr(0).swap(*this); … … 91 92 } 92 93 93 inline constSmartPtr& operator=(T* pointer)94 inline SmartPtr& operator=(T* pointer) 94 95 { 95 96 SmartPtr(pointer).swap(*this); … … 97 98 } 98 99 99 inline constSmartPtr& operator=(const SmartPtr& other)100 inline SmartPtr& operator=(const SmartPtr& other) 100 101 { 101 102 SmartPtr(other).swap(*this); … … 104 105 105 106 template <class O> 106 inline constSmartPtr& operator=(const SmartPtr<O>& other)107 inline SmartPtr& operator=(const SmartPtr<O>& other) 107 108 { 108 109 SmartPtr(other).swap(*this); … … 111 112 112 113 template <class O> 113 inline constSmartPtr& operator=(const WeakPtr<O>& other)114 inline SmartPtr& operator=(const WeakPtr<O>& other) 114 115 { 115 116 SmartPtr(other).swap(*this); … … 194 195 SmartPtr<T> dynamic_pointer_cast(const SmartPtr<U>& p) 195 196 { 196 return dynamic_cast<T*>(p.get());197 return orxonox_cast<T*>(p.get()); 197 198 } 198 199 } -
code/trunk/src/libraries/core/SubclassIdentifier.h
r6417 r7268 91 91 @return The SubclassIdentifier itself 92 92 */ 93 constSubclassIdentifier<T>& operator=(Identifier* identifier)93 SubclassIdentifier<T>& operator=(Identifier* identifier) 94 94 { 95 95 if (!identifier || !identifier->isA(ClassIdentifier<T>::getIdentifier())) … … 118 118 */ 119 119 template <class O> 120 constSubclassIdentifier<T>& operator=(const SubclassIdentifier<O>& identifier)120 SubclassIdentifier<T>& operator=(const SubclassIdentifier<O>& identifier) 121 121 { 122 122 return this->operator=(identifier.getIdentifier()); -
code/trunk/src/libraries/core/WeakPtr.h
r6417 r7268 35 35 36 36 #include <cassert> 37 #include "Identifier.h" 37 38 #include "OrxonoxClass.h" 38 39 #include "Functor.h" … … 82 83 } 83 84 84 inline constWeakPtr& operator=(int)85 inline WeakPtr& operator=(int) 85 86 { 86 87 WeakPtr(0).swap(*this); … … 88 89 } 89 90 90 inline constWeakPtr& operator=(T* pointer)91 inline WeakPtr& operator=(T* pointer) 91 92 { 92 93 WeakPtr(pointer).swap(*this); … … 94 95 } 95 96 96 inline constWeakPtr& operator=(const WeakPtr& other)97 inline WeakPtr& operator=(const WeakPtr& other) 97 98 { 98 99 WeakPtr(other).swap(*this); … … 101 102 102 103 template <class O> 103 inline constWeakPtr& operator=(const WeakPtr<O>& other)104 inline WeakPtr& operator=(const WeakPtr<O>& other) 104 105 { 105 106 WeakPtr(other).swap(*this); … … 213 214 WeakPtr<T> dynamic_pointer_cast(const WeakPtr<U>& p) 214 215 { 215 return dynamic_cast<T*>(p.get());216 return orxonox_cast<T*>(p.get()); 216 217 } 217 218 } -
code/trunk/src/libraries/util/MultiType.h
r7266 r7268 272 272 inline ~MultiType() { if (this->value_) { delete this->value_; } } 273 273 274 template <typename V> inline constMultiType& operator=(const V& value) { this->setValue(value); return (*this); } /** @brief Assigns a new value. The value will be converted to the current type of the MultiType. */275 template <typename V> inline constMultiType& operator=(V* value) { this->setValue(value); return (*this); } /** @brief Assigns a pointer. */276 inline constMultiType& operator=(const MultiType& other) { this->setValue(other); return (*this); } /** @brief Assigns the value of the other MultiType and converts it to the current type of the MultiType. */277 inline constMultiType& operator=(MT_Type::Value type) { this->setType(type); return (*this); } /** @brief Resets the value and changes the type. */274 template <typename V> inline MultiType& operator=(const V& value) { this->setValue(value); return (*this); } /** @brief Assigns a new value. The value will be converted to the current type of the MultiType. */ 275 template <typename V> inline MultiType& operator=(V* value) { this->setValue(value); return (*this); } /** @brief Assigns a pointer. */ 276 inline MultiType& operator=(const MultiType& other) { this->setValue(other); return (*this); } /** @brief Assigns the value of the other MultiType and converts it to the current type of the MultiType. */ 277 inline MultiType& operator=(MT_Type::Value type) { this->setType(type); return (*this); } /** @brief Resets the value and changes the type. */ 278 278 279 279 inline bool setValue(const char& value); -
code/trunk/src/libraries/util/mbool.h
r6417 r7268 42 42 { this->value_.memory_ = value.value_.memory_; } 43 43 44 inline constmbool& operator=(bool value)44 inline mbool& operator=(bool value) 45 45 { if (value != this->value_.bool_) { ++this->value_.memory_; } return (*this); } 46 inline constmbool& operator=(const mbool& value)46 inline mbool& operator=(const mbool& value) 47 47 { this->value_.memory_ = value.value_.memory_; return (*this); } 48 48
Note: See TracChangeset
for help on using the changeset viewer.