ScummVM API documentation
Sci::SegmentObjTable< T > Struct Template Reference
Inheritance diagram for Sci::SegmentObjTable< T >:
Sci::SegmentObj Common::Serializable

Classes

struct  Entry
 

Public Types

enum  { HEAPENTRY_INVALID = -1 }
 
typedef T value_type
 
typedef Common::Array< EntryArrayType
 

Public Member Functions

 SegmentObjTable (SegmentType type)
 
void initTable ()
 
int allocEntry ()
 
bool isValidOffset (uint32 offset) const override
 
bool isValidEntry (int idx) const
 
virtual void freeEntry (int idx)
 
Common::Array< reg_tlistAllDeallocatable (SegmentId segId) const override
 
uint size () const
 
T & at (uint index)
 
const T & at (uint index) const
 
T & operator[] (uint index)
 
const T & operator[] (uint index) const
 
- Public Member Functions inherited from Sci::SegmentObj
 SegmentObj (SegmentType type)
 
SegmentType getType () const
 
virtual SegmentRef dereference (reg_t pointer)
 
virtual reg_t findCanonicAddress (SegManager *segMan, reg_t sub_addr) const
 
virtual void freeAtAddress (SegManager *segMan, reg_t sub_addr)
 
virtual Common::Array< reg_tlistAllOutgoingReferences (reg_t object) const
 
- Public Member Functions inherited from Common::Serializable
virtual void saveLoadWithSerializer (Serializer &ser)=0
 

Public Attributes

int first_free
 
int entries_used
 
ArrayType _table
 
- Public Attributes inherited from Sci::SegmentObj
SegmentType _type
 

Additional Inherited Members

- Static Public Member Functions inherited from Sci::SegmentObj
static SegmentObjcreateSegmentObj (SegmentType type)
 

Member Function Documentation

◆ isValidOffset()

template<typename T>
bool Sci::SegmentObjTable< T >::isValidOffset ( uint32  offset) const
inlineoverridevirtual

Check whether the given offset into this memory object is valid, i.e., suitable for passing to dereference.

Implements Sci::SegmentObj.

◆ listAllDeallocatable()

template<typename T>
Common::Array<reg_t> Sci::SegmentObjTable< T >::listAllDeallocatable ( SegmentId  segId) const
inlineoverridevirtual

Iterates over and reports all addresses within the segment. Used by the garbage collector.

Returns
a list of addresses within the segment

Reimplemented from Sci::SegmentObj.

Member Data Documentation

◆ first_free

template<typename T>
int Sci::SegmentObjTable< T >::first_free

Beginning of a singly linked list for entries

◆ entries_used

template<typename T>
int Sci::SegmentObjTable< T >::entries_used

Statistical information


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