68 lines
971 B
C++
68 lines
971 B
C++
#ifndef _SQL_SQLINT_HPP_
|
|
#define _SQL_SQLINT_HPP_
|
|
#ifndef _COMMON_STDIO_HPP_
|
|
#include <common/stdio.hpp>
|
|
#endif
|
|
#ifndef _SQL_SQLSTRING_HPP_
|
|
#include <sql/sqlstring.hpp>
|
|
#endif
|
|
|
|
class SQLInt
|
|
{
|
|
public:
|
|
SQLInt(void);
|
|
SQLInt(int someInt);
|
|
SQLInt &operator=(int value);
|
|
bool operator==(const SQLInt &someSQLInt)const;
|
|
int getValue(void)const;
|
|
void setValue(int value);
|
|
SQLString toString(void)const;
|
|
private:
|
|
int mData;
|
|
};
|
|
|
|
inline
|
|
SQLInt::SQLInt(void)
|
|
: mData(0)
|
|
{
|
|
}
|
|
|
|
inline
|
|
SQLInt::SQLInt(int someInt)
|
|
: mData(someInt)
|
|
{
|
|
}
|
|
|
|
inline
|
|
SQLInt &SQLInt::operator=(int value)
|
|
{
|
|
mData=value;
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
bool SQLInt::operator==(const SQLInt &someSQLInt)const
|
|
{
|
|
return getValue()==someSQLInt.getValue();
|
|
}
|
|
|
|
inline
|
|
int SQLInt::getValue(void)const
|
|
{
|
|
return mData;
|
|
}
|
|
|
|
inline
|
|
void SQLInt::setValue(int value)
|
|
{
|
|
mData=value;
|
|
}
|
|
|
|
inline
|
|
SQLString SQLInt::toString(void)const
|
|
{
|
|
SQLString strString;
|
|
::sprintf(strString,"%d",mData);
|
|
return strString;
|
|
}
|
|
#endif |