8 #ifndef __MEOWPP_UTILITY_OBJECT_H__
9 #define __MEOWPP_UTILITY_OBJECT_H__
76 template<
typename DataType>
91 return (value_ == static_cast<BaseNumberType const*>(ptr)->value_);
93 operator DataType()
const {
return value_; }
112 template<
typename DataType>
127 return (value_ == static_cast<BaseFloatingType const*>(ptr)->value_);
129 operator DataType()
const {
return value_; }
154 #endif // __MEOWPP_UTILITY_OBJECT_H__
BaseFloatingType & operator/=(DataType const &b)
A class for floating-point base object.
Object * CopyFrom(Object const *ptr)
Copies data from another object.
BaseNumberType & operator&=(DataType const &b)
BaseNumberType< uint64_t > UInt64
64 bits unsigned integer.
Object()
A protected constructor to prevent developers create an instance of Object directly.
BaseNumberType & operator>>=(int64_t const &b)
BaseNumberType< int64_t > Int64
64 bits integer.
BaseNumberType< int16_t > Int16
16 bits integer.
A class for number base object.
Object * Copy() const
Creates a copy of itself and return the pointer to it.
BaseNumberType< uint32_t > UInt32
32 bits unsigned integer.
virtual bool Equals(Object const *ptr) const
Returns whether it equals to another object or not.
BaseNumberType< uint8_t > UInt8
8 bits unsigned integer.
BaseFloatingType & operator*=(DataType const &b)
BaseFloatingType(BaseFloatingType const &b)
BaseNumberType & operator|=(DataType const &b)
BaseFloatingType & operator=(DataType const &b)
virtual Object * CopyFrom(Object const *ptr)
Copies data from another object.
BaseNumberType & operator/=(DataType const &b)
BaseNumberType & operator-=(DataType const &b)
BaseNumberType< int32_t > Int32
32 bits integer.
virtual Object * Copy() const
Creates a copy of itself and return the pointer to it.
Object & operator=(Object const &b)
Disable the copy operator.
Object * CopyFrom(Object const *ptr)
Copies data from another object.
bool Equals(Object const *ptr) const
Returns whether it equals to another object or not.
BaseFloatingType & operator+=(DataType const &b)
BaseNumberType & operator=(DataType const &b)
BaseFloatingType & operator-=(DataType const &b)
virtual ~Object()
Virtual destructor.
BaseNumberType(DataType const &arg_init_value)
BaseNumberType & operator<<=(int64_t const &b)
BaseNumberType< int8_t > Int8
8 bits integer.
BaseFloatingType< long double > LDouble
Long double.
BaseFloatingType< float > Float
Float.
BaseNumberType & operator*=(DataType const &b)
BaseNumberType & operator+=(DataType const &b)
BaseFloatingType(DataType const &arg_init_value)
BaseNumberType & operator^=(DataType const &b)
BaseNumberType< uint16_t > UInt16
16 bits unsigned integer.
BaseFloatingType< double > Double
Double.
Object * Copy() const
Creates a copy of itself and return the pointer to it.
BaseNumberType(BaseNumberType const &b)
bool Equals(Object const *ptr) const
Returns whether it equals to another object or not.