RVC::DBASE Class Reference

Manages OBJTYPE_Database RVC objects. More...

#include <rvc/dbase.h>

Inheritance diagram for RVC::DBASE:

Inheritance graph
[legend]
List of all members.

Public Types

enum  COPYFLAG {
  COPYFLAG_None = 0x00000000, COPYFLAG_TableLinks = 0x00000004, COPYFLAG_DemoteIdentityTables = 0x00000008, COPYFLAG_MinimizeTableSize = 0x00000020,
  COPYFLAG_DontRemoveRecords = 0x00000200, COPYFLAG_RemoveStdAttribTables = 0x00000800, COPYFLAG_IgnoreStdAttribTables = 0x00040000, COPYFLAG_CopyThemeTable = 0x01000000
}
enum  COPYTABLE { COPYTABLE_None = 0x00000000, COPYTABLE_CopyLinks = 0x00000004, COPYTABLE_RemoveStdAttTables = 0x00000800, COPYTABLE_FreezeComputedFields = 0x00080000 }
enum  FINDFLAG { FINDFLAG_AllAttached = 0, FINDFLAG_NoInternal = 1, FINDFLAG_OnlyDirect = 2, FINDFLAG_FirstMatch = 8 }
enum  JOINFLAGS {
  JOINFLAG_None = 0x00000000, JOINFLAG_CopyThemeTable = 0x01000000, JOINFLAG_OuterRight = 0x02000000, JOINFLAG_Union = 0x04000000,
  JOINFLAG_Natural = 0x08000000, JOINFLAG_SameStrc = 0x10000000, JOINFLAG_SameNmSt = 0x30000000, JOINFLAG_RemoveDups = 0x40000000,
  JOINFLAG_Outer = 0x80000000
}

Public Member Functions

ERRVALUE CopyDatabaseTo (RVC::OBJECT &DestParentObj, RVC::DBASE &DestDBaseObj, const ELEMTRANSLIST &TransList, COPYFLAG flags)
ERRVALUE CopyDatabaseTo (RVC::OBJECT &DestParentObj, const SIMPLE_ARRAY< INT32 > &TransList, COPYFLAG flags)
INT32 CopyTableTo (INT32 SrcTableNum, RVC::DBASE &DestDBase, COPYTABLE flags) const
ERRVALUE CreateSMLContext (SMLCONTEXT **pcontext)
 DBASE (const RVC::DBASE &rhs)
 DBASE ()
ERRVALUE FindTableMatches (const RVC::DBASE &rhs, SIMPLE_ARRAY< INT32 > &TableMatch) const
ERRVALUE Flush ()
ERRVALUE GetKeyFieldNames (SIMPLE_ARRAY< RVC::OBJECTNAME > &FieldNames) const
INT32 GetNumTables () const
ERRVALUE InverseDBListBuild ()
void InverseDBListResume ()
void InverseDBListSuspend ()
ERRVALUE JoinDatabaseTo (RVC::DBASE &DestDBaseObj, const ELEMTRANSLIST &TransList, COPYFLAG CopyFlags, JOINFLAGS JoinFlags)
ERRVALUE JoinDatabaseTo (RVC::DBASE &DestDBaseObj, const SIMPLE_ARRAY< INT32 > &TransList, COPYFLAG CopyFlags, JOINFLAGS JoinFlags)
ERRVALUE Make (const RVC::OBJITEM &ObjItem, const char *Source=0)
ERRVALUE Make (const RVC::OBJECT &parent, const RVC::OBJECTNAME &name, const RVC::OBJECTDESC &desc, const char *Source=0)
RVC::DBASEoperator= (const RVC::DBASE &rhs)
ERRVALUE RemoveDuplicateRecords ()
ERRVALUE RemoveUnattachedRecords ()
TABLEITERATOR TableBegin ()
CONST_TABLEITERATOR TableBegin () const
TABLEITERATOR TableEnd ()
CONST_TABLEITERATOR TableEnd () const
ERRVALUE Validate (MISTRING &LogString)
ERRVALUE ValidateTableName (RVC::OBJECTNAME &name, SIMPLE_ARRAY< RVC::OBJECTNAME > &finfo) const
virtual ~DBASE ()

