Eamon CS  3.1.0
Eamon.Game.DataStorage.Generic.DbTable< T > Class Template Reference
Inheritance diagram for Eamon.Game.DataStorage.Generic.DbTable< T >:
Eamon.Framework.DataStorage.Generic.IDbTable< T >

Public Member Functions

virtual RetCode FreeRecords (bool dispose=true)
 Fully reinitializes the IDbTable and restores it to its initial (empty) state. More...
 
virtual long GetRecordCount ()
 Gets the number of records of type T stored in the Records collection. More...
 
virtual T FindRecord (long uid)
 Gets a record from the Records collection. More...
 
virtual T FindRecord (Type type, bool exactMatch=false)
 Gets a record from the Records collection based on interface type. More...
 
virtual RetCode AddRecord (T record, bool makeCopy=false)
 Adds a record to the Records collection. More...
 
virtual T RemoveRecord (long uid)
 Removes a record from the Records collection. More...
 
virtual T RemoveRecord (Type type, bool exactMatch=false)
 Removes a record from the Records collection based on interface type. More...
 
virtual long GetRecordUid (bool allocate=true)
 Gets the next available record Uid. More...
 
virtual void FreeRecordUid (long uid)
 Frees a record Uid, making it available again for use. More...
 
 DbTable ()
 

Properties

virtual ICollection< T > Records [get, set]
 
virtual SortedSet< long > FreeUids [get, set]
 
virtual T FindRec [get, set]
 
virtual long CurrUid [get, set]
 
- Properties inherited from Eamon.Framework.DataStorage.Generic.IDbTable< T >
ICollection< T > Records [get, set]
 Gets or sets the collection of records stored in the database table. More...
 
SortedSet< long > FreeUids [get, set]
 Gets or sets the collection of Uids available for reuse by new instances of this record type; may be empty. More...
 
long CurrUid [get, set]
 Gets or sets a sequence number representing the last Uid (unique ID) allocated to a record of type T. More...
 

Constructor & Destructor Documentation

◆ DbTable()

Member Function Documentation

◆ AddRecord()

virtual RetCode Eamon.Game.DataStorage.Generic.DbTable< T >.AddRecord ( record,
bool  makeCopy = false 
)
virtual

Adds a record to the Records collection.

Parameters
record
makeCopy
Returns

Implements Eamon.Framework.DataStorage.Generic.IDbTable< T >.

◆ FindRecord() [1/2]

virtual T Eamon.Game.DataStorage.Generic.DbTable< T >.FindRecord ( long  uid)
virtual

Gets a record from the Records collection.

Parameters
uid
Returns

Implements Eamon.Framework.DataStorage.Generic.IDbTable< T >.

◆ FindRecord() [2/2]

virtual T Eamon.Game.DataStorage.Generic.DbTable< T >.FindRecord ( Type  type,
bool  exactMatch = false 
)
virtual

Gets a record from the Records collection based on interface type.

Parameters
type
exactMatch
Returns

Implements Eamon.Framework.DataStorage.Generic.IDbTable< T >.

◆ FreeRecords()

virtual RetCode Eamon.Game.DataStorage.Generic.DbTable< T >.FreeRecords ( bool  dispose = true)
virtual

Fully reinitializes the IDbTable and restores it to its initial (empty) state.

Parameters
dispose
Returns

Implements Eamon.Framework.DataStorage.Generic.IDbTable< T >.

◆ FreeRecordUid()

virtual void Eamon.Game.DataStorage.Generic.DbTable< T >.FreeRecordUid ( long  uid)
virtual

Frees a record Uid, making it available again for use.

Parameters
uid

Implements Eamon.Framework.DataStorage.Generic.IDbTable< T >.

◆ GetRecordCount()

virtual long Eamon.Game.DataStorage.Generic.DbTable< T >.GetRecordCount ( )
virtual

Gets the number of records of type T stored in the Records collection.

Returns

Implements Eamon.Framework.DataStorage.Generic.IDbTable< T >.

◆ GetRecordUid()

virtual long Eamon.Game.DataStorage.Generic.DbTable< T >.GetRecordUid ( bool  allocate = true)
virtual

Gets the next available record Uid.

Parameters
allocate
Returns

Implements Eamon.Framework.DataStorage.Generic.IDbTable< T >.

◆ RemoveRecord() [1/2]

virtual T Eamon.Game.DataStorage.Generic.DbTable< T >.RemoveRecord ( long  uid)
virtual

Removes a record from the Records collection.

Parameters
uid
Returns

Implements Eamon.Framework.DataStorage.Generic.IDbTable< T >.

◆ RemoveRecord() [2/2]

virtual T Eamon.Game.DataStorage.Generic.DbTable< T >.RemoveRecord ( Type  type,
bool  exactMatch = false 
)
virtual

Removes a record from the Records collection based on interface type.

Parameters
type
exactMatch
Returns

Implements Eamon.Framework.DataStorage.Generic.IDbTable< T >.

Property Documentation

◆ CurrUid

virtual long Eamon.Game.DataStorage.Generic.DbTable< T >.CurrUid
getset

◆ FindRec

virtual T Eamon.Game.DataStorage.Generic.DbTable< T >.FindRec
getset

◆ FreeUids

virtual SortedSet<long> Eamon.Game.DataStorage.Generic.DbTable< T >.FreeUids
getset

◆ Records

virtual ICollection<T> Eamon.Game.DataStorage.Generic.DbTable< T >.Records
getset

The documentation for this class was generated from the following file: