FieldDef Class Reference

This class represents the definition of a field in a table. More...

#include <FieldDef.h>

Inheritance diagram for FieldDef:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 FieldDef (const std::string &name, bool text, const std::string &defaultvalue=Global::Get()->EmptyString)
 Construct a FieldDef with the specified name, defaultvalue and 'textness'.
 FieldDef (const std::string &name, bool text, bool lookup)
 Construct a FieldDef with the specified name, lookup and 'textness'.
virtual ~FieldDef ()
 Destructor, a noop.
std::string creationString () const
 Returns the SQL string to generate this field.
const std::string & getName () const
 Returns the name of the field.
bool isText () const
 Returns whether this field is a text field.
const std::string & getDefaultValue () const
 Returns the default value for this field.
bool isLookup () const
 Whether this is a lookup field.
virtual bool isKey () const
 Whether this field is a key.
virtual bool isPrimaryKey () const
 Whether this field is a primary key.


Detailed Description

This class represents the definition of a field in a table.

Based on this class FieldImpl's will be generated.

Definition at line 37 of file FieldDef.h.


Constructor & Destructor Documentation

FieldDef::FieldDef ( const std::string &  name,
bool  text,
const std::string &  defaultvalue = Global::Get()->EmptyString 
)

Construct a FieldDef with the specified name, defaultvalue and 'textness'.

FieldDef::FieldDef ( const std::string &  name,
bool  text,
bool  lookup 
)

Construct a FieldDef with the specified name, lookup and 'textness'.

virtual FieldDef::~FieldDef (  )  [virtual]

Destructor, a noop.


Member Function Documentation

std::string FieldDef::creationString (  )  const

Returns the SQL string to generate this field.

const std::string& FieldDef::getName (  )  const [inline]

Returns the name of the field.

Definition at line 54 of file FieldDef.h.

bool FieldDef::isText (  )  const [inline]

Returns whether this field is a text field.

Definition at line 57 of file FieldDef.h.

const std::string& FieldDef::getDefaultValue (  )  const [inline]

Returns the default value for this field.

Definition at line 60 of file FieldDef.h.

bool FieldDef::isLookup (  )  const [inline]

Whether this is a lookup field.

Definition at line 63 of file FieldDef.h.

virtual bool FieldDef::isKey (  )  const [inline, virtual]

Whether this field is a key.

Reimplemented in KeyDef.

Definition at line 66 of file FieldDef.h.

virtual bool FieldDef::isPrimaryKey (  )  const [inline, virtual]

Whether this field is a primary key.

Reimplemented in KeyDef.

Definition at line 69 of file FieldDef.h.


Generated for UnsignedByte by  doxygen 1.5.3
SourceForge.net Logo