Kexi API Documentation (2.0 alpha)

KexiDB::AlterTableHandler::ActionBase Class Reference

#include <alter.h>

Inheritance diagram for KexiDB::AlterTableHandler::ActionBase:

KexiDB::AlterTableHandler::FieldActionBase KexiDB::AlterTableHandler::ChangeFieldPropertyAction KexiDB::AlterTableHandler::InsertFieldAction KexiDB::AlterTableHandler::MoveFieldPositionAction KexiDB::AlterTableHandler::RemoveFieldAction List of all members.

Detailed Description

Abstract base class used for implementing all the AlterTable actions.

Definition at line 157 of file alter.h.

Public Member Functions

 ActionBase (bool null=false)
virtual ~ActionBase ()
ChangeFieldPropertyActiontoChangeFieldPropertyAction ()
RemoveFieldActiontoRemoveFieldAction ()
InsertFieldActiontoInsertFieldAction ()
MoveFieldPositionActiontoMoveFieldPositionAction ()
bool isNull () const
virtual QString debugString (const DebugOptions &debugOptions=DebugOptions())
void debug (const DebugOptions &debugOptions=DebugOptions())

Protected Member Functions

void setAlteringRequirements (int alteringRequirements)
 Sets requirements for altering; used internally by AlterTableHandler object.
int alteringRequirements () const
virtual void updateAlteringRequirements ()
virtual void simplifyActions (ActionDictDict &fieldActions)
virtual bool shouldBeRemoved (ActionDictDict &fieldActions)
virtual tristate updateTableSchema (TableSchema &table, Field *field, QMap< QString, QString > &fieldMap)

Friends

class AlterTableHandler

Classes

class  DebugOptions
 Controls debug options for actions. Used in debugString() and debug(). More...


Constructor & Destructor Documentation

AlterTableHandler::ActionBase::ActionBase bool  null = false  ) 
 

Definition at line 53 of file alter.cpp.

AlterTableHandler::ActionBase::~ActionBase  )  [virtual]
 

Definition at line 60 of file alter.cpp.


Member Function Documentation

int KexiDB::AlterTableHandler::ActionBase::alteringRequirements  )  const [inline, protected]
 

Definition at line 196 of file alter.h.

void KexiDB::AlterTableHandler::ActionBase::debug const DebugOptions debugOptions = DebugOptions()  )  [inline]
 

Definition at line 187 of file alter.h.

References KexiDBDbg.

virtual QString KexiDB::AlterTableHandler::ActionBase::debugString const DebugOptions debugOptions = DebugOptions()  )  [inline, virtual]
 

Reimplemented in KexiDB::AlterTableHandler::ChangeFieldPropertyAction, KexiDB::AlterTableHandler::RemoveFieldAction, KexiDB::AlterTableHandler::InsertFieldAction, and KexiDB::AlterTableHandler::MoveFieldPositionAction.

Definition at line 185 of file alter.h.

bool KexiDB::AlterTableHandler::ActionBase::isNull  )  const [inline]
 

Returns:
true if the action is NULL; used in the Table Designer for temporarily collecting actions that have no effect at all.

Definition at line 169 of file alter.h.

void KexiDB::AlterTableHandler::ActionBase::setAlteringRequirements int  alteringRequirements  )  [inline, protected]
 

Sets requirements for altering; used internally by AlterTableHandler object.

Definition at line 193 of file alter.h.

Referenced by KexiDB::AlterTableHandler::MoveFieldPositionAction::updateAlteringRequirements(), KexiDB::AlterTableHandler::InsertFieldAction::updateAlteringRequirements(), KexiDB::AlterTableHandler::RemoveFieldAction::updateAlteringRequirements(), and KexiDB::AlterTableHandler::ChangeFieldPropertyAction::updateAlteringRequirements().

virtual bool KexiDB::AlterTableHandler::ActionBase::shouldBeRemoved ActionDictDict fieldActions  )  [inline, protected, virtual]
 

After calling simplifyActions() for each action, shouldBeRemoved() is called for them as an additional step. This is used for ChangeFieldPropertyAction items so actions that do not change property values are removed.

Reimplemented in KexiDB::AlterTableHandler::ChangeFieldPropertyAction.

Definition at line 209 of file alter.h.

virtual void KexiDB::AlterTableHandler::ActionBase::simplifyActions ActionDictDict fieldActions  )  [inline, protected, virtual]
 

Simplifies fieldActions dictionary. If this action has to be inserted Into the dictionary, an ActionDict is created first and then a copy of this action is inserted into it.

Reimplemented in KexiDB::AlterTableHandler::ChangeFieldPropertyAction, KexiDB::AlterTableHandler::RemoveFieldAction, KexiDB::AlterTableHandler::InsertFieldAction, and KexiDB::AlterTableHandler::MoveFieldPositionAction.

Definition at line 203 of file alter.h.

Referenced by KexiDB::AlterTableHandler::execute().

AlterTableHandler::ChangeFieldPropertyAction & AlterTableHandler::ActionBase::toChangeFieldPropertyAction  ) 
 

Definition at line 64 of file alter.cpp.

References nullChangeFieldPropertyAction.

AlterTableHandler::InsertFieldAction & AlterTableHandler::ActionBase::toInsertFieldAction  ) 
 

Definition at line 78 of file alter.cpp.

References nullInsertFieldAction.

AlterTableHandler::MoveFieldPositionAction & AlterTableHandler::ActionBase::toMoveFieldPositionAction  ) 
 

Definition at line 85 of file alter.cpp.

References nullMoveFieldPositionAction.

AlterTableHandler::RemoveFieldAction & AlterTableHandler::ActionBase::toRemoveFieldAction  ) 
 

Definition at line 71 of file alter.cpp.

References nullRemoveFieldAction.

virtual void KexiDB::AlterTableHandler::ActionBase::updateAlteringRequirements  )  [inline, protected, virtual]
 

Reimplemented in KexiDB::AlterTableHandler::ChangeFieldPropertyAction, KexiDB::AlterTableHandler::RemoveFieldAction, KexiDB::AlterTableHandler::InsertFieldAction, and KexiDB::AlterTableHandler::MoveFieldPositionAction.

Definition at line 198 of file alter.h.

virtual tristate KexiDB::AlterTableHandler::ActionBase::updateTableSchema TableSchema table,
Field field,
QMap< QString, QString > &  fieldMap
[inline, protected, virtual]
 

Reimplemented in KexiDB::AlterTableHandler::ChangeFieldPropertyAction, KexiDB::AlterTableHandler::RemoveFieldAction, and KexiDB::AlterTableHandler::InsertFieldAction.

Definition at line 212 of file alter.h.

Referenced by KexiDB::AlterTableHandler::execute().


Friends And Related Function Documentation

friend class AlterTableHandler [friend]
 

Definition at line 228 of file alter.h.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:50:37 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003