Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2012, 3:03:02 PM (12 years ago)
Author:
landauf
Message:

renamed set and get functions in MultiType:

  • setValue() → set()
  • getXYZ() → get<xyz>()

(e.g. get<int>() instead of getInt() and get<std::string>() instead of getString())

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/testing/src/libraries/util/MultiType.h

    r9223 r9224  
    297297            inline MultiType(const orxonox::Degree& value)      : value_(0) { this->assignValue(value); }           ///< Constructor: Assigns the given value and sets the type.
    298298            inline MultiType(const orxonox::mbool& value)       : value_(0) { this->assignValue((bool)value); }     ///< Constructor: Assigns the given mbool and converts it to bool.
    299             inline MultiType(const char* value)                 : value_(0) { this->setValue(std::string(value)); } ///< Constructor: Converts the char array to a std::string, assigns the value and sets the type.
    300             inline MultiType(const MultiType& other)            : value_(0) { this->setValue(other); }              ///< Copyconstructor: Assigns value and type of the other MultiType.
     299            inline MultiType(const char* value)                 : value_(0) { this->set(std::string(value)); }      ///< Constructor: Converts the char array to a std::string, assigns the value and sets the type.
     300            inline MultiType(const MultiType& other)            : value_(0) { this->set(other); }                   ///< Copyconstructor: Assigns value and type of the other MultiType.
    301301
    302302            /// Destructor: Deletes the MT_Value.
    303303            inline ~MultiType() { if (this->value_) { delete this->value_; } }
    304304
    305             template <typename V> inline MultiType& operator=(const V& value)         { this->setValue(value); return (*this); } ///< Assigns a new value. The value will be converted to the current type of the MultiType.
    306             template <typename V> inline MultiType& operator=(V* value)               { this->setValue(value); return (*this); } ///< Assigns a pointer.
    307             inline                       MultiType& operator=(const MultiType& other) { this->setValue(other); return (*this); } ///< Assigns the value of the other MultiType and converts it to the current type of the MultiType.
    308 
    309             inline bool                                   setValue(const char& value);
    310             inline bool                                   setValue(const unsigned char& value);
    311             inline bool                                   setValue(const short& value);
    312             inline bool                                   setValue(const unsigned short& value);
    313             inline bool                                   setValue(const int& value);
    314             inline bool                                   setValue(const unsigned int& value);
    315             inline bool                                   setValue(const long& value);
    316             inline bool                                   setValue(const unsigned long& value);
    317             inline bool                                   setValue(const long long& value);
    318             inline bool                                   setValue(const unsigned long long& value);
    319             inline bool                                   setValue(const float& value);
    320             inline bool                                   setValue(const double& value);
    321             inline bool                                   setValue(const long double& value);
    322             inline bool                                   setValue(const bool& value);
    323             inline bool                                   setValue(      void* const& value);
    324             inline bool                                   setValue(const std::string& value);
    325             inline bool                                   setValue(const orxonox::Vector2& value);
    326             inline bool                                   setValue(const orxonox::Vector3& value);
    327             inline bool                                   setValue(const orxonox::Vector4& value);
    328             inline bool                                   setValue(const orxonox::ColourValue& value);
    329             inline bool                                   setValue(const orxonox::Quaternion& value);
    330             inline bool                                   setValue(const orxonox::Radian& value);
    331             inline bool                                   setValue(const orxonox::Degree& value);
    332             inline bool                                   setValue(const char* value);
     305            template <typename V> inline MultiType& operator=(const V& value)         { this->set(value); return (*this); } ///< Assigns a new value. The value will be converted to the current type of the MultiType.
     306            template <typename V> inline MultiType& operator=(V* value)               { this->set(value); return (*this); } ///< Assigns a pointer.
     307            inline                       MultiType& operator=(const MultiType& other) { this->set(other); return (*this); } ///< Assigns the value of the other MultiType and converts it to the current type of the MultiType.
     308
     309            inline bool                                   set(const char& value);
     310            inline bool                                   set(const unsigned char& value);
     311            inline bool                                   set(const short& value);
     312            inline bool                                   set(const unsigned short& value);
     313            inline bool                                   set(const int& value);
     314            inline bool                                   set(const unsigned int& value);
     315            inline bool                                   set(const long& value);
     316            inline bool                                   set(const unsigned long& value);
     317            inline bool                                   set(const long long& value);
     318            inline bool                                   set(const unsigned long long& value);
     319            inline bool                                   set(const float& value);
     320            inline bool                                   set(const double& value);
     321            inline bool                                   set(const long double& value);
     322            inline bool                                   set(const bool& value);
     323            inline bool                                   set(      void* const& value);
     324            inline bool                                   set(const std::string& value);
     325            inline bool                                   set(const orxonox::Vector2& value);
     326            inline bool                                   set(const orxonox::Vector3& value);
     327            inline bool                                   set(const orxonox::Vector4& value);
     328            inline bool                                   set(const orxonox::ColourValue& value);
     329            inline bool                                   set(const orxonox::Quaternion& value);
     330            inline bool                                   set(const orxonox::Radian& value);
     331            inline bool                                   set(const orxonox::Degree& value);
     332            inline bool                                   set(const char* value);
    333333            /// Assigns a pointer.
    334             template <typename V> inline bool setValue(V* value)
     334            template <typename V> inline bool set(V* value)
    335335            {
    336336                if (this->value_)
     
    340340            }
    341341            /// Changes the type to T and assigns the new value (which might be of another type than T - it gets converted).
    342             template <typename T, typename V> inline bool setValue(const V& value) { this->reset<T>(); return this->setValue(value); }
     342            template <typename T, typename V> inline bool set(const V& value) { this->reset<T>(); return this->set(value); }
    343343            /// Assigns the value of the other MultiType and converts it to the current type.
    344             bool                                          setValue(const MultiType& other) { if (this->value_) { return this->value_->assimilate(other); } else { if (other.value_) { this->value_ = other.value_->clone(); } return true; } }
     344            bool                                          set(const MultiType& other) { if (this->value_) { return this->value_->assimilate(other); } else { if (other.value_) { this->value_ = other.value_->clone(); } return true; } }
    345345
    346346            /// Copies the other MultiType by assigning value and type.
     
    348348
    349349            /// Converts the current value to type T.
    350             template <typename T> inline bool convert()                    { return this->setValue<T>((typename Loki::TypeTraits<T>::UnqualifiedReferredType)(*this));  }
     350            template <typename T> inline bool convert()                    { return this->set<T>((typename Loki::TypeTraits<T>::UnqualifiedReferredType)(*this));  }
    351351
    352352            /// Resets value and type. Type will be void afterwards and null() returns true.
     
    427427            inline bool getValue(orxonox::Degree*      value) const { if (this->value_) { return this->value_->getValue(value); } return false; } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
    428428
    429             inline char                     getChar()             const { return this->operator char();                 } ///< Returns the current value, converted to the requested type.
    430             inline unsigned char            getUnsignedChar()     const { return this->operator unsigned char();        } ///< Returns the current value, converted to the requested type.
    431             inline short                    getShort()            const { return this->operator short();                } ///< Returns the current value, converted to the requested type.
    432             inline unsigned short           getUnsignedShort()    const { return this->operator unsigned short();       } ///< Returns the current value, converted to the requested type.
    433             inline int                      getInt()              const { return this->operator int();                  } ///< Returns the current value, converted to the requested type.
    434             inline unsigned int             getUnsignedInt()      const { return this->operator unsigned int();         } ///< Returns the current value, converted to the requested type.
    435             inline long                     getLong()             const { return this->operator long();                 } ///< Returns the current value, converted to the requested type.
    436             inline unsigned long            getUnsignedLong()     const { return this->operator unsigned long();        } ///< Returns the current value, converted to the requested type.
    437             inline long long                getLongLong()         const { return this->operator long long();            } ///< Returns the current value, converted to the requested type.
    438             inline unsigned long long       getUnsignedLongLong() const { return this->operator unsigned long long();   } ///< Returns the current value, converted to the requested type.
    439             inline float                    getFloat()            const { return this->operator float();                } ///< Returns the current value, converted to the requested type.
    440             inline double                   getDouble()           const { return this->operator double();               } ///< Returns the current value, converted to the requested type.
    441             inline long double              getLongDouble()       const { return this->operator long double();          } ///< Returns the current value, converted to the requested type.
    442             inline bool                     getBool()             const { return this->operator bool();                 } ///< Returns the current value, converted to the requested type.
    443             inline void*                    getVoid()             const { return this->operator void*();                } ///< Returns the current value, converted to the requested type.
    444             inline std::string              getString()           const { return this->operator std::string();          } ///< Returns the current value, converted to the requested type.
    445             inline orxonox::Vector2         getVector2()          const { return this->operator orxonox::Vector2();     } ///< Returns the current value, converted to the requested type.
    446             inline orxonox::Vector3         getVector3()          const { return this->operator orxonox::Vector3();     } ///< Returns the current value, converted to the requested type.
    447             inline orxonox::Vector4         getVector4()          const { return this->operator orxonox::Vector4();     } ///< Returns the current value, converted to the requested type.
    448             inline orxonox::ColourValue     getColourValue()      const { return this->operator orxonox::ColourValue(); } ///< Returns the current value, converted to the requested type.
    449             inline orxonox::Quaternion      getQuaternion()       const { return this->operator orxonox::Quaternion();  } ///< Returns the current value, converted to the requested type.
    450             inline orxonox::Radian          getRadian()           const { return this->operator orxonox::Radian();      } ///< Returns the current value, converted to the requested type.
    451             inline orxonox::Degree          getDegree()           const { return this->operator orxonox::Degree();      } ///< Returns the current value, converted to the requested type.
    452             template <typename T> inline T* getPointer()          const { return static_cast<T*>(this->getVoid());      } ///< Returns the current value, converted to a T* pointer.
     429            /// Returns the current value, converted to the requested type.
     430            template <typename T> inline T get() const { return T(); }
    453431
    454432        private:
     
    524502
    525503    // Specialization to avoid ambiguities with the conversion operator
    526     template <> inline bool MultiType::convert<std::string>()          { return this->setValue<std::string>         (this->operator std::string());          } ///< Converts the current value to the given type.
    527     template <> inline bool MultiType::convert<orxonox::Vector2>()     { return this->setValue<orxonox::Vector2>    (this->operator orxonox::Vector2());     } ///< Converts the current value to the given type.
    528     template <> inline bool MultiType::convert<orxonox::Vector3>()     { return this->setValue<orxonox::Vector3>    (this->operator orxonox::Vector3());     } ///< Converts the current value to the given type.
    529     template <> inline bool MultiType::convert<orxonox::Vector4>()     { return this->setValue<orxonox::Vector4>    (this->operator orxonox::Vector4());     } ///< Converts the current value to the given type.
    530     template <> inline bool MultiType::convert<orxonox::ColourValue>() { return this->setValue<orxonox::ColourValue>(this->operator orxonox::ColourValue()); } ///< Converts the current value to the given type.
    531     template <> inline bool MultiType::convert<orxonox::Quaternion>()  { return this->setValue<orxonox::Quaternion> (this->operator orxonox::Quaternion());  } ///< Converts the current value to the given type.
    532     template <> inline bool MultiType::convert<orxonox::Radian>()      { return this->setValue<orxonox::Radian>     (this->operator orxonox::Radian());      } ///< Converts the current value to the given type.
    533     template <> inline bool MultiType::convert<orxonox::Degree>()      { return this->setValue<orxonox::Degree>     (this->operator orxonox::Degree());      } ///< Converts the current value to the given type.
     504    template <> inline bool MultiType::convert<std::string>()          { return this->set<std::string>         (this->operator std::string());          } ///< Converts the current value to the given type.
     505    template <> inline bool MultiType::convert<orxonox::Vector2>()     { return this->set<orxonox::Vector2>    (this->operator orxonox::Vector2());     } ///< Converts the current value to the given type.
     506    template <> inline bool MultiType::convert<orxonox::Vector3>()     { return this->set<orxonox::Vector3>    (this->operator orxonox::Vector3());     } ///< Converts the current value to the given type.
     507    template <> inline bool MultiType::convert<orxonox::Vector4>()     { return this->set<orxonox::Vector4>    (this->operator orxonox::Vector4());     } ///< Converts the current value to the given type.
     508    template <> inline bool MultiType::convert<orxonox::ColourValue>() { return this->set<orxonox::ColourValue>(this->operator orxonox::ColourValue()); } ///< Converts the current value to the given type.
     509    template <> inline bool MultiType::convert<orxonox::Quaternion>()  { return this->set<orxonox::Quaternion> (this->operator orxonox::Quaternion());  } ///< Converts the current value to the given type.
     510    template <> inline bool MultiType::convert<orxonox::Radian>()      { return this->set<orxonox::Radian>     (this->operator orxonox::Radian());      } ///< Converts the current value to the given type.
     511    template <> inline bool MultiType::convert<orxonox::Degree>()      { return this->set<orxonox::Degree>     (this->operator orxonox::Degree());      } ///< Converts the current value to the given type.
    534512
    535513    // Specialization to avoid ambiguities with the conversion operator
     
    567545    template <> _UtilExport void MultiType::createNewValueContainer(const orxonox::Degree& value);
    568546
    569     inline bool MultiType::setValue(const char& value)                  { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    570     inline bool MultiType::setValue(const unsigned char& value)         { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    571     inline bool MultiType::setValue(const short& value)                 { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    572     inline bool MultiType::setValue(const unsigned short& value)        { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    573     inline bool MultiType::setValue(const int& value)                   { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    574     inline bool MultiType::setValue(const unsigned int& value)          { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    575     inline bool MultiType::setValue(const long& value)                  { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    576     inline bool MultiType::setValue(const unsigned long& value)         { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    577     inline bool MultiType::setValue(const long long& value)             { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    578     inline bool MultiType::setValue(const unsigned long long& value)    { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    579     inline bool MultiType::setValue(const float& value)                 { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    580     inline bool MultiType::setValue(const double& value)                { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    581     inline bool MultiType::setValue(const long double& value)           { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    582     inline bool MultiType::setValue(const bool& value)                  { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    583     inline bool MultiType::setValue(      void* const& value)           { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    584     inline bool MultiType::setValue(const std::string& value)           { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    585     inline bool MultiType::setValue(const orxonox::Vector2& value)      { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    586     inline bool MultiType::setValue(const orxonox::Vector3& value)      { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    587     inline bool MultiType::setValue(const orxonox::Vector4& value)      { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    588     inline bool MultiType::setValue(const orxonox::ColourValue& value)  { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    589     inline bool MultiType::setValue(const orxonox::Quaternion& value)   { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    590     inline bool MultiType::setValue(const orxonox::Radian& value)       { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
    591     inline bool MultiType::setValue(const orxonox::Degree& value)       { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     547    inline bool MultiType::set(const char& value)                  { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     548    inline bool MultiType::set(const unsigned char& value)         { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     549    inline bool MultiType::set(const short& value)                 { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     550    inline bool MultiType::set(const unsigned short& value)        { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     551    inline bool MultiType::set(const int& value)                   { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     552    inline bool MultiType::set(const unsigned int& value)          { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     553    inline bool MultiType::set(const long& value)                  { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     554    inline bool MultiType::set(const unsigned long& value)         { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     555    inline bool MultiType::set(const long long& value)             { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     556    inline bool MultiType::set(const unsigned long long& value)    { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     557    inline bool MultiType::set(const float& value)                 { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     558    inline bool MultiType::set(const double& value)                { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     559    inline bool MultiType::set(const long double& value)           { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     560    inline bool MultiType::set(const bool& value)                  { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     561    inline bool MultiType::set(      void* const& value)           { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     562    inline bool MultiType::set(const std::string& value)           { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     563    inline bool MultiType::set(const orxonox::Vector2& value)      { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     564    inline bool MultiType::set(const orxonox::Vector3& value)      { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     565    inline bool MultiType::set(const orxonox::Vector4& value)      { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     566    inline bool MultiType::set(const orxonox::ColourValue& value)  { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     567    inline bool MultiType::set(const orxonox::Quaternion& value)   { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     568    inline bool MultiType::set(const orxonox::Radian& value)       { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     569    inline bool MultiType::set(const orxonox::Degree& value)       { if (this->value_) { return this->value_->setValue(value); } else { return this->assignValue(value); } } ///< Assigns the given value and converts it to the current type.
     570
     571    template <> inline char                     MultiType::get() const { return this->operator char();                 }
     572    template <> inline unsigned char            MultiType::get() const { return this->operator unsigned char();        }
     573    template <> inline short                    MultiType::get() const { return this->operator short();                }
     574    template <> inline unsigned short           MultiType::get() const { return this->operator unsigned short();       }
     575    template <> inline int                      MultiType::get() const { return this->operator int();                  }
     576    template <> inline unsigned int             MultiType::get() const { return this->operator unsigned int();         }
     577    template <> inline long                     MultiType::get() const { return this->operator long();                 }
     578    template <> inline unsigned long            MultiType::get() const { return this->operator unsigned long();        }
     579    template <> inline long long                MultiType::get() const { return this->operator long long();            }
     580    template <> inline unsigned long long       MultiType::get() const { return this->operator unsigned long long();   }
     581    template <> inline float                    MultiType::get() const { return this->operator float();                }
     582    template <> inline double                   MultiType::get() const { return this->operator double();               }
     583    template <> inline long double              MultiType::get() const { return this->operator long double();          }
     584    template <> inline bool                     MultiType::get() const { return this->operator bool();                 }
     585    template <> inline void*                    MultiType::get() const { return this->operator void*();                }
     586    template <> inline std::string              MultiType::get() const { return this->operator std::string();          }
     587    template <> inline orxonox::Vector2         MultiType::get() const { return this->operator orxonox::Vector2();     }
     588    template <> inline orxonox::Vector3         MultiType::get() const { return this->operator orxonox::Vector3();     }
     589    template <> inline orxonox::Vector4         MultiType::get() const { return this->operator orxonox::Vector4();     }
     590    template <> inline orxonox::ColourValue     MultiType::get() const { return this->operator orxonox::ColourValue(); }
     591    template <> inline orxonox::Quaternion      MultiType::get() const { return this->operator orxonox::Quaternion();  }
     592    template <> inline orxonox::Radian          MultiType::get() const { return this->operator orxonox::Radian();      }
     593    template <> inline orxonox::Degree          MultiType::get() const { return this->operator orxonox::Degree();      }
    592594
    593595    /// Assigns the given value and converts it to the current type.
    594     inline bool MultiType::setValue(const char* value)                  { if (this->value_) { return this->value_->setValue(std::string(value)); } else { return this->assignValue(std::string(value)); } }
     596    inline bool MultiType::set(const char* value)                  { if (this->value_) { return this->value_->setValue(std::string(value)); } else { return this->assignValue(std::string(value)); } }
    595597}
    596598
Note: See TracChangeset for help on using the changeset viewer.