This commit is contained in:
2024-08-07 09:16:27 -04:00
parent fdfadd5c7e
commit 5f971cf684
5200 changed files with 731717 additions and 0 deletions

80
sql/sqlbool.hpp Normal file
View File

@@ -0,0 +1,80 @@
#ifndef _SQL_SQLBOOL_HPP_
#define _SQL_SQLBOOL_HPP_
#ifndef _COMMON_STRING_HPP_
#include <common/string.hpp>
#endif
class SQLBool
{
public:
SQLBool(void);
SQLBool(const SQLBool &sqlBool);
SQLBool(bool value);
SQLBool &operator=(const SQLBool &sqlBool);
SQLBool &operator=(bool value);
operator String(void)const;
bool getValue(void)const;
void setValue(bool value);
String toString(void)const;
private:
bool mValue;
};
inline
SQLBool::SQLBool(void)
: mValue(false)
{
}
inline
SQLBool::SQLBool(const SQLBool &sqlBool)
: mValue(sqlBool.mValue)
{
}
inline
SQLBool::SQLBool(bool value)
: mValue(value)
{
}
inline
SQLBool &SQLBool::operator=(const SQLBool &sqlBool)
{
mValue=sqlBool.mValue;
return *this;
}
inline
SQLBool &SQLBool::operator=(bool value)
{
mValue=value;
return *this;
}
inline
SQLBool::operator String(void)const
{
return toString();
}
inline
bool SQLBool::getValue(void)const
{
return mValue;
}
inline
void SQLBool::setValue(bool value)
{
mValue=value;
}
inline
String SQLBool::toString(void)const
{
String strString;
::sprintf(strString,"%d",int(mValue));
return strString;
}
#endif