#include "UserRating.h"
UserRating::UserRating()
:
fUserInfo(),
fRating(0.0f),
fComment(),
fLanguageId(),
fPackageVersion(),
fCreateTimestamp(0)
{
}
UserRating::UserRating(const UserInfo& userInfo, float rating,
const BString& comment, const BString& languageId,
const BString& packageVersion, uint64 createTimestamp)
:
fUserInfo(userInfo),
fRating(rating),
fComment(comment),
fLanguageId(languageId),
fPackageVersion(packageVersion),
fCreateTimestamp(createTimestamp)
{
}
UserRating::UserRating(const UserRating& other)
:
fUserInfo(other.fUserInfo),
fRating(other.fRating),
fComment(other.fComment),
fLanguageId(other.fLanguageId),
fPackageVersion(other.fPackageVersion),
fCreateTimestamp(other.fCreateTimestamp)
{
}
bool
UserRating::operator==(const UserRating& other) const
{
return fUserInfo == other.fUserInfo
&& fRating == other.fRating
&& fComment == other.fComment
&& fLanguageId == other.fLanguageId
&& fPackageVersion == other.fPackageVersion
&& fCreateTimestamp == other.fCreateTimestamp;
}
bool
UserRating::operator!=(const UserRating& other) const
{
return !(*this == other);
}