Wexus2 0.20
wexus::ActiveClass::ActiveField Class Reference

#include <ActiveClass.h>

Inheritance diagram for wexus::ActiveClass::ActiveField:

List of all members.

Public Member Functions

 ActiveField (int style, const QString &fieldName, const QString &fieldType, const ValidationExpr &valexpr, const QVariant &initVal)
 constructor
int style (void) const
const QString & fieldName (void) const
const QString & fieldType (void) const
QString sqlFieldType (void) const
const ValidationExprvalidationExpr (void) const
const QVariant & initVal (void) const
virtual QVariant toVariant (const ActiveRecord *inst) const =0
virtual void setVariant (ActiveRecord *inst, const QVariant &v)=0

Detailed Description

Represents one field in an wexus::ActiveClass

Author:
Aleksander Demko

Member Function Documentation

const QString& wexus::ActiveClass::ActiveField::fieldName ( void  ) const [inline]

Returns the field name of this field.

Author:
Aleksander Demko
const QString& wexus::ActiveClass::ActiveField::fieldType ( void  ) const [inline]

Returns the C++ data type of this field.

Author:
Aleksander Demko
const QVariant& wexus::ActiveClass::ActiveField::initVal ( void  ) const [inline]

Returns the default value, as defined in the .eh file. Returns an invalida QVariant if none was set.

Author:
Aleksander Demko
virtual void wexus::ActiveClass::ActiveField::setVariant ( ActiveRecord inst,
const QVariant &  v 
) [pure virtual]

Sets the value of thie field in the given wexus::ActiveRecord instance to v.

Author:
Aleksander Demko

Implemented in wexus::ActiveClass::ActiveFieldType< RECT, DATT >.

QString wexus::ActiveClass::ActiveField::sqlFieldType ( void  ) const [inline]

Returns the SQL datatype (converted from fieldType() via toSqlType()) of this field.

Author:
Aleksander Demko
int wexus::ActiveClass::ActiveField::style ( void  ) const [inline]

Returns the "style" (type) of field this is.

Author:
Aleksander Demko
virtual QVariant wexus::ActiveClass::ActiveField::toVariant ( const ActiveRecord inst) const [pure virtual]

Converts the current value of this field in the given wexus::ActiveRecord instance to a QVariant and returns it.

Author:
Aleksander Demko

Implemented in wexus::ActiveClass::ActiveFieldType< RECT, DATT >.

const ValidationExpr& wexus::ActiveClass::ActiveField::validationExpr ( void  ) const [inline]

Returns the wexus::ValidationExpr defined in the .eh for this field, or a null wexus::ValidationExpr is none was defined.

Author:
Aleksander Demko

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Enumerator