Static Public Member Functions

RVC::OBJTYPESET GetObjTypeSet ()

Detailed Description

Manages OBJTYPE_Database RVC objects.

The interface currently wraps the MfDatabase functions.

RVC Object Types that this class supports:

Default RVC Object Type for this class: OBJTYPE_Database.

Valid parents for this class:

Definition at line 215 of file dbase.h.


Member Enumeration Documentation

enum RVC::DBASE::COPYFLAG
 

Enumeration values:
COPYFLAG_None  Default, copy subobjects and links.
COPYFLAG_TableLinks  Copy table links instead of the tables themselves.
COPYFLAG_DemoteIdentityTables  Demote identity tables in MfDatabaseJoin() because they can no longer exist.
COPYFLAG_MinimizeTableSize  Minimize table sizes (convert Identity and OneToOne to OneRecordPerElement).
COPYFLAG_DontRemoveRecords  Do not remove records while copying.
COPYFLAG_RemoveStdAttribTables  Remove standard attribute tables.
COPYFLAG_IgnoreStdAttribTables  Ignore standard attribute tables.
COPYFLAG_CopyThemeTable  Copy theme tables, only if not joining tables.

Definition at line 217 of file dbase.h.

enum RVC::DBASE::COPYTABLE
 

Enumeration values:
COPYTABLE_None 
COPYTABLE_CopyLinks 
COPYTABLE_RemoveStdAttTables 
COPYTABLE_FreezeComputedFields 

Definition at line 228 of file dbase.h.

enum RVC::DBASE::FINDFLAG
 

Search flags for GetAttachedRecordList().

Enumeration values:
FINDFLAG_AllAttached 
FINDFLAG_NoInternal 
FINDFLAG_OnlyDirect 
FINDFLAG_FirstMatch 

Definition at line 236 of file dbase.h.

enum RVC::DBASE::JOINFLAGS
 

Enumeration values:
JOINFLAG_None 
JOINFLAG_CopyThemeTable  Copy theme tables, only if not joining tables.
JOINFLAG_OuterRight  Right Outer (for Join).
JOINFLAG_Union  Union (RVC::DBTABLE::Combine only).
JOINFLAG_Natural  Natural Join (RVC::DBTABLE::Combine only).
JOINFLAG_SameStrc  Only table structure has to match.
JOINFLAG_SameNmSt  Table structure and name has to match.
JOINFLAG_RemoveDups  Remove duplicate records when joining.
JOINFLAG_Outer  Outer Union or Left Outer Join.

Definition at line 243 of file dbase.h.


Constructor & Destructor Documentation

RVC::DBASE::DBASE  ) 
 

Default constructor.

RVC::DBASE::DBASE const RVC::DBASE rhs  ) 
 

Copy constructor.

Parameters:
rhs  Copy Constructor

virtual RVC::DBASE::~DBASE  )  [virtual]
 

Destructor.


Member Function Documentation

ERRVALUE RVC::DBASE::CopyDatabaseTo RVC::OBJECT DestParentObj,
RVC::DBASE DestDBaseObj,
const ELEMTRANSLIST TransList,
COPYFLAG  flags
 

Copy a database from the source to under the destination object using an element translation list.

Parameters:
DestDBaseObj  To be filled in with the new database object

ERRVALUE RVC::DBASE::CopyDatabaseTo RVC::OBJECT DestParentObj,
const SIMPLE_ARRAY< INT32 > &  TransList,
COPYFLAG  flags
 

Copy a database from the source to under the destination object using an element translation list.

INT32 RVC::DBASE::CopyTableTo INT32  SrcTableNum,
RVC::DBASE DestDBase,
COPYTABLE  flags
const
 

Copy a table from the source database to the destination database.

Returns:
Table number of copied table or error if < 0

ERRVALUE RVC::DBASE::CreateSMLContext SMLCONTEXT **  pcontext  ) 
 

Create an SML context for the given database class instance.

Parameters:
pcontext  SML context allocated and RETURNED

ERRVALUE RVC::DBASE::FindTableMatches const RVC::DBASE rhs,
SIMPLE_ARRAY< INT32 > &  TableMatch
const
 

