CVS commit by staniek: KexiDB::Field::isFPNumericType() added M +5 -0 field.cpp 1.22 M +13 -0 field.h 1.18 --- koffice/kexi/kexidb/field.h #1.17:1.18 @@ -166,7 +166,20 @@ class KEXI_DB_EXPORT Field inline bool isNotNull() const { return constraints() & NotNull; } + /*! @return true if the field is of any numeric type */ inline bool isNumericType() const { return Field::isNumericType(m_type); } + + /*! static version of isNumericType() method */ static bool isNumericType(int type); + + /*! @return true if the field is of any floating-point-numeric type */ + inline bool isFPNumericType() const { return Field::isNumericType(m_type); } + + /*! static version of isFPNumericType() method */ + static bool isFPNumericType( int type ); + + /*! @return true if the field is of any text type */ inline bool isTextType() const { return Field::isTextType(m_type); } + + /*! static version of isTextType() method */ static bool isTextType(int type); --- koffice/kexi/kexidb/field.cpp #1.21:1.22 @@ -203,4 +203,9 @@ bool Field::isNumericType( int type ) } +bool Field::isFPNumericType( int type ) +{ + return type==Field::Float || type==Field::Double; +} + bool Field::isTextType( int type ) {