Manages OBJTYPE_Database RVC objects. More...
#include <rvc/dbase.h>

Classes | |
| class | BULKMODIFY |
| class | CONST_TABLEITERATOR |
| Constant iterator class. More... | |
| class | ELEMTRANSLIST |
| This class is used in CopyDatabaseTo() and JoinDatabaseTo() for one <-> many conversions. More... | |
| class | GETOBJFILTER_ISCAPABLE |
| Database object selection filter to select either a database object or a geospatial object capable of holding a database subobject (existing or not). More... | |
| class | GETOBJFILTER_ISNOTEMPTY |
| Database object selection filter to determine if the database is not empty (has tables) and is selectable under the parent object. More... | |
| class | GETOBJFILTER_ISSELECTABLE |
| Database object selection filter to determine if the database exists and is selectable under the parent object. More... | |
| class | INVERSEDBLISTSUSPEND |
| Manage suspend and resume state on inverse db list operations. More... | |
| class | OBSERVER |
| OBSERVER class for DBASE objects. The SUBJECT class is DBASE. More... | |
| class | TABLEITERATOR |
| Iterator class. More... | |
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, COPYFLAG_CopyElementIDTable = 0x02000000 } |
| 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, JOINFLAG_AttachDestIfSrc1Attached = 0x00800000, JOINFLAG_AttachDestIfSrc2Attached = 0x00400000, JOINFLAG_AttachDestIfEitherSrcAttached = 0x00000000, JOINFLAG_AttachDestIfBothSrcAttached = 0x000C0000, JOINFLAG_NoAttachDest = 0x00020000, JOINFLAG_NoAttachDestMASK = 0x000E0000 } |
Public Member Functions | |
| DBASE (const RVC::DBASE &rhs) | |
| DBASE () | |
| virtual | ~DBASE () |
| ERRVALUE | CanCreateTables () const |
| ERRVALUE | CopyDatabaseTo (RVC::DBASE_ELEMENT &DestDBaseObj, const RVC::DBTABLE &SourceTable, const RVC::DBASE::ELEMTRANSLIST &TransList, ELEMTYPE ElemType=ELEMTYPE_Empty, RVC::DBASE::COPYFLAG CopyFlags=RVC::DBASE::COPYFLAG_None) |
| ERRVALUE | CopyDatabaseTo (RVC::DBASE_ELEMENT &DestDBaseObj, const RVC::DBTABLE &SourceTable, const SIMPLE_ARRAY< INT32 > &TransList, ELEMTYPE ElemType=ELEMTYPE_Empty, RVC::DBASE::COPYFLAG CopyFlags=RVC::DBASE::COPYFLAG_None) |
| ERRVALUE | CopyDatabaseTo (RVC::DBASE &DestDBaseObj, RVC::DBASE::COPYFLAG CopyFlags=RVC::DBASE::COPYFLAG_None) |
| INT32 | CopyTableTo (INT32 SrcTableNum, RVC::DBASE &DestDBase, RVC::DESCRIPTOR &DestTableDescriptor, SIMPLE_ARRAY< INT32 > *RecordTrans=0, COPYTABLE flags=COPYTABLE_None) const |
| INT32 | CopyTableTo (INT32 SrcTableNum, RVC::DBASE &DestDBase, COPYTABLE flags=COPYTABLE_None) const |
| ERRVALUE | CreateSMLContext (SML::CONTEXT **pcontext) |
| ERRVALUE | ExtractTablesFrom (const DBASE &SrcDbObj, const DESCRIPTOR &BaseTable, const MISTRING &ConnectString, bool IsGeometricExtract=false) |
| ERRVALUE | FindTableMatches (const RVC::DBASE &rhs, SIMPLE_ARRAY< INT32 > &TableMatch) const |
| ERRVALUE | Flush () |
| ERRVALUE | GetAttachedRecordList (ELEMTYPE ElemType, INT32 ElemNum, SIMPLE_ARRAY< DBLISTELMT > &dblist, FINDFLAG FindFlag=FINDFLAG_AllAttached, INT32 BaseTableNum=-1) const |
| ERRVALUE | GetKeyFieldNames (SIMPLE_ARRAY< RVC::OBJECTNAME > &FieldNames) const |
| INT32 | GetNumTables () const |
| INT32 | GetRelationshipDistance (const DBTABLE &SrcTable, const DBTABLE &DestTable) |
| ERRVALUE | InverseDBListBuild () |
| void | InverseDBListResume () |
| void | InverseDBListSuspend () |
| bool | IsTableInternal (INT32 TableNum) const |
| bool | IsTableValid (const RVC::OBJECTNAME &name) const |
| bool | IsTableValid (INT32 TableNum) const |
| ERRVALUE | Make (RVC::OBJITEM &ObjItem, const char *Source=0, const CREDENTIALS *Credentials=0) |
| ERRVALUE | Make (const RVC::OBJECT &parent, const RVC::DESCRIPTOR &Descriptor, const CREDENTIALS *Credentials RVC_DEFAULT_CREDENTIALS) |
| RVC::DBASE & | operator= (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 |
Static Public Member Functions | |
| static RVC::OBJTYPESET | GetObjTypeSet () |
Manages OBJTYPE_Database RVC objects.
RVC Object Types that this class supports:
Default RVC Object Type for this class: OBJTYPE_Database.
Valid parents for this class:
| enum RVC::DBASE::COPYFLAG |
| enum RVC::DBASE::FINDFLAG |
Search flags for GetAttachedRecordList().
| 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. |
| JOINFLAG_AttachDestIfSrc1Attached | |
| JOINFLAG_AttachDestIfSrc2Attached | |
| JOINFLAG_AttachDestIfEitherSrcAttached | |
| JOINFLAG_AttachDestIfBothSrcAttached | |
| JOINFLAG_NoAttachDest | |
| JOINFLAG_NoAttachDestMASK |
| RVC::DBASE::DBASE | ( | ) |
Default constructor.
| RVC::DBASE::DBASE | ( | const RVC::DBASE & | rhs | ) |
Copy constructor.
| rhs | Copy Constructor |
| virtual RVC::DBASE::~DBASE | ( | ) | [virtual] |
Destructor.
| ERRVALUE RVC::DBASE::CanCreateTables | ( | ) | const |
Checks to see if a table could be created.
| ERRVALUE RVC::DBASE::CopyDatabaseTo | ( | RVC::DBASE_ELEMENT & | DestDBaseObj, | |
| const RVC::DBTABLE & | SourceTable, | |||
| const RVC::DBASE::ELEMTRANSLIST & | TransList, | |||
| ELEMTYPE | ElemType = ELEMTYPE_Empty, |
|||
| RVC::DBASE::COPYFLAG | CopyFlags = RVC::DBASE::COPYFLAG_None | |||
| ) |
Copy the tables from this database to another database, keeping the relationships.
This version also "attaches" the records from SourceTable to the elements of the parent geospatial object, where TransList is an array mapping source record number to destination element numbers.
| ERRVALUE RVC::DBASE::CopyDatabaseTo | ( | RVC::DBASE_ELEMENT & | DestDBaseObj, | |
| const RVC::DBTABLE & | SourceTable, | |||
| const SIMPLE_ARRAY< INT32 > & | TransList, | |||
| ELEMTYPE | ElemType = ELEMTYPE_Empty, |
|||
| RVC::DBASE::COPYFLAG | CopyFlags = RVC::DBASE::COPYFLAG_None | |||
| ) |
Copy the tables from this database to another database, keeping the relationships.
This version also "attaches" the records from SourceTable to the elements of the parent geospatial object, where TransList is an array mapping source record number to destination element number. A -1 in this array indicates that the record is not to be attached. In the case of a DBASE_ELEMENT which can service multiple element types, the ElemType parameter can be use to override the default.
| ERRVALUE RVC::DBASE::CopyDatabaseTo | ( | RVC::DBASE & | DestDBaseObj, | |
| RVC::DBASE::COPYFLAG | CopyFlags = RVC::DBASE::COPYFLAG_None | |||
| ) |
Copy the tables from this database to another database, keeping the relationships.
| INT32 RVC::DBASE::CopyTableTo | ( | INT32 | SrcTableNum, | |
| RVC::DBASE & | DestDBase, | |||
| RVC::DESCRIPTOR & | DestTableDescriptor, | |||
| SIMPLE_ARRAY< INT32 > * | RecordTrans = 0, |
|||
| COPYTABLE | flags = COPYTABLE_None | |||
| ) | const |
Copy a table from the source database to the destination database.
| RecordTrans | SrcToDest record translation table RETURNED if not NULL |
| INT32 RVC::DBASE::CopyTableTo | ( | INT32 | SrcTableNum, | |
| RVC::DBASE & | DestDBase, | |||
| COPYTABLE | flags = COPYTABLE_None | |||
| ) | const |
Copy a table from the source database to the destination database.
| ERRVALUE RVC::DBASE::CreateSMLContext | ( | SML::CONTEXT ** | pcontext | ) |
| ERRVALUE RVC::DBASE::ExtractTablesFrom | ( | const DBASE & | SrcDbObj, | |
| const DESCRIPTOR & | BaseTable, | |||
| const MISTRING & | ConnectString, | |||
| bool | IsGeometricExtract = false | |||
| ) |
Extract the tables that are related to the 'BaseTable' to the specified LINKTYPE.
if GEOMETRIC::HasCapability(GEOMETRIC::CAPABILITY_MultipleTableSupport) == false, this routine will return. If the 'BaseTable' has a primary key field, the 'BaseTable' will be extracted to a new table.
| SrcDbObj | The source database that contains the tables related to 'BaseTable' | |
| BaseTable | Name of the base table for export | |
| ConnectString | Connection string for the type of database to extract to, empty string refers to internal | |
| IsGeometricExtract | This is an extraction where the base table can be incoporated with the spatial component |
| 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
| 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::GetAttachedRecordList | ( | ELEMTYPE | ElemType, | |
| INT32 | ElemNum, | |||
| SIMPLE_ARRAY< DBLISTELMT > & | dblist, | |||
| FINDFLAG | FindFlag = FINDFLAG_AllAttached, |
|||
| INT32 | BaseTableNum = -1 | |||
| ) | const |
Get records attached to the specified element for all tables.
| dblist | List of attachments allocated and returned |
| ERRVALUE RVC::DBASE::GetKeyFieldNames | ( | SIMPLE_ARRAY< RVC::OBJECTNAME > & | FieldNames | ) | const |
Get list of field names that are key fields.
| INT32 RVC::DBASE::GetNumTables | ( | ) | const |
Determine the number of tables in the database.
| static RVC::OBJTYPESET RVC::DBASE::GetObjTypeSet | ( | ) | [static] |
Get correct 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.
| bool RVC::DBASE::IsTableInternal | ( | INT32 | TableNum | ) | const |
Determine if the table number refers to an internal (built-in) table.
| bool RVC::DBASE::IsTableValid | ( | const RVC::OBJECTNAME & | name | ) | const |
Determine if the table name refers to a valid table.
| bool RVC::DBASE::IsTableValid | ( | INT32 | TableNum | ) | const |
Determine if the table number refers to a valid table.
| ERRVALUE RVC::DBASE::Make | ( | RVC::OBJITEM & | ObjItem, | |
| const char * | Source = 0, |
|||
| const CREDENTIALS * | Credentials = 0 | |||
| ) |
Make a new database object.
| ObjItem | Parent object and DESCRIPTOR of object to create, new location RETURNED | |
| Source | Source of new style object, default is application name | |
| Credentials | User credentials passed in, NULL for default behavior |
| ERRVALUE RVC::DBASE::Make | ( | const RVC::OBJECT & | parent, | |
| const RVC::DESCRIPTOR & | Descriptor, | |||
| const CREDENTIALS *Credentials | RVC_DEFAULT_CREDENTIALS | |||
| ) |
Make a new database object.
| parent | Parent object to create database under | |
| Descriptor | Name of database object | |
| RVC_DEFAULT_CREDENTIALS | User credentials passed in, NULL for default behavior |
| RVC::DBASE& RVC::DBASE::operator= | ( | const RVC::DBASE & | rhs | ) |
Assignment.
Reimplemented from RVC::OBJECT.
Reimplemented in RVC::DBASE_ELEMENT, RVC::DBASE_NODE, and RVC::DBASE_TINNODE.
| 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.
| CONST_TABLEITERATOR RVC::DBASE::TableBegin | ( | ) | const [inline] |
Get a beginning constant table iterator.
| TABLEITERATOR RVC::DBASE::TableEnd | ( | ) | [inline] |
Get a ending table iterator.
| CONST_TABLEITERATOR RVC::DBASE::TableEnd | ( | ) | const [inline] |
Get a ending constant table iterator.
| ERRVALUE RVC::DBASE::ValidateTableName | ( | RVC::OBJECTNAME & | name, | |
| SIMPLE_ARRAY< RVC::OBJECTNAME > & | finfo | |||
| ) | const |
Validate new table and field names against existing tables and fields.
| name | Table name to validate, can be changed | |
| finfo | Field names to validate, can be changed |
1.6.1