Compare table structures between two databases to determine which tables structurally match.

Returns the set of exact matching tables In the TableMatch array if the entry != -1

Parameters:
TableMatch  Translation from lhs table number to rhs table number, -1 if no other table matches

ERRVALUE RVC::DBASE::Flush  ) 
 

Flush cached records and build indexes if necessary.

ERRVALUE RVC::DBASE::GetKeyFieldNames SIMPLE_ARRAY< RVC::OBJECTNAME > &  FieldNames  )  const
 

Get list of field names that are key fields.

Returns:
Number of key field names

INT32 RVC::DBASE::GetNumTables  )  const
 

Determine the number of tables in the database.

Returns:
Number of tables in the database

RVC::OBJTYPESET RVC::DBASE::GetObjTypeSet  )  [static]
 

Get correct OBJTYPESET for all database OBJTYPE's.

Returns:
OBJTYPESET for all database OBJTYPE's

ERRVALUE RVC::DBASE::InverseDBListBuild  ) 
 

Build an inverse DB list for all DBlist entries.

void RVC::DBASE::InverseDBListResume  ) 
 

Resume maintainence of the inverse DB list from a InverseDBListSuspend() call.

void RVC::DBASE::InverseDBListSuspend  ) 
 

Suspend maintainence of the inverse DB lists. Used if doing multiple database changes.

ERRVALUE RVC::DBASE::JoinDatabaseTo RVC::DBASE DestDBaseObj,
const ELEMTRANSLIST TransList,
COPYFLAG  CopyFlags,
JOINFLAGS  JoinFlags
 

Join a database from the source to the destination database object using an element translation list.

ERRVALUE RVC::DBASE::JoinDatabaseTo RVC::DBASE DestDBaseObj,
const SIMPLE_ARRAY< INT32 > &  TransList,
COPYFLAG  CopyFlags,
JOINFLAGS  JoinFlags
 

Join a database from the source to the destination database object using an element translation list.

ERRVALUE RVC::DBASE::Make const RVC::OBJITEM ObjItem,
const char *  Source = 0
 

Make a new database object.

Parameters:
Source  Source of database creation, default is GetAppName()

ERRVALUE RVC::DBASE::Make const RVC::OBJECT parent,
const RVC::OBJECTNAME name,
const RVC::OBJECTDESC desc,
const char *  Source = 0
 

Make a new database object.

Parameters:
parent  Parent object to create database under
name  Name of database object
desc  Database object description
Source  Source of database creation, default is GetAppName()

RVC::DBASE& RVC::DBASE::operator= const RVC::DBASE rhs  ) 
 

Assignment.

ERRVALUE RVC::DBASE::RemoveDuplicateRecords  ) 
 

Remove duplicate records from all tables (except for ATTACHMENT_Identity and ATTACHMENT_OneToOne) tables.

ERRVALUE RVC::DBASE::RemoveUnattachedRecords  ) 
 

Remove unattached records from all tables.

TABLEITERATOR RVC::DBASE::TableBegin  )  [inline]
 

Get a beginning table iterator.

Definition at line 535 of file dbase.h.

CONST_TABLEITERATOR RVC::DBASE::TableBegin  )  const [inline]
 

Get a beginning constant table iterator.

Definition at line 528 of file dbase.h.

TABLEITERATOR RVC::DBASE::TableEnd  )  [inline]
 

Get a ending table iterator.

Definition at line 546 of file dbase.h.

CONST_TABLEITERATOR RVC::DBASE::TableEnd  )  const [inline]
 

Get a ending constant table iterator.

Definition at line 542 of file dbase.h.

ERRVALUE RVC::DBASE::Validate MISTRING LogString  ) 
 

Validate the database.

ERRVALUE RVC::DBASE::ValidateTableName RVC::OBJECTNAME name,
SIMPLE_ARRAY< RVC::OBJECTNAME > &  finfo
const
 

Validate new table and field names against existing tables and fields.

Parameters:
name  Table name to validate, can be changed
finfo  Field names to validate, can be changed


The documentation for this class was generated from the following file:
Generated on Tue Dec 14 13:21:13 2004 for TNTsdk by  doxygen 1.3.8-20040913