aboutsummaryrefslogtreecommitdiff
path: root/src/shared/Database/Field.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/Database/Field.h')
-rw-r--r--src/shared/Database/Field.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/Database/Field.h b/src/shared/Database/Field.h
index fd259423aef..d1238f838a5 100644
--- a/src/shared/Database/Field.h
+++ b/src/shared/Database/Field.h
@@ -17,11 +17,14 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+
#if !defined(FIELD_H)
#define FIELD_H
+
class Field
{
public:
+
enum DataTypes
{
DB_TYPE_UNKNOWN = 0x00,
@@ -30,11 +33,15 @@ class Field
DB_TYPE_FLOAT = 0x03,
DB_TYPE_BOOL = 0x04
};
+
Field();
Field(Field &f);
Field(const char *value, enum DataTypes type);
+
~Field();
+
enum DataTypes GetType() const { return mType; }
+
const char *GetString() const { return mValue; }
std::string GetCppString() const
{
@@ -69,8 +76,11 @@ class Field
else
return 0;
}
+
void SetType(enum DataTypes type) { mType = type; }
+
void SetValue(const char *value);
+
private:
char *mValue;
enum DataTypes mType;